Bug 8581: don't display parentheses when we don't have a type
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 6 Aug 2012 18:04:32 +0000 (14:04 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 1 Oct 2012 14:34:04 +0000 (16:34 +0200)
Prior to this patch, see also references in certain authority records
(most notably GND records) were being followed by empty parentheses in
the search results display. This patch resolves that problem.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc
koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc

index cd99443..58f5f2d 100644 (file)
@@ -26,7 +26,7 @@
         [% CASE 'broader' %](Broader heading)
         [% CASE 'narrower' %](Narrower heading)
         [% CASE 'parent' %](Immediate parent body)
-        [% CASE %]([% type | html %])
+        [% CASE %][% IF type %]([% type | html %])[% END %]
         [% END %]</span>[% END %]
     [% END %]
 [% END %]
index cd99443..58f5f2d 100644 (file)
@@ -26,7 +26,7 @@
         [% CASE 'broader' %](Broader heading)
         [% CASE 'narrower' %](Narrower heading)
         [% CASE 'parent' %](Immediate parent body)
-        [% CASE %]([% type | html %])
+        [% CASE %][% IF type %]([% type | html %])[% END %]
         [% END %]</span>[% END %]
     [% END %]
 [% END %]