Bug 11885: fix inconsistent HTML in MARC Details
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 4 Mar 2014 06:57:11 +0000 (08:57 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 11 Apr 2014 14:47:19 +0000 (14:47 +0000)
commit0ea17a6a7689e7fb3d60ebb72cac72eefb142d8a
tree4601fa51f5d19ec1af2e048dfc920ddd1bbb7347
parentc38cf38c973159af2d03c6956d7aede8aebb20d5
Bug 11885: fix inconsistent HTML in MARC Details

In Catalog > MARC Details, the HTML in the different tabs is slightly
inconsistent and doesn't differentiate different elements, making CSS
styling complicated or impossible:

* tab 0 has <p class="subfield_line"> whereas all the other tabs
  have just <p>

* all other tabs wrap the subfield character in <b> tags, except
  for tab 0

* the MARC tag title is a single div with the tag, the indicators
  and the field description.

Attached patch folds all the tab outputs into a single TT BLOCK,
which is then reused. It also marks the separate parts of the tag
title in their own spans.

The output should be nearly identical to previous behaviour, minus
a dash from the tag title descriptions - it was used to separate
the tag from the description. The description can now be styled
separately from the tag itself, so the dash can be added with CSS,
if necessary.

Revised test:
1) Find a biblio
2) Edit the record so that there is something in every tab (0-9).
3) Save and then click 'MARC' in the left pane to view the
    MARC details.
4) Note the contents of each tab.
5) Apply patch
6) Compare the MARC details output to what was noted. Should
   be the same, minus a dash in each of the tag title descriptions.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
catalogue/MARCdetail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt