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-showreviews.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Recent comments</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
8 <link rel="alternate" type="application/rss+xml" title="[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog recent comments" href="[% OPACBaseURL %]/cgi-bin/koha/opac-showreviews.pl?format=rss" />
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-showreviews' bodyclass='scrollto' %]
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="#">Recent comments</a></li>
17         </ul>
18
19         <div class="container-fluid">
20             <div class="row-fluid">
21                 [% IF ( OpacNav || OpacNavBottom ) %]
22                     <div class="span2">
23                         <div id="navigation">
24                             [% INCLUDE 'navigation.inc' %]
25                         </div>
26                     </div>
27                     <div class="span10">
28                 [% ELSE %]
29                     <div class="span12">
30                 [% END %]
31                    <div id="showreviews" class="searchresults maincontent">
32                         <h3>Recent comments <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to recent comments" title="Subscribe to recent comments" border="0" class="rsssearchicon"/></a></h3>
33                         <table class="table table-striped">
34                             [% FOREACH review IN reviews %]
35                                 <tr>
36                                     <td>
37                                         <p>
38                                             [% IF ( BiblioDefaultViewmarc ) %]
39                                                 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
40                                             [% ELSE %]
41                                                 [% IF ( BiblioDefaultViewisbd ) %]
42                                                     <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
43                                                 [% ELSE %]
44                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
45                                                 [% END %]
46                                             [% END %]
47                                             [% IF ( review.title ) %][% review.title %][% ELSE %]No title[% END %]
48                                             [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield |html %][% END %]
49                                             </a>
50                                             [% IF ( review.author ) %]
51                                                 by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author %]</a>
52                                             [% END %]
53                                         </p>
54                                         <p>
55                                             <span class="results_summary">
56                                                 <span class="label">Publication:</span>
57                                                 [% IF ( review.place ) %][% review.place %] [% END %]
58                                                 [% IF ( review.publishercode ) %][% review.publishercode %][% END %]
59                                                 [% IF ( review.publicationyear ) %]
60                                                     [% review.publicationyear %]
61                                                 [% ELSE %]
62                                                     [% IF ( review.copyrightdate ) %]
63                                                         [% review.copyrightdate %]
64                                                     [% END %]
65                                                 [% END %]
66                                                 [% IF ( review.pages ) %]. [% review.pages %][% END %]
67                                                 [% IF ( review.notes ) %], [% review.notes %][% END %]
68                                                 [% IF ( review.size ) %] [% review.size %][% END %]
69                                             </span>
70                                             [% IF ( review.summary ) %]
71                                                 <span class="result_summary">
72                                                     [% review.summary %]
73                                                 </span>
74                                             [% END %]
75                                             [% IF ( review.copyrightdate ) %]
76                                                 <span class="results_summary">
77                                                     <span class="label">Date:</span>
78                                                     [% review.copyrightdate %]</span>
79                                             [% END %]
80                                         </p>
81
82                                         <p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
83                                             [% IF ( review.avatarurl ) %]
84                                                 <img class="avatar" src="[% review.avatarurl %]" height="40" width="40" alt="" />
85                                             [% END %]
86                                             [% FILTER html_break %]
87                                                 [% review.review |html %]
88                                             [% END %]
89                                         <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed | $KohaDates %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
90                                         [% IF ( review.borrowernumber && ShowReviewer != "none" ) %] by
91                                             [% SWITCH ShowReviewer %]
92                                             [% CASE 'full' %]
93                                                 [% review.borrtitle %] [% review.firstname %] [% review.surname %]
94                                             [% CASE 'first' %]
95                                                 [% review.firstname %]
96                                             [% CASE 'surname' %]
97                                                 [% review.surname %]
98                                             [% CASE 'firstandinitial' %]
99                                                 [% review.firstname %] [% review.surname|truncate(2,'.') %]
100                                             [% CASE 'username' %]
101                                                 [% review.userid %]
102                                             [% END %]
103                                         [% END %][% END %]</span></p>
104                                     </td>
105                                     <td>
106                                         [% IF ( review.BiblioDefaultViewmarc ) %]
107                                             <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
108                                         [% ELSE %]
109                                             [% IF ( review.BiblioDefaultViewisbd ) %]
110                                                 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
111                                             [% ELSE %]
112                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
113                                             [% END %]
114                                         [% END %]
115
116                                         [% IF ( OPACAmazonCoverImages ) %]
117                                             [% IF ( review.normalized_isbn ) %]
118                                                 <img src="http://images.amazon.com/images/P/[% review.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
119                                             [% ELSE %]
120                                                 <span class="no-image">No cover image available</span>
121                                             [% END %]
122                                         [% END %]
123
124                                         [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
125                                             [% IF ( using_https ) %]
126                                                 <img src="https://secure.syndetics.com/index.aspx?isbn=[% review.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% review.normalized_upc %]&amp;oclc=[% review.normalized_oclc %]" alt="" class="thumbnail" />
127                                             [% ELSE %]
128                                                 <img src="http://www.syndetics.com/index.aspx?isbn=[% review.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% review.normalized_upc %]&amp;oclc=[% review.normalized_oclc %]" alt="" class="thumbnail" />
129                                             [% END %]
130                                         [% END %]
131
132                                         [% IF ( GoogleJackets ) %]
133                                             [% IF ( review.normalized_isbn ) %]
134                                                 <div style="block" title="[% review.biblionumber |url %]" class="[% review.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
135                                             [% ELSE %]
136                                                 <span class="no-image">No cover image available</span>
137                                             [% END %]
138                                         [% END %]
139                                             </a>
140                                         [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
141                                         [% IF ( BakerTaylorEnabled ) %]
142                                             [% IF ( bt_id ) %]
143                                                 <a href="https://[% review.BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL |html %][% bt_id %]" /></a>
144                                             [% ELSE %]
145                                                 <span class="no-image">No cover image available</span>
146                                             [% END %]
147                                         [% END %]
148                                     </td>
149                                 </tr>
150                             [% END # / FOREACH review %]
151                         </table>
152
153                         [% IF ( PAGE_NUMBERS ) %]
154                             <div class="pages">
155                                 <!-- Row of numbers corresponding to showreviews result pages -->
156                                 [% IF ( previous_page_offset ) %]
157                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% previous_page_offset %]">&lt;&lt; Previous</a>
158                                 [% ELSE %]
159                                     [% IF ( previous_page_first ) %]
160                                         <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=0">&lt;&lt; Previous</a>
161                                     [% END %]
162                                 [% END %]
163                                 [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
164                                     [% IF ( PAGE_NUMBER.highlight ) %]
165                                         <span class="currentPage">[% PAGE_NUMBER.pg %]</span>
166                                     [% ELSE %]
167                                         <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% PAGE_NUMBER.offset %]">[% PAGE_NUMBER.pg %]</a>
168                                     [% END %]
169                                 [% END %]
170                                 [% IF ( next_page_offset ) %]
171                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% next_page_offset %]">Next &gt;&gt;</a>
172                                 [% END %]
173                             </div>
174                         [% END # / IF PAGE_NUMBERS %]
175                     </div> <!-- / #showreviews -->
176                 </div> <!-- / .span10/12 -->
177             </div> <!-- / .row-fluid -->
178         </div> <!-- / .container-fluid -->
179     </div> <!-- / .main -->
180
181 [% INCLUDE 'opac-bottom.inc' %]
182 [% BLOCK jsinclude %]
183 <script type="text/javascript">
184     //<![CDATA[
185         $(document).ready(function(){
186             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
187         });
188     //]]>
189 </script>
190 [% END %]