Bug 17600: Fix opac/svc/overdrive
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / includes / shelfbrowser.inc
1 [% BLOCK shelfbrowser %]
2     [% IF OpenOPACShelfBrowser %]
3         <div id="shelfbrowser">
4             <h5 style="text-align: center;" tabindex="-1">
5                 [%- IF ( starting_homebranch ) %]Browsing [% starting_homebranch | html %] shelves[% END -%]
6                 [%- IF ( starting_homebranch && starting_location ) %], [% END %]
7                 [%- IF ( starting_location ) %]Shelving location: [%- starting_location | html -%][% END -%]
8                 [%- IF ( starting_homebranch && starting_ccode ) %], [% END %]
9                 [%- IF ( starting_ccode ) %]Collection: [%- starting_ccode | html -%][% END -%]
10                 <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf" >Close shelf browser <span class="sr-only">(Hides shelf browser)</span></a>
11             </h5>
12
13             <table class="table">
14                 <tr>
15                     <td class="nav-cell" rowspan="2">
16                       [% IF shelfbrowser_prev_item %]
17                         <div id="browser_previous">
18                             <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" aria-hidden="true"></i> Previous</a>
19                         </div>
20                       [% END %]
21                     </td>
22
23                     [% FOREACH item IN shelfbrowser_items %]
24                         <td>
25                             [% IF ( item.title ) %]
26                                 [% img_title = item.title %]
27                             [% ELSE %]
28                                 [% img_title = item.biblionumber %]
29                             [% END %]
30
31                             [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %]
32                                 <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
33                                     [% IF ( OPACLocalCoverImages ) %]
34                                         <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div>
35                                     [% END %]
36                                     [% IF ( OPACAmazonCoverImages ) %]
37                                         [% IF ( item.browser_normalized_isbn ) %]
38                                             <img src="https://images-na.ssl-images-amazon.com/images/P/[% item.browser_normalized_isbn | html %].01._AA75_PU_PU-5_.jpg" alt="" />
39                                         [% ELSE %]
40                                             <span class="no-image">No cover image available</span>
41                                         [% END %]
42                                     [% END %]
43
44                                     [% IF ( SyndeticsEnabled ) %]
45                                         [% IF ( SyndeticsCoverImages ) %]
46                                             [% IF ( content_identifier_exists ) %]
47                                                 <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="" />
48                                             [% ELSE %]
49                                                 <span class="no-image">No cover image available</span>
50                                             [% END %]
51                                         [% END %]
52                                     [% END %]
53
54                                     [% IF ( GoogleJackets ) %]
55                                         [% IF ( item.browser_normalized_isbn ) %]
56                                             <div title="[% img_title | html %]" class="[% item.browser_normalized_isbn | html %]" id="gbs-thumbnail-preview[% loop.count | html %]"></div>
57                                         [% ELSE %]
58                                             <span class="no-image">No cover image available</span>
59                                         [% END %]
60                                     [% END %]
61                                     [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
62                                     [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
63                                     <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
64                                     [% END %]
65                                     [% IF ( BakerTaylorEnabled ) %]
66                                         [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %]
67                                         [% IF ( bt_id ) %]
68                                             <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
69                                         [% ELSE %]
70                                             <span class="no-image">No cover image available</span>
71                                         [% END %]
72                                     [% END %]
73                                     [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
74                                         [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
75                                         [% IF custom_cover_image_url %]
76                                             <span class="custom_cover_image">
77                                                 <img alt="Cover image" src="[% custom_cover_image_url | url %]" />
78                                             </span>
79                                         [% END %]
80                                     [% END %]
81
82                                 </a>
83                             [% END %]
84                         </td>
85                     [% END %]
86                     <td class="nav-cell" rowspan="2">
87                         [% IF shelfbrowser_next_item %]
88                             <div id="browser_next">
89                                 <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" aria-hidden="true"></i></a>
90                             </div>
91                         [% END %]
92                     </td>
93                 </tr>
94
95                 <tr>
96                     [% FOREACH item IN shelfbrowser_items %]
97                         <td class="top">
98                             [% item.itemcallnumber | html %]
99                             <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser">
100                                 [% INCLUDE 'biblio-title.inc' biblio=item %]
101                             </a>
102                         </td>
103                     [% END %]
104                 </tr>
105             </table>
106         </div>
107     [% END # /IF OpenOPACShelfBrowser %]
108 [% END # end of shelfbrowser block %]