Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc
Katrin Fischer afb3d36c3e
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 <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>
2020-02-19 11:25:48 +00:00

97 lines
6.7 KiB
HTML

[% BLOCK shelfbrowser %]
[% IF OpenOPACShelfBrowser %]
<div id="shelfbrowser">
<h5 style="text-align: center;">
[%- 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 -%]
<a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf" >Close shelf browser</a>
</h5>
<table class="table">
<tr>
<td class="nav-cell" rowspan="2">
[% IF shelfbrowser_prev_item %]
<div id="browser_previous">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% shelfbrowser_prev_item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_item.itemnumber | uri %]#shelfbrowser" data-prev-itemnumber="[% shelfbrowser_prev_item.itemnumber | html %]"><i class="fa fa-caret-up"></i> Previous</a>
</div>
[% END %]
</td>
[% FOREACH item IN shelfbrowser_items %]
<td>
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
[% IF ( OPACLocalCoverImages ) %]
<div title="[% item.biblionumber |url %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div>
[% END %]
[% IF ( OPACAmazonCoverImages ) %]
[% IF ( item.browser_normalized_isbn ) %]
<img src="https://images-na.ssl-images-amazon.com/images/P/[% item.browser_normalized_isbn | html %].01._AA75_PU_PU-5_.jpg" alt="" />
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF ( SyndeticsEnabled ) %]
[% IF ( SyndeticsCoverImages ) %]
[% IF ( content_identifier_exists ) %]
<img src="https://secure.syndetics.com/index.aspx?isbn=[% item.browser_normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %][% IF ( item.browser_normalized_upc ) %]&amp;upc=[% item.browser_normalized_upc | html %][% END %][% IF ( item.browser_normalized_oclc ) %]&amp;oclc=[% item.browser_normalized_oclc | html %][% END %]&amp;type=xw10" alt="" />
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% END %]
[% IF ( GoogleJackets ) %]
[% IF ( item.browser_normalized_isbn ) %]
<div title="[% item.biblionumber |url %]" class="[% item.browser_normalized_isbn | html %]" id="gbs-thumbnail-preview[% loop.count | html %]"></div>
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
[% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
<div title="[% item.biblionumber |url %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
[% END %]
[% IF ( BakerTaylorEnabled ) %]
[% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %]
[% IF ( bt_id ) %]
<img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
<span class="custom_cover_image">
<img alt="Cover image" src="[% item.biblio_object.custom_cover_image_url | url %]" />
</span>
[% END %]
</a>
</td>
[% END %]
<td class="nav-cell" rowspan="2">
[% IF shelfbrowser_next_item %]
<div id="browser_next">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% shelfbrowser_next_item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_item.itemnumber | uri %]#shelfbrowser" data-next-itemnumber="[% shelfbrowser_next_item.itemnumber | html %]">Next <i class="fa fa-caret-up"></i></a>
</div>
[% END %]
</td>
</tr>
<tr>
[% FOREACH item IN shelfbrowser_items %]
<td class="top">
[% item.itemcallnumber | html %]
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
[% INCLUDE 'biblio-title.inc' biblio=item %]
</a>
</td>
[% END %]
</tr>
</table>
</div>
[% END # /IF OpenOPACShelfBrowser %]
[% END # end of shelfbrowser block %]