Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc
Owen Leonard b0793ec34c Bug 10309: (follow-up) Update for Bug 10856, improve shelf browser
This patch updates this theme with the changes made in Bug 10856.
Because of the way JavaScript is loaded in the new theme, the JS in the
shelfbrowser include had to be moved to the opac-detail template.

Test plan from that bug:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
  get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors

Disabled JavaScript on Firefox (about:config, javascript.enable -> false)
Browse shelf works by reloading.
Unit test report success.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:47 +00:00

86 lines
No EOL
5.8 KiB
HTML

[% BLOCK shelfbrowser %]
[% IF OpenOPACShelfBrowser %]
<div id="shelfbrowser">
<h5 style="text-align: center;">
[% IF ( starting_homebranch ) %]Browsing [% starting_homebranch %] Shelves[% END %]
[% IF ( starting_location ) %], Shelving location: [% starting_location %][% END %]
[% IF ( starting_ccode ) %], Collection code: [% starting_ccode %][% END %]
<a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" class="close_shelf" >Close shelf browser</a>
</h5>
<table class="table">
<tr>
<td rowspan="2">
[% IF shelfbrowser_prev_item %]
<div id="browser_previous">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% shelfbrowser_prev_item.biblionumber %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_item.itemnumber %]#shelfbrowser" data-prev-itemnumber="[% shelfbrowser_prev_item.itemnumber %]">Previous</a>
</div>
[% END %]
</td>
[% FOREACH item IN shelfbrowser_items %]
<td>
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber %]&amp;shelfbrowse_itemnumber=[% item.itemnumber %]#shelfbrowser">
[% IF ( OPACLocalCoverImages ) %]
<div title="[% item.biblionumber |url %]" class="[% item.biblionumber %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber %]"></div>
[% END %]
[% IF ( OPACAmazonCoverImages ) %]
[% IF ( item.browser_normalized_isbn ) %]
<img src="http://images.amazon.com/images/P/[% item.browser_normalized_isbn %].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 ) %]
[% IF ( using_https ) %]
<img src="https://secure.syndetics.com/index.aspx?isbn=[% item.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( item.browser_normalized_upc ) %]&amp;upc=[% item.browser_normalized_upc %][% END %][% IF ( item.browser_normalized_oclc ) %]&amp;oclc=[% item.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
[% ELSE %]
<img src="http://www.syndetics.com/index.aspx?isbn=[% item.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( item.browser_normalized_upc ) %]&amp;upc=[% item.browser_normalized_upc %][% END %][% IF ( item.browser_normalized_oclc ) %]&amp;oclc=[% item.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
[% END %]
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% END %]
[% IF ( GoogleJackets ) %]
[% IF ( item.browser_normalized_isbn ) %]
<div style="block" title="[% item.biblionumber |url %]" class="[% item.browser_normalized_isbn %]" id="gbs-thumbnail-preview[% loop.count %]"></div>
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF ( BakerTaylorEnabled ) %]
[% IF ( item.browser_normalized_isbn ) %]
<img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% item.browser_normalized_isbn %]" />
[% ELSE %]
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
</a>
</td>
[% END %]
<td rowspan="2">
[% IF shelfbrowser_next_item %]
<div id="browser_next">
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% shelfbrowser_next_item.biblionumber %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_item.itemnumber %]#shelfbrowser" data-next-itemnumber="[% shelfbrowser_next_item.itemnumber %]">Next</a>
</div>
[% END %]
</td>
</tr>
<tr>
[% FOREACH item IN shelfbrowser_items %]
<td class="top">
[% item.itemcallnumber %]
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber %]&amp;shelfbrowse_itemnumber=[% item.itemnumber %]#shelfbrowser">[% item.title |html %]</a>
</td>
[% END %]
</tr>
</table>
</div>
[% END # /IF OpenOPACShelfBrowser %]
[% END # end of shelfbrowser block %]