Bug 10987: (follow-up) fix display of authorities containing only one see from or...
authorGalen Charlton <gmc@esilibrary.com>
Thu, 16 Jan 2014 23:07:09 +0000 (23:07 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 16 Jan 2014 23:07:09 +0000 (23:07 +0000)
This patch fixes an incorrect test on the number of see from and
see also links in the authority record, as otherwise if a record
had only one 4XX or 5XX, the linked headings weren't displayed at
all.  This patch also makes the test consistent across the staff
theme and the two OPAC themes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc
koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc

index 9b7bf10..8c2c83c 100644 (file)
@@ -91,7 +91,7 @@
               </div>
             [% END %]
         [% ELSE %]
-            [% IF ( summary.seefrom.size > 1 ) %]
+            [% IF ( summary.seefrom.size >= 1 ) %]
             <div class="seefrom">
                 <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                 [% END %]
             </div>
             [% END %]
-            [% IF ( summary.seealso.size > 1 ) %]
+            [% IF ( summary.seealso.size >= 1 ) %]
             <div class="seealso">
                 <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]
index 8a1df83..dda8d0b 100644 (file)
@@ -83,7 +83,7 @@
                 </div>
             [% END %]
         [% ELSE %]
-            [% IF ( summary.seefrom ) %]
+            [% IF ( summary.seefrom.size >= 1 ) %]
                     <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                     <div class="seefrom authref">
@@ -95,7 +95,7 @@
                     </div>
                 [% END %]
             [% END %]
-            [% IF ( summary.seealso ) %]
+            [% IF ( summary.seealso.size >= 1 ) %]
                     <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]
                     <div class="seealso authref">
index 97e7c03..506bcf1 100644 (file)
@@ -90,7 +90,7 @@
               </div>
             [% END %]
         [% ELSE %]
-            [% IF ( summary.seefrom.size > 1 ) %]
+            [% IF ( summary.seefrom.size >= 1 ) %]
             <div class="seefrom">
                 <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                 [% END %]
             </div>
             [% END %]
-            [% IF ( summary.seealso.size > 1 ) %]
+            [% IF ( summary.seealso.size >= 1 ) %]
             <div class="seealso">
                 <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]