Bug 22445: (follow-up) Use CSS to set a max-width for images - OPAC
[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 | html %][% 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 | html %][% ELSE %]Koha online[% END %] catalog recent comments" href="[% OPACBaseURL | url %]/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 | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink"><i class="fa fa-rss rsssearchicon" title="Subscribe to recent comments"></i></a></h3>
33                         <table class="table table-striped">
34                             [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
35                             [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
36                             [% FOREACH review IN reviews %]
37                                 <tr>
38                                     <td>
39                                         <p>
40                                             [% IF ( BiblioDefaultViewmarc ) %]
41                                                 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
42                                             [% ELSE %]
43                                                 [% IF ( BiblioDefaultViewisbd ) %]
44                                                     <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
45                                                 [% ELSE %]
46                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
47                                                 [% END %]
48                                             [% END %]
49                                             [% INCLUDE 'biblio-title.inc' biblio=review %]
50                                             </a>
51                                             [% IF ( review.author ) %]
52                                                 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 | html %]</a>
53                                             [% END %]
54                                         </p>
55                                         <p>
56                                             <span class="results_summary">
57                                                 <span class="label">Publication:</span>
58                                                 [% IF ( review.place ) %][% review.place | html %] [% END %]
59                                                 [% IF ( review.publishercode ) %][% review.publishercode | html %][% END %]
60                                                 [% IF ( review.publicationyear ) %]
61                                                     [% review.publicationyear | html %]
62                                                 [% ELSE %]
63                                                     [% IF ( review.copyrightdate ) %]
64                                                         [% review.copyrightdate | html %]
65                                                     [% END %]
66                                                 [% END %]
67                                                 [% IF ( review.pages ) %]. [% review.pages | html %][% END %]
68                                                 [% IF ( review.notes ) %], [% review.notes | html %][% END %]
69                                                 [% IF ( review.size ) %] [% review.size | html %][% END %]
70                                             </span>
71                                             [% IF ( review.summary ) %]
72                                                 <span class="result_summary">
73                                                     [% review.summary | html %]
74                                                 </span>
75                                             [% END %]
76                                             [% IF ( review.copyrightdate ) %]
77                                                 <span class="results_summary">
78                                                     <span class="label">Date:</span>
79                                                     [% review.copyrightdate | html %]</span>
80                                             [% END %]
81                                         </p>
82
83                                         <p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
84                                             [% IF ( review.avatarurl ) %]
85                                                 <img class="avatar" src="[% review.avatarurl | html %]" height="40" width="40" alt="" />
86                                             [% END %]
87                                             [% FILTER html_break %]
88                                                 [% review.review | html %]
89                                             [% END %]
90                                             <span class="commenter">
91                                                 [% IF review.your_comment %]
92                                                     Added [% review.datereviewed | $KohaDates %] by you
93                                                 [% ELSE %]
94                                                     [% IF ( review.borrowernumber && ShowReviewer != "none" ) %]
95                                                         Added [% review.datereviewed | $KohaDates %] by
96                                                         [% SWITCH ShowReviewer %]
97                                                             [% CASE 'full' %]
98                                                                 [% review.borrtitle | html %] [% review.firstname | html %] [% review.surname | html %]
99                                                             [% CASE 'first' %]
100                                                                 [% review.firstname | html %]
101                                                             [% CASE 'surname' %]
102                                                                 [% review.surname | html %]
103                                                             [% CASE 'firstandinitial' %]
104                                                                 [% review.firstname | html %] [% review.surname|truncate(2,'.') | html %]
105                                                             [% CASE 'username' %]
106                                                                 [% review.userid | html %]
107                                                         [% END %]
108                                                     [% END %]
109                                                 [% END %]
110                                             </span>
111                                         </p>
112                                     </td>
113                                     <td>
114                                         [% IF ( review.BiblioDefaultViewmarc ) %]
115                                             <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
116                                         [% ELSE %]
117                                             [% IF ( review.BiblioDefaultViewisbd ) %]
118                                                 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
119                                             [% ELSE %]
120                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
121                                             [% END %]
122                                         [% END %]
123                                         [% IF ( AdlibrisEnabled && review.normalized_isbn ) %]
124                                             <img src="[% AdlibrisURL | html %]?isbn=[% review.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
125                                         [% END %]
126                                         [% IF ( OPACAmazonCoverImages ) %]
127                                             [% IF ( review.normalized_isbn ) %]
128                                                 <img src="https://images-na.ssl-images-amazon.com/images/P/[% review.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
129                                             [% ELSE %]
130                                                 <span class="no-image">No cover image available</span>
131                                             [% END %]
132                                         [% END %]
133                                         [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
134                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% review.normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% review.normalized_upc | html %]&amp;oclc=[% review.normalized_oclc | html %]" alt="" class="thumbnail" />
135                                         [% END %]
136
137                                         [% IF ( GoogleJackets ) %]
138                                             [% IF ( review.normalized_isbn ) %]
139                                                 <div title="[% review.biblionumber |url %]" class="[% review.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
140                                             [% ELSE %]
141                                                 <span class="no-image">No cover image available</span>
142                                             [% END %]
143                                         [% END %]
144                                             </a>
145                                         [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
146                                         [% IF ( BakerTaylorEnabled ) %]
147                                             [% IF ( bt_id ) %]
148                                                 <a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
149                                             [% ELSE %]
150                                                 <span class="no-image">No cover image available</span>
151                                             [% END %]
152                                         [% END %]
153
154                                         [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
155                                             <a class="custom_cover_image" href="[% review.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% review.biblio_object.custom_cover_image_url | url %]" /></a>
156                                         [% END %]
157
158                                     </td>
159                                 </tr>
160                             [% END # / FOREACH review %]
161                         </table>
162
163                         [% IF ( PAGE_NUMBERS ) %]
164                             <div class="pages">
165                                 <!-- Row of numbers corresponding to showreviews result pages -->
166                                 [% IF ( previous_page_offset ) %]
167                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% previous_page_offset | html %]&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
168                                 [% ELSE %]
169                                     [% IF ( previous_page_first ) %]
170                                         <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=0&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
171                                     [% END %]
172                                 [% END %]
173                                 [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
174                                     [% IF ( PAGE_NUMBER.highlight ) %]
175                                         <span class="currentPage">[% PAGE_NUMBER.pg | html %]</span>
176                                     [% ELSE %]
177                                         <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% PAGE_NUMBER.offset | html %]&count=[% results_per_page | html %]">[% PAGE_NUMBER.pg | html %]</a>
178                                     [% END %]
179                                 [% END %]
180                                 [% IF ( next_page_offset ) %]
181                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% next_page_offset | html %]&count=[% results_per_page | html %]">Next &gt;&gt;</a>
182                                 [% END %]
183                             </div>
184                         [% END # / IF PAGE_NUMBERS %]
185                     </div> <!-- / #showreviews -->
186                 </div> <!-- / .span10/12 -->
187             </div> <!-- / .row-fluid -->
188         </div> <!-- / .container-fluid -->
189     </div> <!-- / .main -->
190
191 [% INCLUDE 'opac-bottom.inc' %]
192 [% BLOCK jsinclude %]
193 <script>
194     //<![CDATA[
195         $(document).ready(function(){
196             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
197         });
198     //]]>
199 </script>
200 [% END %]