From d49bb4fa0bd236f26bf7328d313f241a22e2ede6 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 12 Jan 2020 03:55:41 +0000 Subject: [PATCH] Bug 17221: (follow-up) Orphan comma in shelf browser This further improves the display if no location or no collection has been set. Example output: Browsing Centerville shelves, Collection: Non-fiction Also changes 'Collection code' to 'collection' and takes care of additional spaces before the comma. To test: - Make sure your OpacShelfBrowser pref is set to "Show" - Search for a record with items and callnumbers in your OPAC - "Browse shelf" - Navigate back and forth, verify the information showing on top of the list is correctly formatted - Try different combinations for the following prefs: - ShelfBrowserUsesCcode - ShelfBrowserUsesHomeBranch - ShelfBrowserUsesLocation - Verify the display is always nicely formatted Note: fixing capitalization here is tricky, as it also depends on what was displayed before. If you have no homebranch, you would want "Shelving...", if you have one we'd like "shelving...". Left as I found it for now. Signed-off-by: Katrin Fischer Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit d54a0d81c51396d9a0f94a264fb33688894caebe) Signed-off-by: Lucas Gass --- .../opac-tmpl/bootstrap/en/includes/shelfbrowser.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc index 71bb14ca56..a8205d62e4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc @@ -2,11 +2,11 @@ [% IF OpenOPACShelfBrowser %]
- [% IF ( starting_homebranch ) %]Browsing [% starting_homebranch | html %] Shelves[% 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 %] + [%- IF ( starting_homebranch ) %]Browsing [% starting_homebranch | html %] shelves[% END -%] + [%- IF ( starting_homebranch && starting_location ) %], [% END %] + [%- IF ( starting_location ) %]Shelving location: [%- starting_location | html -%][% END -%] + [%- IF ( starting_homebranch && starting_ccode ) %], [% END %] + [%- IF ( starting_ccode ) %]Collection: [%- starting_ccode | html -%][% END -%] Close shelf browser
-- 2.39.5