Bug 7442: (follow-up) restore display of heading type for non-UNIMARC
authorGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 01:27:33 +0000 (01:27 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 16 Oct 2014 10:32:08 +0000 (12:32 +0200)
This patch restores the display of the authority type summary for
MARC21, where at present the heading type (i.e., "Topical Term",
"Personal Names") come over for display in the template.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9fe024667f03077cd9e07f3bcb0c7353d4e3cf4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

C4/AuthoritiesMarc.pm
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc
koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc

index ed86e8e..1f52aba 100644 (file)
@@ -886,6 +886,11 @@ sub BuildSummary {
         $summary{authtypecode} = $authref->{authtypecode};
         $summary{type} = $authref->{authtypetext};
         $summary_template = $authref->{summary};
+        # for MARC21, the authority type summary displays a label meant for
+        # display
+        if (C4::Context->preference('marcflavour') ne 'UNIMARC') {
+            $summary{summary} = $authref->{summary};
+        }
     }
     my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
     my %marc21controlrefs = ( 'a' => 'earlier',
index 8de56e9..ceff1a4 100644 (file)
@@ -50,6 +50,7 @@
     [% END %]
 [% END %]
 [% BLOCK authresult %]
+    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
     <div class="authres_repet">
       [% FOREACH repet IN summary.repets %]
         <span>[% repet | html %]</span>
index 8efa4ec..593de21 100644 (file)
@@ -49,6 +49,7 @@
     [% END %]
 [% END %]
 [% BLOCK authresult %]
+    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
     <div class="authres_repet">
       [% FOREACH repet IN summary.repets %]
         <span>[% repet | html %]</span>