Bug 21526: Use the 'url' filter when needed
[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"><img src="[% interface | html %]/[% theme | html %]/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                             [% 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                                             [% IF ( review.title ) %][% review.title | html %][% ELSE %]No title[% END %]
50                                             [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield | html %][% END %]
51                                             </a>
52                                             [% IF ( review.author ) %]
53                                                 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>
54                                             [% END %]
55                                         </p>
56                                         <p>
57                                             <span class="results_summary">
58                                                 <span class="label">Publication:</span>
59                                                 [% IF ( review.place ) %][% review.place | html %] [% END %]
60                                                 [% IF ( review.publishercode ) %][% review.publishercode | html %][% END %]
61                                                 [% IF ( review.publicationyear ) %]
62                                                     [% review.publicationyear | html %]
63                                                 [% ELSE %]
64                                                     [% IF ( review.copyrightdate ) %]
65                                                         [% review.copyrightdate | html %]
66                                                     [% END %]
67                                                 [% END %]
68                                                 [% IF ( review.pages ) %]. [% review.pages | html %][% END %]
69                                                 [% IF ( review.notes ) %], [% review.notes | html %][% END %]
70                                                 [% IF ( review.size ) %] [% review.size | html %][% END %]
71                                             </span>
72                                             [% IF ( review.summary ) %]
73                                                 <span class="result_summary">
74                                                     [% review.summary | html %]
75                                                 </span>
76                                             [% END %]
77                                             [% IF ( review.copyrightdate ) %]
78                                                 <span class="results_summary">
79                                                     <span class="label">Date:</span>
80                                                     [% review.copyrightdate | html %]</span>
81                                             [% END %]
82                                         </p>
83
84                                         <p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
85                                             [% IF ( review.avatarurl ) %]
86                                                 <img class="avatar" src="[% review.avatarurl | html %]" height="40" width="40" alt="" />
87                                             [% END %]
88                                             [% FILTER html_break %]
89                                                 [% review.review | html %]
90                                             [% END %]
91                                         <span style="font-size:87%;font-color:#CCC;">
92                                         [% IF review.your_comment %]
93                                             Added [% review.datereviewed | $KohaDates %] by you
94                                         [% ELSE %]
95                                         [% IF ( review.borrowernumber && ShowReviewer != "none" ) %]
96                                             Added [% review.datereviewed | $KohaDates %] by
97                                             [% SWITCH ShowReviewer %]
98                                             [% CASE 'full' %]
99                                                 [% review.borrtitle | html %] [% review.firstname | html %] [% review.surname | html %]
100                                             [% CASE 'first' %]
101                                                 [% review.firstname | html %]
102                                             [% CASE 'surname' %]
103                                                 [% review.surname | html %]
104                                             [% CASE 'firstandinitial' %]
105                                                 [% review.firstname | html %] [% review.surname|truncate(2,'.') | html %]
106                                             [% CASE 'username' %]
107                                                 [% review.userid | html %]
108                                             [% END %]
109                                         [% END %][% END %]</span></p>
110                                     </td>
111                                     <td>
112                                         [% IF ( review.BiblioDefaultViewmarc ) %]
113                                             <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
114                                         [% ELSE %]
115                                             [% IF ( review.BiblioDefaultViewisbd ) %]
116                                                 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
117                                             [% ELSE %]
118                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
119                                             [% END %]
120                                         [% END %]
121                                         [% IF ( AdlibrisEnabled && review.normalized_isbn ) %]
122                                             <img src="[% AdlibrisURL | html %]?isbn=[% review.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
123                                         [% END %]
124                                         [% IF ( OPACAmazonCoverImages ) %]
125                                             [% IF ( review.normalized_isbn ) %]
126                                                 <img src="https://images-na.ssl-images-amazon.com/images/P/[% review.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
127                                             [% ELSE %]
128                                                 <span class="no-image">No cover image available</span>
129                                             [% END %]
130                                         [% END %]
131                                         [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
132                                             <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" />
133                                         [% END %]
134
135                                         [% IF ( GoogleJackets ) %]
136                                             [% IF ( review.normalized_isbn ) %]
137                                                 <div title="[% review.biblionumber |url %]" class="[% review.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
138                                             [% ELSE %]
139                                                 <span class="no-image">No cover image available</span>
140                                             [% END %]
141                                         [% END %]
142                                             </a>
143                                         [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
144                                         [% IF ( BakerTaylorEnabled ) %]
145                                             [% IF ( bt_id ) %]
146                                                 <a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
147                                             [% ELSE %]
148                                                 <span class="no-image">No cover image available</span>
149                                             [% END %]
150                                         [% END %]
151                                     </td>
152                                 </tr>
153                             [% END # / FOREACH review %]
154                         </table>
155
156                         [% IF ( PAGE_NUMBERS ) %]
157                             <div class="pages">
158                                 <!-- Row of numbers corresponding to showreviews result pages -->
159                                 [% IF ( previous_page_offset ) %]
160                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% previous_page_offset | html %]&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
161                                 [% ELSE %]
162                                     [% IF ( previous_page_first ) %]
163                                         <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=0&count=[% results_per_page | html %]">&lt;&lt; Previous</a>
164                                     [% END %]
165                                 [% END %]
166                                 [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
167                                     [% IF ( PAGE_NUMBER.highlight ) %]
168                                         <span class="currentPage">[% PAGE_NUMBER.pg | html %]</span>
169                                     [% ELSE %]
170                                         <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>
171                                     [% END %]
172                                 [% END %]
173                                 [% IF ( next_page_offset ) %]
174                                     <a class="nav" href="/cgi-bin/koha/opac-showreviews.pl?offset=[% next_page_offset | html %]&count=[% results_per_page | html %]">Next &gt;&gt;</a>
175                                 [% END %]
176                             </div>
177                         [% END # / IF PAGE_NUMBERS %]
178                     </div> <!-- / #showreviews -->
179                 </div> <!-- / .span10/12 -->
180             </div> <!-- / .row-fluid -->
181         </div> <!-- / .container-fluid -->
182     </div> <!-- / .main -->
183
184 [% INCLUDE 'opac-bottom.inc' %]
185 [% BLOCK jsinclude %]
186 <script>
187     //<![CDATA[
188         $(document).ready(function(){
189             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
190         });
191     //]]>
192 </script>
193 [% END %]