Bug 17221: Remove orphan commas in shelf browser
authorphette23 <phette23@gmail.com>
Sun, 12 Jan 2020 10:32:53 +0000 (11:32 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 19 Feb 2020 11:25:34 +0000 (11:25 +0000)
This patch adds more conditions to the shelf browser template
such that the displayed text reads as a proper list no matter
what combination of system preferences are utilized

Sponsored-by: California College of the Arts
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc

index 5667351..6dc1e66 100644 (file)
@@ -3,8 +3,10 @@
         <div id="shelfbrowser">
             <h5 style="text-align: center;">
                 [% IF ( starting_homebranch ) %]Browsing [% starting_homebranch | html %] Shelves[% END %]
-                [% IF ( starting_location ) %], Shelving location: [% starting_location | html %][% END %]
-                [% IF ( starting_ccode ) %], Collection code: [% starting_ccode | html %][% END %]
+                [% IF ( starting_homebranch && ( starting_location || starting_ccode ) ) %], [% END %]
+                [% IF ( starting_location ) %]Shelving location: [% starting_location | html %][% END %]
+                [% IF ( ( starting_homebranch || starting_location ) && starting_ccode ) %], [% END %]
+                [% IF ( starting_ccode ) %]Collection code: [% starting_ccode | html %][% END %]
                 <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf" >Close shelf browser</a>
             </h5>