Bug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-readingrecord.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your checkout history</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %]
7     <style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
8 [% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %]
11 [% INCLUDE 'masthead.inc' %]
12
13 <div class="main">
14     <ul class="breadcrumb">
15         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
16         <li><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]</a> <span class="divider">&rsaquo;</span></li>
17         <li><a href="#">Your checkout history</a></li>
18     </ul>
19
20     <div class="container-fluid">
21         <div class="row-fluid">
22             <div class="span2">
23                 <div id="navigation">
24                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
25                 </div>
26             </div>
27             <div class="span10">
28                 <div id="userreadingrecord">
29                     <h3>Checkout history</h3>
30
31                     [% IF READING_RECORD.size == 0 %]
32                         You have never borrowed anything from this library.
33                     [% ELSE %]
34                         <div id="opac-user-readingrec">
35                             <div class="resultscontrol resort">
36                                 <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
37                                     [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
38                                     <select name="order" id="order">
39                                         [% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
40                                         [% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
41                                     </select>
42                                     <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" />
43                                 </form>
44                             </div>
45
46                             [% IF limit %]
47                                 <p>
48                                     Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show all items</a>
49                                 </p>
50                             [% ELSE %]
51                                 <p>
52                                     Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show last 50 items</a>
53                                 </p>
54                             [% END %]
55
56                             [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %]
57                             <div id="tabs" class="toptabs">
58                                 <ul>
59                                     <li><a href="#tabs-container" id="tab_all">All</a></li>
60                                     <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
61                                     <li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li>
62                                 </ul>
63                             [% END %]
64                                 <div id="tabs-container" style="overflow:hidden">
65                                     <table id="readingrec" class="table table-bordered table-striped">
66                                         <thead>
67                                             <tr>
68                                                 <th style="display:none;">Type</th>
69                                                 <th class="nosort"></th>
70                                                 <th class="anti-the">Title</th>
71                                                 <th>Item type</th>
72                                                 <th>Call no.</th>
73                                                 <th class="title-string">Date</th>
74                                                 [% IF ( OPACMySummaryHTML ) %]
75                                                     <th>Links</th>
76                                                 [% END %]
77                                             </tr>
78                                         </thead>
79                                         <tbody>
80                                             [% FOREACH issue IN READING_RECORD %]
81                                                 <tr>
82                                                     <td style="display:none;">
83                                                       [% IF issue.onsite_checkout %]
84                                                         onsite
85                                                       [% ELSE %]
86                                                         checkout
87                                                       [% END %]
88                                                     </td>
89                                                 <td>
90                                                     [% IF  OPACAmazonCoverImages %]
91                                                         [% IF  issue.normalized_isbn %]
92                                                             <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
93                                                         [% ELSE %]
94                                                              <span class="no-image">No cover image available</span>
95                                                         [% END %]
96                                                     [% END %]
97
98                                                 [% IF GoogleJackets %]
99                                                     [% IF  issue.normalized_isbn %]
100                                                         <div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
101                                                     [% ELSE %]
102                                                        <span class="no-image">No cover image available</span>
103                                                     [% END %]
104                                                 [% END %]
105
106                                                 [% IF BakerTaylorEnabled %]
107                                                     [% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %]
108                                                     [% IF ( bt_id ) %]
109                                                        <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
110                                                     [% ELSE %]
111                                                        <span class="no-image">No cover image available</span>
112                                                     [% END %]
113                                                 [% END %]
114
115                                                 [% IF SyndeticsEnabled && SyndeticsCoverImages %]
116                                                     [% IF  using_https  %]
117                                                         <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% issue.normalized_upc %]&amp;oclc=[% issue.normalized_oclc %]" alt="" class="item-thumbnail" />
118                                                    [% ELSE %]
119                                                         <img src="http://www.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% issue.normalized_upc %]&amp;oclc=[% issue.normalized_oclc %]" alt="" class="item-thumbnail" />
120                                                    [% END %]
121                                                 [% END %]
122                                                 </td>
123                                                 <td>
124                                                 [% IF  issue.BiblioDefaultViewmarc %]
125                                                      <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF  issue.subtitle  %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
126                                                 [% ELSIF issue.BiblioDefaultViewisbd %]
127                                                      <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
128                                                 [% ELSE %]
129                                                      <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
130                                                 [% END %]
131                                                 <span class="item-details">[% issue.author %]</span>
132                                                 </td>
133                                                 <td>
134                                                 [% UNLESS ( noItemTypeImages ) %]
135                                                     [% IF ( issue.imageurl ) %]
136                                                         <img src="[% issue.imageurl %]" alt="" />
137                                                     [% END %]
138                                                 [% END %]
139                                                 <span class="tdlabel">Item type:</span>
140                                                 [% issue.description %]</td>
141                                                 <td>
142                                                 <span class="tdlabel">Call number:</span>
143                                                 [% issue.itemcallnumber %]
144                                                 </td>
145                                                 <td>
146                                                     [% IF issue.returndate %]
147                                                         <span class="tdlabel">Check-in date:</span>
148                                                         <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
149                                                     [% ELSE %]
150                                                         <span title="Checked out"><em>(Checked out)</em></span>
151                                                     [% END %]
152                                                 </td>
153                                                 [% IF OPACMySummaryHTML %]
154                                                     <td>[% issue.MySummaryHTML %]</td>
155                                                 [% END %]
156                                                 </tr>
157                                             [% END # / FOREACH issue %]
158                                         </tbody>
159                                     </table>
160                                 </div> <!-- / .tabs-container -->
161                             [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %]
162                                 </div> <!-- /#tabs -->
163                             [% END %]
164                         </div> <!-- / .opac-user-readingrec -->
165                     [% END # / IF READING_RECORD.size %]
166                 </div> <!-- / .userreadingrecord -->
167             </div> <!-- / .span10 -->
168         </div> <!-- / .row-fluid -->
169     </div> <!-- / .container-fluid -->
170 </div> <!-- / .main -->
171
172 [% INCLUDE 'opac-bottom.inc' %]
173 [% BLOCK jsinclude %]
174 [% INCLUDE 'datatables.inc' %]
175 <script type="text/javascript">
176 //<![CDATA[
177     $(document).ready(function(){
178         [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
179             $('#sortsubmit').hide();
180         $('#order').change(function() {
181             $('#sortform').submit();
182         });
183
184         var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
185             "sPaginationType": "four_button",
186             "aoColumnDefs": [
187                 { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
188                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
189                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
190             ]
191         }));
192         var tabs = $("#tabs").tabs({
193             select: function(e, ui) {
194                 var id = $(ui.tab).attr("id");
195                 if ( id == "tab_checkout" ) {
196                     table.fnFilter("checkout", 0);
197                 } else if ( id == "tab_onsite_checkout" ) {
198                     table.fnFilter("onsite", 0);
199                 } else { // all
200                     table.fnFilter('', 0);
201                 }
202             }
203         });
204     });
205 //]]>
206 </script>
207 [% END %]