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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 6 Aug 2014 07:49:48 +0000 (09:49 +0200)
commit18a5f1cb289261ffe613d7df22b428e12a5be072
tree0bf86c5d200e269cc9499e41f275164cc06fb1cc
parent38caaaf836594fc1f1c12abf2439fdf73be2772c
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>
(cherry picked from commit 0ea17a6a7689e7fb3d60ebb72cac72eefb142d8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
catalogue/MARCdetail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt