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-detail.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE Branches %]
4 [% USE AuthorisedValues %]
5 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %]
6 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %]
7
8 [% ShowCourseReservesHeader = 0 %]
9 [% IF Koha.Preference( 'UseCourseReserves' ) == 1 %]
10     [% FOREACH ITEM_RESULT IN itemloop %]
11        [% IF ITEM_RESULT.course_reserves %]
12            [% FOREACH r IN ITEM_RESULT.course_reserves %]
13                [% IF r.course.enabled == 'yes' %]
14                    [% ShowCourseReservesHeader = 1 %]
15                [% END %]
16            [% END %]
17         [% END %]
18     [% END %]
19 [% END %]
20
21 [% IF ( using_https ) %]
22     [% SET protocol = "https://" %]
23 [% ELSE %]
24     [% SET protocol = "http://" %]
25 [% END %]
26 [% INCLUDE 'doc-head-open.inc' %]
27 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]</title>
28 [% INCLUDE 'doc-head-close.inc' %]
29 [% IF ( bidi ) %]
30   [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left.css" />[% END %]
31 [% END %]
32 [% IF ( OpacStarRatings != 'disable' ) %]
33     [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/jquery.rating.css" />[% END %]
34 [% END %]
35 [% INCLUDE greybox.inc %]
36 </head>
37 [% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %]
38 [% INCLUDE 'masthead.inc' %]
39
40 <div class="main">
41     <ul class="breadcrumb">
42         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
43         <li><a href="#">Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]</a></li>
44     </ul>
45
46     <div class="container-fluid">
47         <div class="row-fluid">
48             <div class="span9">
49                 <div id="catalogue_detail_biblio" class="maincontent">
50
51                     <div id="bookcover">
52                     [% IF ( OPACLocalCoverImages ) %]
53                         <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>
54                     [% END %]
55                     [% IF ( OPACAmazonCoverImages ) %]
56                         [% IF ( OPACurlOpenInNewWindow ) %]
57                             <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">
58                         [% ELSE %]
59                             <a href="http://www.amazon[% AmazonTld %]/dp/[% normalized_isbn %]">
60                         [% END %]
61                         [% IF ( using_https ) %]
62                             <img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="Cover image" /></a>
63                         [% ELSE %]
64                             <img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="Cover image" /></a>
65                         [% END %]
66                     [% END %]
67
68                     [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
69                         [% IF ( content_identifier_exists ) %]
70                             [% IF ( using_https ) %]
71                                 <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/[% SyndeticsCoverImageSize %].GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% normalized_upc %]&amp;oclc=[% normalized_oclc %]" alt="" class="thumbnail" />
72                             [% ELSE %]
73                                 <img src="http://www.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/[% SyndeticsCoverImageSize %].GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% normalized_upc %]&amp;oclc=[% normalized_oclc %]" alt="" class="thumbnail" />
74                             [% END %]
75
76                         [% ELSE %]
77                             <span class="no-image">No cover image available</span>
78                         [% END %]
79                     [% END %]
80
81                     [% IF ( GoogleJackets ) %]
82                         <div title="[% biblionumber |url %]" class="[% normalized_isbn %]" id="gbs-thumbnail-preview"></div>
83                     [% END %]
84                     [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
85                       [% coce_id = normalized_ean || normalized_isbn %]
86                       <div style="block" title="[% biblionumber |url %]" class="[% coce_id %]" id="coce-thumbnail-preview"></div>
87                     [% END %]
88                     [% IF OpenLibraryCovers %]
89                         <div title="[% biblionumber |url %]" class="[% normalized_isbn %]" id="openlibrary-thumbnail-preview"></div>
90                     [% END %]
91                     [% bt_id = ( normalized_upc || normalized_isbn ) %]
92                     [% IF ( BakerTaylorEnabled && bt_id ) %]
93                         [% IF BakerTaylorBookstoreURL %]
94                             [% IF ( OPACurlOpenInNewWindow ) %]
95                                 <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]" target="_blank"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
96                             [% ELSE %]
97                                 <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
98                             [% END %]
99                         [% ELSE %]
100                             <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" />
101                         [% END %]
102                     [% END %]
103                     </div><!-- / #bookcover -->
104
105                     <abbr class="unapi-id" title="koha:biblionumber:[% biblionumber %]"><!-- unAPI --></abbr>
106                     [% IF ( ocoins ) # COinS / Openurl %]
107                         <span class="Z3988" title="[% ocoins %]"></span>
108                     [% END %]
109
110                     <div id="views">
111                         <span class="view"><span id="Normalview">Normal view</span></span>
112                         <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber %]">MARC view</a></span>
113                         [% IF ( ISBD ) %]<span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber %]">ISBD view</a></span>[% END %]
114                     </div>
115                     [% IF ( OPACXSLTDetailsDisplay ) %]
116                         [% XSLTBloc %]
117                     [% ELSE %]
118                         <h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %]</span>[% END %]</h1>
119                         [% IF ( author ) %]<h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author |html %]</a></h5>[% END %]
120
121                         <span class="results_summary">[% UNLESS ( item_level_itypes ) %]
122                             [
123                             [% IF ( description ) %]
124                                 [% description %]
125                             [% ELSE %]
126                                 [% itemtype %]
127                             [% END %]
128                             ] [% END %]
129                             [% IF ( unititle ) %], [% unititle %][% END %]
130                         </span>
131
132                         [% IF ( MARCAUTHORS ) %]
133                             <div class="results_summary">
134                                 <span class="label">Additional authors:</span>
135                                 [% IF OPACPopupAuthorsSearch %]
136                                     <!-- Author search term selection modal -->
137                                     <div id="authorSearch" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="authorSearchLabel" aria-hidden="true">
138                                         <div class="modal-header">
139                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
140                                             <h3 id="authorSearchLabel">Select the item(s) to search</h3>
141                                         </div>
142                                         <div class="modal-body">
143                                             <input type="checkbox" onchange="checkAll(this, '#authorsList')" /> <b>All</b>
144                                             <ul id="authorsList">
145                                                 [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
146                                                     <li>
147                                                         [% IF (MARCAUTHOR.authoritylink) %]
148                                                             <input type="checkbox" name="checkbox"
149                                                                 id="author_[% loop.count %]"
150                                                                 onclick="makeAuthorRequest()"
151                                                                 value="an:[% MARCAUTHOR.authoritylink %]" />
152                                                         [% ELSE %]
153                                                             <input type="checkbox" name="checkbox"
154                                                                 id="author_[% loop.count %]"
155                                                                 onclick="makeAuthorRequest()"
156                                                                 value="au,wrdl:[% FOREACH SUBFIELD IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% SUBFIELD.value |url %][% UNLESS (loop.last) %]+[% END %][% END %]" />
157                                                         [% END %]
158                                                         <label for="author_[% loop.count %]">
159                                                             [% FOREACH SUBFIELD IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
160                                                                 [% SUBFIELD.value %]
161                                                             [% END %]
162                                                         </label>
163                                                     </li>
164                                                 [% END # /FOREACH MARCAUTHORS %]
165                                             </ul>
166                                         </div>
167                                         <div class="modal-footer">
168                                             <a id="validAuthorSearch" href="#" class="btn btn-primary">Search</a>
169                                             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
170                                         </div>
171                                     </div>
172                                 [% END # /OPACPopupAuthorsSearch %]
173
174                                 [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
175                                     [% authorsloop = loop %]
176                                     [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
177                                         [% MARCAUTHOR_SUBFIELDS_LOO.separator %]
178                                         [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %]
179                                             <a role="button" data-toggle="modal" title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
180                                             class="showauthors" data-count="[% authorsloop.count %]"
181                                             href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#authorSearch">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>
182                                         [% ELSE %]
183                                             <a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]"
184                                             class="showauthors" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>
185                                         [% END %]
186                                     [% END %]
187                                     [% IF (MARCAUTHOR.authoritylink) %]
188                                         <a class='authlink' href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png"></a>
189                                     [% END %]
190                                     [% IF IDREF and MARCAUTHOR.unimarc3 %]
191                                         <a href="/cgi-bin/koha/opac-idref.pl?unimarc3=[% MARCAUTHOR.unimarc3 %]" title="IdRef" rel="gb_page_center[600,500]">IdRef</a>
192                                     [% END %]
193                                     [% UNLESS ( loop.last ) %]|[% END %]
194                                 [% END # /FOREACH MARCAUTHORS %]
195                             </div>
196                         [% END # IF MARCAUTHORS %]
197
198                         [% IF ( MARCSERIES ) %]
199                             <span class="results_summary series"><span class="label">Series:</span>
200                                 [% FOREACH MARCSERIE IN MARCSERIES %]
201                                     [% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %]
202                                         [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %]
203                                             <a href="/cgi-bin/koha/opac-search.pl?q=se:[% MARCSERIES_SUBFIELDS_LOO.value |url %]">[% MARCSERIES_SUBFIELDS_LOO.value %]</a>
204                                         [% END %]
205                                         [% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %]
206                                             . [% MARCSERIES_SUBFIELDS_LOO.volumenum %]
207                                         [% END %]
208                                     [% END %]
209                                     [% UNLESS ( loop.last ) %]|[% END %]
210                                 [% END # / FOREACH MARCSERIES %]
211                             </span>
212                         [% END # /MARCSERIES %]
213
214                         [% IF ( editionstatement ) %]
215                             <span class="results_summary edition"><span class="label">Edition statement:</span>[% editionstatement %][% IF ( editionresponsibility ) %]/[% editionresponsibility %][% END %]</span>
216                         [% END %]
217                         [% IF ( publishercode ) %]
218                             <span class="results_summary publisher"><span class="label">Published by :</span>
219                                 <a href="/cgi-bin/koha/opac-search.pl?q=pb:[% publishercode |url %] ">
220                                     [% publishercode |html %]
221                                 </a> [% IF ( place ) %]([% place %])[% END %] [% IF ( publicationyear ) %], [% publicationyear %][% END %]
222                             </span>
223                         [% END %]
224
225                         [% IF ( pages ) %]
226                             <span class="results_summary physical"><span class="label">Physical details:</span> [% pages %] [% illus %] [% size %]</span>
227                         [% END %]
228
229                         [% IF ( MARCISBNS ) %]
230                             <span class="results_summary isbn"><span class="label">ISBN:</span>[% FOREACH MARCISBN IN MARCISBNS %][% MARCISBN %][% IF ( loop.last ) %].[% ELSE %]; [% END %][% END %]</span>
231                         [% ELSE %]
232                             [% IF ( normalized_isbn ) %]
233                                 <span class="results_summary isbn"><span class="label">ISBN: </span>[% normalized_isbn %]</span>
234                             [% END %]
235                         [% END %]
236
237                         [% IF ( issn ) %]
238                             <span class="results_summary issn"><span class="label">ISSN:</span>[% issn %]</span>
239                         [% END %]
240
241                         [% IF ( collectiontitle ) %]
242                             <span class="results_summary collection"><span class="label">Collection: </span>
243                                 [% collectiontitle %]
244                                 [% IF ( collectionissn ) %], ISSN [% collectionissn %]    [% END %]
245                                 [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %]
246
247                             </span>
248                         [% END %]
249
250                         [% IF ( unititles ) %]
251                             <span class="results_summary unititle"><span class="label">Uniform titles:</span>
252                                 [% FOREACH unititle IN unititles %]
253                                     [% unititle.unititle %] ;
254                                 [% END %]
255                             </span>
256                         [% END %]
257
258                         [% IF ( MARCSUBJCTS ) %]
259                             <div class="results_summary subject">
260                                 <span class="label">Subject(s):</span>
261
262                                 [% IF OPACPopupAuthorsSearch %]
263                                     <!-- Search term selection modal -->
264                                     <div id="subjectSearch" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="subjectSearchLabel" aria-hidden="true">
265                                         <div class="modal-header">
266                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
267                                             <h3 id="subjectSearchLabel">Select the term(s) to search</h3>
268                                         </div>
269                                         <div id="subjectsList" class="modal-body">
270                                             <input type="checkbox" id="all_subjects" onchange="checkAll(this, '#subjectsList')" />
271                                             <label for="all_subjects">
272                                                 <b>All</b>
273                                             </label>
274                                             [% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
275                                                 [% subjectsloop = loop %]
276                                                 [% IF MARCSUBJCT.authoritylink %]
277                                                     <ul id="subjectsList[% loop.count %]" data-authid="[% MARCSUBJCT.authoritylink %]">
278                                                 [% ELSE %]
279                                                     <ul id="subjectsList[% loop.count %]">
280                                                 [% END %]
281                                                 [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
282                                                     <li>
283                                                         <input type="checkbox" onclick="makeSubjectRequest()" name="checkbox" id="subject_[% subjectsloop.count %]_[% loop.count %]" value="su,wrdl:[% SUBFIELD.value |url %]" />
284                                                         <label for="subject_[% subjectsloop.count %]_[% loop.count %]">
285                                                             [% SUBFIELD.value %]
286                                                         </label>
287                                                     </li>
288                                                 [% END %]
289                                                 </ul>
290                                             [% END %]
291                                         </div>
292                                         <div class="modal-footer">
293                                             <a href="#" id="validSubjectSearch" class="btn btn-primary">Search</a>
294                                             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
295                                         </div>
296                                     </div>
297                                 [% END # /OPACPopupAuthorsSearch%]
298
299                                 [% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
300                                     [% subjectsloop = loop %]
301                                     [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
302                                         [% SUBFIELD.separator %]
303                                         [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %]
304                                             <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a>
305                                         [% ELSE %]
306                                             <a title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value %]</a>
307                                         [% END %]
308                                     [% END %]
309                                     [% IF (MARCSUBJCT.authoritylink) %]
310                                         <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png" /></a>
311                                     [% END %]
312                                     [% UNLESS ( loop.last ) %] | [% END %]
313                                 [% END # / FOREACH MARCSUBJCTS %]
314                             </div>
315                         [% ELSE # /IF MARCSUBJCTS %]
316                             [% IF ( subjects ) %]<span class="results_summary"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject %]</a> | [% END %]</span>[% END %]
317                         [% END %]
318
319                         [% IF ( copyrightdate ) %]
320                             <span class="results_summary year"><span class="label">Year: </span>[% copyrightdate %]</span>
321                         [% END %]
322
323                         [% UNLESS ( item_level_itypes ) %]
324                             [% IF ( imgeurl ) %]
325                                 <img src="[% imageurl %]" alt="" />
326                             [% END %]
327                             <span class="results_summary itemtype"><span class="label">Item type: </span>
328                                 [% IF ( description ) %]
329                                     [% description %]
330                                 [% ELSE %]
331                                     [% itemtype %]
332                                 [% END %]
333                             </span>
334                         [% END %]
335
336                         [% IF ( MARCURLS ) %]
337                             <div class="results_summary online_resources"><span class="label">Online resources:</span>
338                                 <ul>
339                                     [% FOREACH MARCurl IN MARCURLS %]
340                                         <li>[% IF ( MARCurl.part ) %][% MARCurl.part %]<br />[% END %]
341
342                                         [% IF ( OPACurlOpenInNewWindow ) %]
343                                             [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
344                                                 <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&amp;biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]" target="_blank">
345                                             [% ELSE %]
346                                                 <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">
347                                             [% END %]
348                                         [% ELSE %]
349                                             [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
350                                                 <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&amp;biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]">
351                                             [% ELSE %]
352                                                 <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">
353                                             [% END %]
354                                         [% END %]
355
356                                         [% MARCurl.linktext %]</a>
357                                             [% IF ( MARCurl.notes ) %]
358                                                 <ul>
359                                                     [% FOREACH note IN MARCurl.notes %]
360                                                         <li>[% note.note %]</li>
361                                                     [% END %]
362                                                 </ul>
363                                             [% END %]
364                                         </li>
365                                     [% END # /FOREACH MARCURLS %]
366                                 </ul>
367                             </div>
368                         [% END # / IF MARCURLS %]
369                     [% END # / IF OPACXSLTDetailsDisplay %]
370
371                     [% IF ( AuthorisedValueImages && authorised_value_images ) %]
372                         <div class="authorised_value_images">
373                             [% FOREACH authorised_value_image IN authorised_value_images %]
374                                 <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.label %]" title="[% authorised_value_image.label %]" />
375                             [% END %]
376                         </div>
377                     [% END # / AuthorisedValueImages && authorised_value_images %]
378
379                     <!-- This puts the LTFL reviews in, and if TabbedView is not set, puts the remaining content above the Tabs instead of in them -->
380                     [% IF ( LibraryThingForLibrariesID ) %]
381                         [% UNLESS ( LibraryThingForLibrariesTabbedView ) %]
382                             <div class="results_summary"><div id="ltfl_related" class="ltfl"></div></div>
383                             <div class="results_summary"><div id="ltfl_similars" class="ltfl"></div></div>
384                             <div class="results_summary"><div id="ltfl_tagbrowse" class="ltfl"></div></div>
385                         [% END %]
386                         <span class="results_summary">
387                             <span class="label">Reviews from LibraryThing.com:</span>
388                             <span style="display: block;" class="ltfl_reviews"></span>
389                         </span>
390                     [% END # / LibraryThingForLibrariesID %]
391
392                     <!--This grabs all of the lists a bib record appears in -->
393                     [% IF ( GetShelves ) %]
394                         <span class="results_summary lists"><span class="label">List(s) this item appears in: </span>
395                         [% FOREACH GetShelve IN GetShelves %]
396                             <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
397                             [% IF ( loop.last ) %][% ELSE %]|[% END %]
398                         [% END %]
399                         </span>
400                     [% END # / GetShelves %]
401
402                     [% IF ( TagsShowEnabled ) %]
403                         <div class="results_summary tags">
404                         [% IF ( TagLoop ) %]
405                             <span class="label">Tags from this library:</span>
406                             <ul id="tagslist">
407                                 [% FOREACH TagLoo IN TagLoop %]
408                                     <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a> <span class="weight">([% TagLoo.weight_total %])</span>
409                                     [% IF ( loop.last ) %][% ELSE %], [% END %]
410                                     </li>
411                                 [% END %]
412                             </ul>
413                         [% ELSE %]
414                             <span class="label">Tags from this library:</span> <span class="notags">No tags from this library for this title.</span>
415                         [% END %]
416                         [% IF ( TagsInputEnabled ) %] <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add tag(s)</a> [% END %]
417                         </div>
418                     [% END # /IF TagsShowEnabled %]
419
420                     [% IF ( TagsInputEnabled ) %]
421                       <div class="results_summary tagsinput">
422                             [% IF ( loggedinusername ) %]
423                                 <form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;">
424                                     <label for="newtag[% biblionumber %]">New tag(s), separated by a comma:</label>
425                                     <input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" type="text"/>
426                                     <input name="tagbutton" class="btn btn-small tagbutton" title="[% biblionumber %]" type="submit" value="Add" />
427                                     <a class="cancel_tag_add" id="cancel[% biblionumber %]" href="#">(done)</a>
428                                 </form>
429                                 <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;">
430                                     Tag status here.
431                                 </span>
432                             [% ELSE %]
433                                 <span id="login4tags">Log in to add tags.</span>
434                             [% END %]
435                         </div>
436                     [% END # / IF TagsInputEnabled %]
437
438                     [% IF ( SyndeticsEnabled ) %]
439                         [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %]
440                             <span class="results_summary">
441                                 <span class="label">Series information:</span>
442                                 [% IF ( using_https ) %]
443                                     <a target="_blank" href="https://secure.syndetics.com/ffseries.aspx?isbn=[% normalized_isbn %]&amp;type=series&amp;num=1&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]">Click to open in new window</a>
444                                 [% ELSE %]
445                                     <a target="_blank" href="http://www.syndetics.com/ffseries.aspx?isbn=[% normalized_isbn %]&amp;type=series&amp;num=1&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]">Click to open in new window</a>
446                                 [% END %]
447                             </span>
448                         [% END # / IF SyndeticsSeries && SyndeticsSERIES1Exists%]
449                         [% IF ( SyndeticsAVPROFILEExists ) %]
450                             <span class="results_summary">
451                                 <span class="label">Audiovisual profile:</span>
452                                 [% IF ( using_https ) %]
453                                     <a target="_blank" href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/avprofile.html&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]&amp;type=xw10">Click to open in new window</a>
454                                 [% ELSE %]
455                                     <a target="_blank" href="http://www.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/avprofile.html&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]&amp;type=xw10">Click to open in new window</a>
456                                 [% END %]
457                             </span>
458                         [% END # / IF SyndeticsAVPROFILEExists %]
459
460                         [% IF ( SyndeticsFICTIONExists ) %]
461                             <span class="results_summary">
462                             <span class="label">Fiction notes:</span>
463                                 [% IF ( using_https ) %]
464                                     <a target="_blank" href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/fiction.html&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]&amp;type=xw10">Click to open in new window</a>
465                                 [% ELSE %]
466                                     <a target="_blank" href="http://www.syndetics.com/index.aspx?isbn=[% normalized_isbn %]/fiction.html&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]&amp;type=xw10">Click to open in new window</a>
467                                 [% END %]
468                             </span>
469                         [% END # / IF SyndeticsFICTIONExists %]
470
471                         [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %]
472                             <span class="results_summary">
473                                 <span class="label">Awards:</span>
474                                 [% IF ( using_https ) %]
475                                     <a target="_blank" href="https://secure.syndetics.com/ffawards.aspx?isbn=[% normalized_isbn %]&amp;type=awards&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]">Click to open in new window</a>
476                                 [% ELSE %]
477                                     <a target="_blank" href="http://www.syndetics.com/ffawards.aspx?isbn=[% normalized_isbn %]&amp;type=awards&amp;client=[% SyndeticsClientCode %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc %][% END %]">Click to open in new window</a>
478                                 [% END %]
479                             </span>
480                         [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %]
481                     [% END # / IF SyndeticsEnabled%]
482
483                     [% IF ( OpacStarRatings != 'disable' ) %]
484                         <form method="post" action="/cgi-bin/koha/opac-ratings.pl">
485                             <div class="results_summary ratings">
486
487                                 [% FOREACH i  IN [ 1 2 3 4 5  ] %]
488                                     [% IF rating_avg == i && borrowernumber %]
489                                         <input class="auto-submit-star" type="radio" name="rating"  value="[% i %]"  checked="checked" />
490                                     [% ELSIF rating_avg == i %]
491                                         <input class="auto-submit-star" type="radio" name="rating" value="[% i %]" checked="checked" disabled="disabled" />
492                                     [% ELSIF borrowernumber  %]
493                                         <input class="auto-submit-star" type="radio" name="rating" value="[% i %]" />
494                                     [% ELSE   %]
495                                         <input class="auto-submit-star" type="radio" name="rating" value="[% i %]" disabled="disabled" />
496                                     [% END %]
497                                 [% END %]
498
499                                 <!-- define some hidden vars for ratings -->
500
501                                 <input  type="hidden" name='biblionumber'  value="[% biblionumber %]" />
502                                 <input  type="hidden" name='rating_value' id='rating_value' value="[% rating_value %]" />
503                                 <input  type="hidden" name='rating_total' id='rating_total' value="[% rating_total %]" />
504                                 <input  type="hidden" name='rating_avg_int' id='rating_avg_int' value="[% rating_avg_int %]" />
505
506                                 [% UNLESS ( rating_readonly ) %]&nbsp;  <input name="rate_button" type="submit" value="Rate me" />[% END %]&nbsp;
507
508                                 [% IF ( rating_value ) %]
509                                     <span id="rating_value_text">your rating: [% rating_value %], </span>
510                                 [% ELSE %]
511                                     <span id="rating_value_text"></span>
512                                 [% END %]
513
514                                 <span id="rating_text">average rating: [% rating_avg_int %] ([% rating_total %] votes)</span>
515                             </div>
516                         </form>
517                     [% END # / IF OpacStarRatings != 'disable' %]
518
519                     [% IF ( BakerTaylorContentURL ) %]
520                         <span class="results_summary">
521                         <span class="label">Enhanced content: </span>
522                               [% IF ( OPACurlOpenInNewWindow ) %]<a href="[% BakerTaylorContentURL |html %]" target="_blank">Content Cafe</a>[% ELSE %]<a href="[% BakerTaylorContentURL |html %]">Content Cafe</a>[% END %]
523                         </span>
524                     [% END # / IF BakerTaylorContentURL %]
525
526                     [% IF ( NovelistSelectProfile ) %]
527                         [% IF ( NovelistSelectView == 'above') %]
528                             <span class="results_summary">
529                             <span class="label">Novelist Select: </span>
530                             <div data-novelist-novelistselect=[% normalized_isbn %]></div>
531                             </span>
532                         [% END %]
533                     [% END # / IF NovelistSelectProfile %]
534
535                     [% IF ( Babeltheque ) %]
536                         <input type="hidden" name="BW_id_isbn" id="BW_id_isbn" value="[% normalized_isbn %]"/>
537                         <div id="BW_notes"></div>
538                         <div id="BW_critiques"></div>
539                         <div id="BW_critiques_pro"></div>
540                         <div id="BW_citations"></div>
541                     [% END # / IF Babeltheque%]
542
543                 </div> <!-- / #catalogue_detail_biblio -->
544
545                 <div id="bibliodescriptions" class="toptabs">
546
547                     <ul>
548                         [% IF ( defaulttab == 'holdings' ) %]
549                             <li id="tab_holdings" class="ui-tabs-active">
550                         [% ELSE %]
551                             <li id="tab_holdings">
552                         [% END %]
553                             <a href="#holdings">[% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %] [% UNLESS too_many_items %] ( [% itemloop.size || 0 %] )[% END %]</a>
554                         </li>
555                         [% IF (SeparateHoldings) %]
556                             <li><a href="#otherholdings">Other holdings ( [% otheritemloop.size || 0 %] )</a></li>
557                         [% END %]
558                         [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %]
559                             <li id="tab_descriptions"> <a href="#descriptions">Title notes</a></li>
560                         [% END %]
561                         [% IF ( SYNDETICS_TOC ) %]
562                             <li id="tab_toc"> <a href="#toc">TOC</a></li>
563                         [% END %]
564                         [% IF ( SyndeticsEnabled ) %]
565                             [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %]
566                                 <li id="tab_excerpt"> <a href="#excerpt">Excerpt</a></li>
567                             [% END %]
568                             [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %]
569                                 <li id="tab_reviews"> <a href="#reviews">Reviews</a></li>
570                                 <li id="tab_LTFLreviews">
571                                     [% IF ( using_https ) %]
572                                         <script src="https://www.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
573                                         <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking <a href="https://www.librarything.com/forlibraries/noscript.php?id=[% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
574                                     [% ELSE %]
575                                         <script src="http://www.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
576                                         <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking <a href="http://www.librarything.com/forlibraries/noscript.php?id=[% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
577                                     [% END %]
578                                 </li>
579                             [% END %]
580                             [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
581                                 <li id="tab_anotes"> <a href="#anotes">About the author</a></li>
582                             [% END %]
583                         [% END # / IF SyndeticsEnabled %]
584
585                         [% IF ( LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView ) %]
586                             <li id="tab_LFTLSimilarItems"> <a href="#LFTLSimilarItems">Similar items</a></li>
587                             <li id="tab_LTFLTagBrowse"> <a href="#LTFLTagBrowse">Tag browser</a></li>
588                         [% END %]
589
590                         [% IF ( subscriptionsnumber ) %]
591                             [% IF ( defaulttab == 'subscriptions' ) %]<li id="tab_subscriptions" class="ui-tabs-active">[% ELSE %]<li id="tab_subscriptions">[% END %]
592                                 <a href="#subscriptions">Subscriptions</a>
593                             </li>
594                         [% END %]
595
596                         [% IF Koha.Preference( 'reviewson' ) == 1 %]
597                             <li id="tab_comments"><a href="#comments">Comments ( [% reviews.size || 0 %] )</a></li>
598                         [% END %]
599
600                         [% IF ( NovelistSelectProfile ) %]
601                             [% IF ( NovelistSelectView == 'tab') %]
602                                 <li id="tab_NovelistSelect"> <a href="#NovelistSelect">Novelist Select</a></li>
603                             [% END %]
604                         [% END %]
605
606                         [% IF ( OPACFRBRizeEditions && XISBNS ) %]
607                             <li id="tab_editions"><a href="#editions">Editions</a></li>
608                         [% END %]
609
610                         [% IF ( serialcollection ) %]
611                             [% IF ( defaulttab == 'serialcollection' ) %]<li id="tab_serialcollection" class="ui-tabs-active">[% ELSE %]<li id="tab_serialcollection">[% END %]
612                                 <a href="#serialcollection">Serial collection</a>
613                             </li>
614                         [% END %]
615
616                         [% IF ( OPACLocalCoverImages && localimages.size ) %]
617                             <li id="tab_images"><a href="#images">Images</a></li>
618                         [% END %]
619
620                         [% IF ( HTML5MediaEnabled && HTML5MediaSets ) %]
621                             <li id="tab_html5media"><a href="#html5media">Play media</a></li>
622                         [% END %]
623
624                         [% IF ( IDreamBooksReviews ) %]
625                             <li id='tab_idb_critic_reviews' style="display:none;"><a href='#idb_critic_reviews'>Book reviews by critics ( XXX )</a></li>
626                         [% END %]
627                     </ul>
628
629                     [% IF ( serialcollection ) %]
630                         <div id="serialcollection">
631                             <table id="serialcollectiont" class="table table-bordered table-striped">
632                             <thead>
633                                 <tr>
634                                     <th id="serial_library">Library</th>
635                                     <th id="serial_collection">Serial collection</th>
636                                     <th id="serial_itemcallnumber">Item call number</th>
637                                 </tr>
638                             </thead>
639                             <tbody>
640                             [% FOREACH serialcollection IN serialcollections %]
641                                 <tr>
642                                 <td>[% serialcollection.branch %]</td>
643                                 <td>[% serialcollection.text %]</td>
644                                 <td>[% serialcollection.itemcallnumber %]</td>
645                                 </tr>
646                             [% END %]
647                             </tbody>
648                             </table>
649                         </div>
650                     [% END # / IF serialcollection %]
651
652
653                     <div id="holdings">
654                         [% IF too_many_items %]
655                             <p>This record has many physical items ([% items_count %]). <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1">Click here to view them all.</a></p>
656                         [% ELSIF ( itemloop.size ) %]
657                             [% INCLUDE items_table items=itemloop tab="holdings" %]
658                             [% IF Koha.Preference('OPACAcquisitionDetails') and Koha.Preference('AcqCreateItem') != 'ordering' and acquisition_details.total_quantity > 0 %]
659                               [% IF acquisition_details.total_quantity == 1 %]
660                                 1 item is on order.
661                               [% ELSE %]
662                                 [% acquisition_details.total_quantity %] items are on order.
663                               [% END %]
664                             [% END %]
665                             [% IF holds_count.defined || priority %]
666                                 <div id="bib_holds">
667                                     [% IF holds_count.defined %]
668                                         Total holds: [% holds_count %]
669                                     [% END %]
670                                     [% IF priority %]
671                                         [% IF holds_count.defined %]
672                                             (priority [% priority %])
673                                         [% ELSE %]
674                                             Overall queue priority: [% priority %]
675                                         [% END %]
676                                     [% END %]
677                                 </div>
678                             [% END %]
679                         [% ELSE %]
680                             [% IF ( ALTERNATEHOLDINGS ) %]
681                                 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
682                                     <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding %]</div>
683                                 [% END %]
684                             [% ELSE %]
685                                 [% IF Koha.Preference('OPACAcquisitionDetails') and Koha.Preference('AcqCreateItem') != 'ordering' and acquisition_details.total_quantity > 0 %]
686                                   [% IF acquisition_details.total_quantity == 1 %]
687                                     1 item is on order.
688                                   [% ELSE %]
689                                     [% acquisition_details.total_quantity %] items are on order.
690                                   [% END %]
691                                 [% ELSE %]
692                                     <div id="noitems">No physical items for this record</div>
693                                 [% END %]
694                             [% END %]
695                         [% END # IF itemloop.size %]
696                         [% PROCESS 'shelfbrowser.inc' %]
697                         [% INCLUDE shelfbrowser tab='holdings' %]
698                         <br style="clear:both;" />
699                     </div> <!-- / #holdings -->
700
701                     [% IF (SeparateHoldings) %]
702                         <div id="otherholdings">
703                             [% IF (otheritemloop.size) %]
704                                 [% INCLUDE items_table items=otheritemloop tab="otherholdings" %]
705                             [% ELSE %]
706                                 No other items.
707                             [% END %]
708                             [% INCLUDE shelfbrowser tab='otherholdings' %]
709                         </div>
710                     [% END # / SeparateHoldings %]
711
712                     [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %]
713                         <div id="descriptions">
714                             <div class="content_set">
715
716                             [% IF ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY ) %]
717                                 <h4>Enhanced descriptions from Syndetics:</h4>
718                                 <p>[% SYNDETICS_SUMMARY %]</p>
719                             [% END %]
720
721                             [% IF ( MARCNOTES ) %]
722                                 <div id="marcnotes">
723                                 [% FOREACH MARCNOTE IN MARCNOTES %]
724                                     <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p>
725                                 [% END %]
726                                 </div>
727                             [% ELSE %]
728                                 [% IF ( notes ) %]
729                                     <p>[% notes %]</p>
730                                 [% END %]
731                             [% END %]
732
733                             </div>
734                         </div> <!-- / #descriptions -->
735                     [% END # / IF MARCNOTES || notes %]
736
737                     [% IF ( SyndeticsEnabled ) %]
738                         [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %]
739                             <div id="toc">
740                                 <div class="content_set">
741                                     <h3>Table of contents provided by Syndetics</h3>
742                                         <ul>
743                                             [% FOREACH SYNDETICS_TO IN SYNDETICS_TOC %]
744                                                 <li><b>[% SYNDETICS_TO.l %] [% SYNDETICS_TO.t %]</b>[% IF ( SYNDETICS_TO.p ) %] ([% SYNDETICS_TO.p %])[% END %]</li>
745                                             [% END %]
746                                         </ul>
747                                 </div>
748                             </div>
749                         [% END # / IF SyndeticsTOC && SYNDETICS_TOC %]
750
751                         [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %]
752                             <div id="excerpt">
753                                 <div class="content_set">
754                                     <h3>Excerpt provided by Syndetics</h3>
755                                     [% SYNDETICS_EXCERPT %]
756                                 </div>
757                             </div>
758                         [% END # / IF SyndeticsExcerpt && SYNDETICS_EXCERPT %]
759
760                         [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %]
761                             <div id="reviews">
762                                 <div class="content_set">
763                                     <h3>Reviews provided by Syndetics</h3>
764                                     [% FOREACH SYNDETICS_REVIEW IN SYNDETICS_REVIEWS %]
765                                         [% IF ( SYNDETICS_REVIEW.title ) %]
766                                             <h4>[% SYNDETICS_REVIEW.title %]</h4>
767                                                 [% FOREACH review IN SYNDETICS_REVIEW.reviews %]
768
769                                                     [% IF ( review.content ) %]
770                                                         [% review.content %]
771                                                     [% END %]
772
773                                                 [% END %]
774                                         [% END %]
775                                     [% END %]
776                                 </div>
777                             </div>
778                         [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %]
779
780                         [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
781                             <div id="anotes">
782                                 <div class="content_set">
783                                     <h3>Author notes provided by Syndetics</h3>
784                                     [% FOREACH SYNDETICS_ANOTE IN SYNDETICS_ANOTES %]
785                                         [% IF ( SYNDETICS_ANOTE.content ) %]
786                                             [% SYNDETICS_ANOTE.content %]
787                                         [% END %]
788                                     [% END %]
789                                 </div>
790                             </div>
791                         [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %]
792                     [% END # / IF SyndeticsEnabled %]
793
794                     [% IF ( NovelistSelectProfile && NovelistSelectView == 'tab') %]
795                        <div id="NovelistSelect">
796                             <div data-novelist-novelistselect=[% normalized_isbn %]></div>
797                        </div>
798                     [% END # / IF NovelistSelectProfile && NovelistSelectView == 'tab' %]
799
800                     [% IF ( subscriptionsnumber ) %]
801                         <div id="subscriptions">
802                             <h2>This is a serial</h2>
803                             <p>There are [% subscriptionsnumber %] subscription(s) associated with this title.</p>
804                             [% FOREACH subscription IN subscriptions %]
805                                 [% IF ( subscription.branchname ) %]
806                                     <h3>At library: [% subscription.branchname %]</h3>
807                                 [% ELSE %]
808                                     [% IF ( subscription.branchcode ) %]
809                                         <h3>At library: [% subscription.branchcode %]</h3>
810                                     [% END %]
811                                 [% END %]
812                                 [% IF ( subscription.closed ) %]
813                                     <p>This subscription is closed.</p>
814                                 [% END %]
815                                 <span style="display:none;"> [% IF ( subscription.callnumber ) %]<p>Call number: [% subscription.callnumber %]</p>[% END %]</span>
816                                 [% IF ( subscription.subscriptionnotes ) %]
817                                     <p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>
818                                 [% END %]
819                                 <p>Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p>
820                                 [% IF ( subscription.missinglist ) %]
821                                     <p>Missing issues: [% subscription.missinglist %] </p>
822                                 [% END %]
823                                 [% IF ( subscription.opacnote ) %]
824                                     <p>[% subscription.opacnote FILTER html_line_break %]</p>
825                                 [% END %]
826                                 [% IF ( subscription.callnumber ) %]
827                                   <p>Call number: [% subscription.callnumber %]</p>
828                                 [% END %]
829                                 [% IF ( subscription.latestserials ) %]
830                                     <p> The [% subscription.opacdisplaycount %] latest issues for this subscription:</p>
831                                     <table class="table table-bordered table-striped">
832                                         <tr>
833                                             <th>Issue #</th>
834                                             <th>Date</th>
835                                             <th>Status</th>
836                                             <th>Note</th>
837                                         </tr>
838                                         [% FOREACH latestserial IN subscription.latestserials %]
839                                             <tr>
840                                                 <td>[% latestserial.serialseq %]</td>
841                                                 <td>[% latestserial.planneddate %]</td>
842                                                 <td>
843                                                     [% IF ( latestserial.status1 ) %]
844                                                         Awaited
845                                                     [% ELSE %]
846                                                         [% IF ( latestserial.status2 ) %]
847                                                             Arrived
848                                                         [% ELSE %]
849                                                             [% IF ( latestserial.status3 ) %]
850                                                                 Late
851                                                             [% ELSE %]
852                                                                 [% IF ( latestserial.status4 ) %]
853                                                                     Missing
854                                                                 [% ELSE %]
855                                                                     [% IF ( latestserial.status5 ) %]
856                                                                         Not issued
857                                                                     [% END %]
858                                                                 [% END %]
859                                                             [% END %]
860                                                         [% END %]
861                                                     [% END %]
862                                                 </td>
863                                                 <td>[% latestserial.notes %]</td>
864                                             </tr>
865                                         [% END # / FOREACH latestserials %]
866                                     </table>
867                                 [% END # / IF subscription.latestserials %]
868                             [% END # / FOREACH subscriptions %]
869                             <p><a href="opac-serial-issues.pl?biblionumber=[% biblionumber %]">More details</a></p>
870                         </div> <!-- / #subscriptions -->
871                     [% END # IF subscriptionsnumber %]
872
873                     [% IF ( LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView ) %]
874                         <!-- Library Thing for Libraries Content -->
875                         <div id="LFTLSimilarItems">
876                             <div class="content_set">
877                                 <!-- Uncommenting this span makes the font smaller in the tab for LTFL -->
878                                 <!-- but breaks Xhtml validation -->
879                                 <!--    <span class="results_summary">-->
880                                 <div id="ltfl_related"></div>
881                                 <div id="ltfl_similars"></div>
882                                 <!--            </span>-->
883                                 </div>
884                                 </div>
885                                 <div id="LTFLTagBrowse">
886                                     <div class="content_set">
887                                         <!-- <span class="results_summary"> -->
888                                         <div id="ltfl_tagbrowse" class="ltfl"></div>
889                                         <!-- </span> -->
890                                     </div>
891                                 </div>
892                     [% END # / IF LibraryThingForLibrariesID && LibraryThingForLibrariesTabbedView %]
893
894                     [% IF Koha.Preference( 'reviewson' ) == 1 %]
895                         <div id="comments">
896                             <div id="newcomment"></div>
897                                 [% IF ( reviews ) %]
898                                     [% FOREACH review IN reviews %]
899                                         [% IF ( review.your_comment ) %]
900                                             <div class="commentline yours" id="c[% review.reviewid %]">
901                                                 [% IF ( review.avatarurl ) %]
902                                                     <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
903                                                 [% END %]
904                                                 <h5>Your comment</h5>
905                                                 <small>[% review.datereviewed | $KohaDates %]</small>
906                                                 <p>
907                                                     [% FILTER html_break %]
908                                                         [% review.review |html %]
909                                                     [% END %]
910                                                     <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=[% review.biblionumber %]&amp;reviewid=[% review.reviewid %]');">Edit</a>
911                                                 </p>
912                                             </div>
913                                         [% ELSE %]
914                                             <div class="commentline">
915                                                 [% IF ( ShowReviewer != "none" ) %]
916                                                     [% IF ( review.avatarurl ) %]
917                                                         <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
918                                                     [% END %]
919                                                     [% SWITCH ShowReviewer %]
920                                                     [% CASE 'full' %]
921                                                         <h5>Comment by [% review.title %] [% review.firstname %] [% review.surname %]</h5>
922                                                     [% CASE 'first' %]
923                                                         <h5>Comment by [% review.firstname %]</h5>
924                                                     [% CASE 'surname' %]
925                                                         <h5>Comment by [% review.surname %]</h5>
926                                                     [% CASE 'firstandinitial' %]
927                                                         <h5>Comment by [% review.firstname %] [% review.surname|truncate(2,'.') %]</h5>
928                                                     [% CASE 'username' %]
929                                                         <h5>Comment by [% review.userid %]</h5>
930                                                     [% END %]
931                                                     <small>[% review.datereviewed | $KohaDates %]</small>
932                                                 [% ELSIF ( ShowReviewer == "none") %]
933                                                     <h5>Patron comment on [% review.datereviewed | $KohaDates %]</h5>
934                                                 [% END # / IF ShowReviewer != "none"%]
935                                                 <p>
936                                                   [% FILTER html_break %]
937                                                   [% review.review |html %]
938                                                   [% END %]
939                                                 </p>
940                                             </div> <!-- / .commentline -->
941                                         [% END # / IF review.your_comment %]
942                                     [% END # / FOREACH reviews %]
943                                 [% ELSE %]
944                                     <p>There are no comments for this item.</p>
945                                 [% END # / IF reviews %]
946
947                                 [% IF ( loggedinusername ) %]
948                                     [% UNLESS ( loggedincommenter ) %]
949                                        <div id="addcomment"> <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber %]'); return false;">
950                                             Post or edit your comments on this item.
951                                         </a></div>
952                                     [% END %]
953                                 [% ELSE %]
954                                     <div id="addcomment"><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a> to post a comment.</div>
955                                 [% END # / IF loggedinusername %]
956                             </div> <!-- / #comments -->
957                         [% END # / IF reviewson %]
958
959                         [% IF ( OPACFRBRizeEditions && XISBNS ) %]
960                             <div id="editions">
961                                 <h4>Other editions of this work</h4>
962                                 <table class="table table-bordered table-striped">
963                                     [% FOREACH XISBN IN XISBNS %]
964                                         <tr>
965                                             <td>
966                                             [% IF ( OPACAmazonCoverImages ) %]
967                                                 <img src="http://images.amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />
968                                             [% END %]
969
970                                             [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
971                                                 [% IF ( XISBN.content_identifier_exists ) %]
972                                                     [% IF ( using_https ) %]
973                                                         <img src="https://secure.syndetics.com/index.aspx?isbn=[% XISBN.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( XISBN.browser_normalized_upc ) %]&amp;upc=[% XISBN.browser_normalized_upc %][% END %][% IF ( XISBN.browser_normalized_oclc ) %]&amp;oclc=[% XISBN.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
974                                                     [% ELSE %]
975                                                         <img src="http://www.syndetics.com/index.aspx?isbn=[% XISBN.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( XISBN.browser_normalized_upc ) %]&amp;upc=[% XISBN.browser_normalized_upc %][% END %][% IF ( XISBN.browser_normalized_oclc ) %]&amp;oclc=[% XISBN.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
976                                                     [% END %]
977                                                 [% ELSE %]
978                                                     <span class="no-image">No cover image available</span>
979                                                 [% END # / IF  XISBN.content_identifier_exists %]
980                                             [% END # / IF SyndeticsEnabled && SyndeticsCoverImages %]
981                                             </td>
982
983                                             [% UNLESS ( item_level_itypes ) %]
984                                                 <td>[% XISBN.description %]</td>
985                                             [% END %]
986                                             <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% XISBN.biblionumber %]">[% XISBN.title |html %]</a>
987                                                 [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %]
988                                                 [% IF ( XISBN.copyrightdate ) %] &copy;[% XISBN.copyrightdate %][% END %]
989                                                 [% IF ( XISBN.publishercode ) %]
990                                                     <p>[% XISBN.publishercode |html %]
991                                                         [% IF ( XISBN.place ) %]([% XISBN.place %])[% END %]
992                                                         [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear %][% END %]
993                                                         [% IF ( XISBN.pages ) %][% XISBN.pages %] [% XISBN.illus %] [% XISBN.size %][% END %]
994                                                     </p>
995                                                 [% END %]
996                                             </td>
997                                         </tr>
998                                     [% END # / FOREACH XISBNS %]
999                                 </table>
1000                             </div> <!-- / #editions -->
1001                         [% END # / IF OPACFRBRizeEditions && XISBNS %]
1002
1003                         [% IF ( HTML5MediaEnabled ) %]
1004                             <div id="html5media">
1005                                     <p>
1006                                         <[% HTML5MediaParent %] controls preload=none>
1007                                           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1008                                             <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
1009                                           [% END %]
1010                                             [[% HTML5MediaParent %] tag not supported by your browser.]
1011                                         </[% HTML5MediaParent %]>
1012                                     </p>
1013                             </div>
1014                         [% END # / IF HTML5MediaEnabled %]
1015
1016                         [% IF ( OPACLocalCoverImages && localimages.size ) %]
1017                             <div id="images">
1018                                 <p>Click on an image to view it in the image viewer</p>
1019                                 [% FOREACH image IN localimages %]
1020                                     [% IF image %]
1021                                         <a class="localimage" href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/opac-image.pl?thumbnail=1&amp;imagenumber=[% image %]" /></a>
1022                                     [% END %]
1023                                 [% END %]
1024                             </div><!-- / #images -->
1025                         [% END # / IF OPACLocalCoverImages && localimages.size %]
1026
1027                         [% IF ( IDreamBooksReviews ) %]
1028                             <div id="idb_critic_reviews">
1029                                 <div id="idb_review_snippets"></div>
1030                                 <span><a id="seemoreidb">More book reviews at iDreamBooks.com</a></span>
1031                             </div>
1032                         [% END %]
1033                 </div> <!-- / #bibliodescriptions -->
1034
1035                 [% IF ( NovelistSelectProfile && NovelistSelectView == 'below' ) %]
1036                     <div id="NovelistSelect">
1037                         <h3>Novelist Select</h3>
1038                         <div data-novelist-novelistselect="[% normalized_isbn %]"></div>
1039                     </div>
1040                 [% END %]
1041
1042                 [% IF ( Babeltheque ) %]
1043                     <div>
1044                         <div id="BW_etiquettes"></div>
1045                         <div id="BW_suggestions"></div>
1046                     </div>
1047                     <div class="clearfix"></div>
1048                     <div>
1049                         <div id="BW_podcasts"></div>
1050                     </div>
1051                     <div class="clearfix"></div>
1052                     <div>
1053                         <div id="BW_videos"></div>
1054                     </div>
1055                 [% END # / IF Babeltheque %]
1056         </div> <!-- /.span8 -->
1057
1058         <div class="span3">
1059             <div id="ulactioncontainer">
1060
1061                 [% IF ( OpacBrowseResults && busc ) %]
1062                     <div class="nav_results">
1063                         <div class="l_Results">
1064                             [% IF ( listResults ) %]
1065                                 <a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>
1066                             [% ELSE %]
1067                                 <span>Browse results</span>
1068                             [% END %]
1069                         </div>
1070                         <ul class="pg_menu clearfix">
1071                             <li class="left_results">
1072                                 [% IF ( previousBiblionumber ) %]
1073                                     <a href="opac-detail.pl?biblionumber=[% previousBiblionumber %][% IF ( query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">&laquo; Previous</a>
1074                                 [% ELSE %]
1075                                     <span>Previous</span>
1076                                 [% END %]
1077                             </li>
1078                             [%# busc is already URI encoded %]
1079                             <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1080                             <li class="right_results">
1081                                 [% IF ( nextBiblionumber ) %]
1082                                     <a href="opac-detail.pl?biblionumber=[% nextBiblionumber %][% IF ( query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>
1083                                 [% ELSE %]
1084                                     <span>Next</span>
1085                                 [% END %]
1086                             </li>
1087                         </ul>
1088                         [% IF ( listResults ) %]
1089                         <div class="results-pagination">
1090                             <div class="nav_pages">
1091                                 <span class="close_pagination"><a href="#" id="close_pagination">Close</a></span>
1092                                 <ul id="listResults"></ul>
1093                             </div>
1094                             <div class="pagination_list">
1095                                 <ul id="ul_pagination_list"></ul>
1096                             </div>
1097                         </div>
1098                         [% END %]
1099                     </div>
1100                 [% END # / IF OpacBrowseResults && busc %]
1101
1102                 [% INCLUDE 'opac-detail-sidebar.inc' %]
1103
1104                 [% IF ( NovelistSelectProfile && NovelistSelectView == 'right') %]
1105                     <div id="NovelistSelect">
1106                         <h4>Novelist Select</h4>
1107                         <div data-novelist-novelistselect=[% normalized_isbn %]></div>
1108                     </div>
1109                 [% END %]
1110
1111                 [% IF ( Babeltheque ) %]
1112                     <div class="babeltheque_adds">
1113                         <div id="BW_critiques_aj"></div>
1114                         <div id="BW_citations_aj"></div>
1115                     </div>
1116                 [% END %]
1117
1118                 [% IF ( SocialNetworks ) %]
1119                     <div id="social_networks" class="clearfix">
1120                         <span>Share</span>
1121                         <div><a id="facebook" href="http://www.facebook.com/sharer.php?u=[% current_url |url %]&amp;t=[% title |url %]" title="Share on Facebook">Facebook</a></div>
1122                         <div><a id="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=[% current_url |url %]&amp;title=[% title |url %]" title="Share on LinkedIn">LinkedIn</a></div>
1123                         <div><a id="delicious" href="http://www.delicious.com/save?url=[% current_url |url %]&amp;title=[% title |url %]" title="Share on Delicious">Delicious</a></div>
1124                         <div><a id="email" href="mailto:?subject=[% title |url %]&amp;body=[% title |url %]%20([% current_url |url %])" title="Share by email">Email</a></div>
1125                         <div><div class="g-plusone" data-size="small" data-count="false"></div></div>
1126                         <div><a id="twitter" href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="[% title |url %]" data-lang="[% lang %]">Tweet</a></div>
1127                     </div>
1128                 [% END %]
1129             </div> <!-- / .ulactioncontainer -->
1130         </div> <!-- / .span4 -->
1131     </div> <!-- / .row-fluid -->
1132     <div class="row-fluid">
1133         [% IF ( LibraryThingForLibrariesID ) %]
1134             [% IF ( using_https ) %]
1135                 <script src="https://ltfl.librarything.com/forlibraries/widget.js?systype=koha&amp;id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
1136                 <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking
1137                 <a href="https://www.librarything.com/forlibraries/noscript.php?id=[% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
1138             [% ELSE %]
1139                 <script src="http://ltfl.librarything.com/forlibraries/widget.js?systype=koha&amp;id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
1140                 <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking
1141                 <a href="http://www.librarything.com/forlibraries/noscript.php?id=
1142                 [% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
1143             [% END %]
1144         [% END %]
1145
1146         [% IF ( NovelistSelectProfile ) %]
1147             <script type="text/javascript" src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1148         [% END %]
1149
1150         [% IF ( Babeltheque ) %]
1151             <script type="text/javascript" src="[% Babeltheque_url_js %]"></script>
1152         [% END %]
1153     </div> <!-- / .row-fluid -->
1154 </div> <!-- / .container-fluid -->
1155 </div> <!-- / .main -->
1156
1157 [% INCLUDE 'opac-bottom.inc' %]
1158
1159 [%# End of template %]
1160
1161 [% BLOCK items_table %]
1162     <table class="holdingst table table-bordered table-striped">
1163         <thead>
1164             <tr>
1165                 [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1166                 [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1167                     <th id="item_current_location" class="item_location">Current location</th>
1168                 [% END %]
1169                 [% UNLESS ( singleBranchMode ) %]
1170                     [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1171                         <th id="item_home_location" class="item_location">Home library</th>
1172                     [% END %]
1173                 [% END %]
1174                 [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1175                 <th id="item_callnumber" class="call_no">Call number</th>
1176                 [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1177                 [% IF ( itemdata_uri ) %]<th id="item_url" class="url">url</th>[% END %]
1178                 [% IF ( itemdata_copynumber ) %]<th id="item_copy" class="copynumber">Copy number</th>[% END %]
1179                 <th id="item_status" class="status">Status</th>
1180                 [% IF ( itemdata_itemnotes ) %]<th id="item_notes" class="notes">Notes</th>[% END %]
1181                 <th id="item_datedue" class="date_due">Date due</th>
1182                 [% IF ( OPACShowBarcode ) %]<th id="item_barcode" class="barcode">Barcode</th>[% END %]
1183                 [% IF holds_count.defined %]
1184                     <th id="item_holds">Item holds</th>
1185                 [% ELSIF show_priority %]
1186                     <th id="item_priority">Item hold queue priority</th>
1187                 [% END %]
1188                 [% IF ( ShowCourseReservesHeader ) %]<th id="item_coursereserves">Course reserves</th>[% END %]
1189             </tr>
1190         </thead>
1191         <tbody>
1192             [% FOREACH ITEM_RESULT IN items %]
1193                 [% IF ITEM_RESULT.this_branch %]
1194                   <tr class="highlight-row-detail" vocab="http://schema.org/" typeof="Offer">
1195                 [% ELSE %]
1196                   <tr vocab="http://schema.org/" typeof="Offer">
1197                 [% END %]
1198                     [% IF ( item_level_itypes ) %]
1199                         <td class="itype">
1200                             [% UNLESS ( noItemTypeImages ) %]
1201                                 [% IF ( ITEM_RESULT.imageurl ) %]
1202                                     <img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />
1203                                 [% END %]
1204                             [% END %]
1205                             [% ITEM_RESULT.description %]
1206                         </td>
1207                     [% END %]
1208                     [% UNLESS singleBranchMode %]
1209                         [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1210                             <td class="location" property="seller">
1211                                 <link property="itemOffered" href="#record" />
1212                                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1213                                 <span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1214                                     [% IF ( ITEM_RESULT.branchurl ) %]
1215                                         <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1216                                     [% ELSE %]
1217                                         <span>[% ITEM_RESULT.branchname %]</span>
1218                                     [% END %]
1219                                 </span>
1220                                 <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info %]</div>
1221
1222                                 [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1223                                     <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1224                                 [% END %]
1225
1226                             </td>
1227                         [% END %]
1228
1229                         [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1230                             <td class="location" property="seller">
1231                                 <link property="itemOffered" href="#record" />
1232                                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1233                                 <span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1234                                     [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
1235                                         [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
1236                                         [% IF ( home_branch_url ) %]
1237                                              <a href="[% home_branch_url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
1238                                         [% ELSE %]
1239                                             <span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
1240                                         [% END %]
1241                                     [% ELSE %]
1242                                         <span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
1243                                     [% END %]
1244                                 </span>
1245                                 <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info %]</div>
1246
1247                                 [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1248                                     <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1249                                 [% END %]
1250
1251                             </td>
1252                         [% END %]
1253
1254                     [% ELSE %]
1255                          <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1256                     [% END %]
1257
1258                     [% IF ( itemdata_ccode ) %]
1259                         <td class="collection">[% ITEM_RESULT.ccode %]</td>
1260                     [% END %]
1261                     <td class="call_no" property="sku">
1262                         [% IF ( ITEM_RESULT.itemcallnumber ) %]
1263                             [% ITEM_RESULT.itemcallnumber %]
1264                             [% IF ( OPACShelfBrowser ) %]
1265                                 [% IF ( ITEM_RESULT.itemnumber == starting_itemnumber ) %]
1266                                     (<a class="close_shelf" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#[% tab %]">Browse shelf</a>)
1267                                 [% ELSE %]
1268                                     (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#[% tab %]">Browse shelf</a>)
1269                                 [% END %]
1270                             [% END %]
1271                         [% END %]
1272                     </td>
1273                     [% IF ( itemdata_enumchron ) %]
1274                         <td class="vol_info">[% ITEM_RESULT.enumchron %]</td>
1275                     [% END %]
1276                     [% IF ( itemdata_uri ) %]
1277                         <td class="url">
1278                             [% IF ITEM_RESULT.uri %]
1279                                 [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
1280                                     <a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&amp;biblionumber=[% biblionumber |url %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
1281                                 [% ELSE %]
1282                                     <a href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>
1283                                 [% END %]
1284                             [% END %]
1285                         </td>
1286                     [% END %]
1287                     [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %]
1288                     <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
1289                     [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes %]</td>[% END %]
1290                     <td class="date_due"><span title="[% ITEM_RESULT.datedue %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</span></td>
1291                     [% IF ( OPACShowBarcode ) %]<td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode %]</td>[% END %]
1292                     [% IF holds_count.defined || show_priority %]
1293                         <td class="holds_count">
1294                             [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %]
1295                             [% IF ITEM_RESULT.priority %]
1296                                 [% IF holds_count.defined %]
1297                                     (priority [% ITEM_RESULT.priority %])
1298                                 [% ELSE %]
1299                                     [% ITEM_RESULT.priority %]
1300                                 [% END %]
1301                             [% END %]
1302                         </td>
1303                     [% END %]
1304                     [% IF ShowCourseReservesHeader %]
1305                         <td>
1306                             [% IF ITEM_RESULT.course_reserves %]
1307                                 [% FOREACH r IN ITEM_RESULT.course_reserves %]
1308                                     [% IF r.course.enabled == 'yes' %]
1309                                         <p>
1310                                             <a href="opac-course-details.pl?course_id=[% r.course.course_id %]">
1311                                             [% r.course.course_name %]
1312                                             <!--[% IF r.course.course_number %] [% r.course.course_number %] [% END %]-->
1313                                             [% IF r.course.section %] [% r.course.section %] [% END %]
1314                                             [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %]
1315                                             </a>
1316                                         </p>
1317                                     [% END %]
1318                                 [% END %]
1319                             [% END %]
1320                         </td>
1321                     [% END  # /IF ShowCourseReservesHeader %]
1322                 </tr>
1323             [% END %]
1324         </tbody>
1325     </table>
1326 [% END %][%# end of items_table block %]
1327
1328 [% BLOCK jsinclude %]
1329 [% INCLUDE 'datatables.inc' %]
1330 [% IF ( SocialNetworks ) %]
1331     <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
1332     //<![CDATA[
1333       {lang: '[% lang %]'}
1334     //]]>
1335     </script>
1336     <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
1337 [% END %]
1338 [% IF ( OpacStarRatings != 'disable' ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
1339
1340 [% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3.js"></script>[% END %]
1341
1342 <script type="text/javascript">
1343 //<![CDATA[
1344
1345     [% IF ( OpacBrowseResults && busc ) %]
1346         var arrPagination = new Array();
1347         var pag_index_ini = [% indexPag %];
1348         [% IF ( listResults ) %]
1349             [% FOREACH listResult IN listResults %]
1350                 arrPagination[[% listResult.index %]] = {
1351                     url:"[% listResult.url %][% IF ( listResult.url && query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]",
1352                     title:"[% listResult.title|remove('\n')|html %]",
1353                     author:"[% listResult.author|html %]",
1354                     biblionumber:[% listResult.biblionumber %]
1355                 };
1356            [% END %]
1357         [% END %]
1358     [% END %]
1359
1360     [% IF ( OpacHighlightedWords ) %]
1361         var q_array = new Array();  // holds search terms if available
1362
1363         function highlightOff() {
1364             $("#catalogue_detail_biblio").removeHighlight();
1365             $(".highlight_toggle").toggle();
1366         }
1367         function highlightOn() {
1368             var x;
1369             for (x in q_array) {
1370                 if ( q_array[x].length > 0 ) {
1371                     q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
1372                     q_array[x] = q_array[x].toLowerCase();
1373                     var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
1374                     if( $.inArray(q_array[x], myStopwords) == -1 ) {
1375                         $(".title").highlight(q_array[x]);
1376                         $(".author").highlight(q_array[x]);
1377                         $(".results_summary").highlight(q_array[x]);
1378                     }
1379                 }
1380             }
1381             $(".highlight_toggle").toggle();
1382         }
1383     [% END %]
1384
1385      $(document).ready(function() {
1386         $('#bibliodescriptions').tabs();
1387         $(".branch-info-tooltip-trigger").uitooltip({
1388             position: { my: "left+15 center", at: "right center" },
1389             show: 50,
1390             hide: 50,
1391             content: function(){
1392                 var element = $(this).next("div");
1393                 return element.html();
1394             }
1395         });
1396 [% IF ( TagsInputEnabled && loggedinusername ) %]
1397         $(".tag_add").click(function(){
1398             var thisid = $(this).attr("id");
1399             thisid = thisid.replace("tag_add","");
1400             $(this).hide();
1401             $("#tagform"+thisid).show();
1402             $("#newtag"+thisid).focus();
1403             $("#newtag"+thisid+"_status").empty().hide();
1404             return false;
1405         });
1406         $(".cancel_tag_add").click(function(){
1407             var thisid = $(this).attr("id");
1408             thisid = thisid.replace("cancel","");
1409             $("#tagform"+thisid).hide();
1410             $("#tag_add"+thisid).show();
1411             $("#newtag"+thisid).val("");
1412             $("#newtag"+thisid+"_status").empty().hide();
1413             return false;
1414         });
1415         $(".tagbutton").click(function(){
1416             var thisid = $(this).attr("title");
1417             var tag = $("#newtag"+thisid).val();
1418             if (!tag || (tag == "")) {
1419                 alert(MSG_NO_TAG_SPECIFIED);
1420                 return false;
1421             }
1422             KOHA.Tags.add_tag_button(thisid, tag);
1423             return false;
1424         });
1425 [% END %]
1426
1427         $(".holdingst").dataTable($.extend(true, {}, dataTablesDefaults, {
1428             "aoColumns": [
1429                 [% IF ( item_level_itypes ) %]null,[% END %]
1430                 null,
1431                 [% IF ( OpacLocationBranchToDisplay == 'both' ) %]null,[% END %]
1432                 [% IF ( itemdata_ccode ) %]null,[% END %]
1433                 null,
1434                 [% IF ( itemdata_enumchron ) %]null,[% END %]
1435                 [% IF ( itemdata_uri ) %]null,[% END %]
1436                 [% IF ( itemdata_copynumber ) %]null,[% END %]
1437                 null,
1438                 [% IF ( itemdata_itemnotes ) %]null,[% END %]
1439                 { "sType": "title-string" },
1440                 [% IF ( OPACShowBarcode ) %]null,[% END %]
1441                 [% IF holds_count.defined %]
1442                     null,
1443                 [% ELSIF show_priority %]
1444                     null,
1445                 [% END %]
1446                 [% IF ( ShowCourseReservesHeader ) %]null,[% END %]
1447             ]
1448         }));
1449
1450         [% IF ( query_desc ) %][% IF ( OpacHighlightedWords ) %]var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') |html %]";
1451             q_array = query_desc.split(" ");
1452             q_array = q_array.filter(function(n){ return n }); // Remove empty strings
1453             highlightOn();
1454             $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ; return false;});
1455             $("#highlight_toggle_off").show().click(function() {highlightOff(); return false;});[% END %][% END %]
1456     [% IF ( GoogleJackets ) %]
1457         KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
1458     [% END %]
1459     [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
1460         KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]);
1461     [% END %]
1462
1463     [% IF OpenLibraryCovers %]
1464         KOHA.OpenLibrary.GetCoverFromIsbn();
1465     [% END %]
1466     [% IF OPACLocalCoverImages %]
1467         KOHA.LocalCover.GetCoverFromBibnumber(true);
1468     [% END %]
1469     [% IF ( NovelistSelectProfile ) %]
1470         novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
1471     [% END %]
1472
1473     [% IF ( OpacBrowseResults && busc ) %]
1474         if (arrPagination.length > 0) {
1475             renderPagIndexList(pag_index_ini, $("#listResults"));
1476         }
1477         $("#a_listResults").click(function(e) {
1478             if (arrPagination.length > 0) {
1479                 e.preventDefault();
1480                 var navigation = $(".results-pagination");
1481                 if (navigation.css("display") == 'none') {
1482                     navigation.show();
1483                     var newtitle = $(this).attr('title').replace('Show', 'Hide')
1484                     $(this).attr('title',newtitle);
1485                     renderPagination(pag_index_ini, arrPagination.length - 1, $("#ul_pagination_list"), false);
1486                 } else {
1487                     navigation.hide();
1488                     var newtitle = $(this).attr('title').replace('Hide', 'Show')
1489                     $(this).attr('title',newtitle);
1490                 }
1491             }
1492         });
1493         $("#close_pagination").click(function(e) {
1494             e.preventDefault();
1495             var navigation = $(".results-pagination");
1496             navigation.hide();
1497         });
1498     [% END %]
1499 [% IF ( OPACShelfBrowser ) %]
1500
1501     (function prepareShelfBrowser(){
1502
1503         $(".main").on("click",".close_shelf",function(e){
1504             e.preventDefault();
1505             $("#shelfbrowser").toggle();
1506         });
1507         $(".main").on("click", "#browser_previous a", function(e){
1508             e.preventDefault();
1509             $.ajax({
1510                 url: "/cgi-bin/koha/svc/shelfbrowser.pl",
1511                 type: "POST",
1512                 data: {
1513                     "shelfbrowse_itemnumber": $("#browser_previous a").data( "prev-itemnumber" )
1514                 },
1515                 success: function(data){
1516                     $("#shelfbrowser").replaceWith(data);
1517                     [% IF ( GoogleJackets ) %]
1518                       KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
1519                     [% END %]
1520                     [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
1521                       KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]);
1522                     [% END %]
1523                     [% IF OpenLibraryCovers %]
1524                       KOHA.OpenLibrary.GetCoverFromIsbn();
1525                     [% END %]
1526                     [% IF OPACLocalCoverImages %]
1527                       KOHA.LocalCover.GetCoverFromBibnumber(true);
1528                     [% END %]
1529                 }
1530             });
1531         });
1532
1533         $(".main").on("click", "#browser_next a", function(e){
1534             e.preventDefault();
1535             $.ajax({
1536                   url: "/cgi-bin/koha/svc/shelfbrowser.pl",
1537                   type: "POST",
1538                   data: {
1539                     "shelfbrowse_itemnumber": $("#browser_next a").data( "next-itemnumber" )
1540                 },
1541                 success: function(data){
1542                     $("#shelfbrowser").replaceWith(data);
1543                     [% IF ( GoogleJackets ) %]
1544                       KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
1545                     [% END %]
1546                     [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
1547                       KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]);
1548                     [% END %]
1549                     [% IF OpenLibraryCovers %]
1550                       KOHA.OpenLibrary.GetCoverFromIsbn();
1551                     [% END %]
1552                     [% IF OPACLocalCoverImages %]
1553                       KOHA.LocalCover.GetCoverFromBibnumber(true);
1554                     [% END %]
1555                 }
1556             });
1557         });
1558     }());
1559 [% END %]
1560 [% IF ( OpacStarRatings != 'disable' ) %]
1561     // -----------------------------------------------------
1562     // star-ratings code
1563     // -----------------------------------------------------
1564     // hide 'rate' button if javascript enabled
1565
1566     $('input[name="rate_button"]').remove();
1567
1568     $(function () {
1569       $(".auto-submit-star").rating({
1570         callback: function (value, link) {
1571
1572           // if the new value equals the old value, dont execute callback...
1573           // just do nothing!
1574           if ($("#rating_value").attr("value") != value) {
1575
1576             $(function () {
1577
1578               $.post("/cgi-bin/koha/opac-ratings-ajax.pl", {
1579                 rating_old_value: $("#rating_value").attr("value"),
1580                 borrowernumber: "[% borrowernumber %]",
1581                 biblionumber: "[% biblionumber %]",
1582                 rating_value: value,
1583                 auth_error: value
1584               }, function (data) {
1585
1586                 if (data.auth_status != 'ok') {
1587                   window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again."));
1588                 } else {
1589                   $("#rating_value").val(data.rating_value);
1590
1591                   if (data.rating_value) {
1592                     $("#rating_value_text").text(_("your rating: ") + data.rating_value + ", ");
1593                   } else {
1594                     $("#rating_value_text").text('');
1595                   }
1596
1597                   $("#rating_text").text(_("average rating: ") + data.rating_avg_int + " (" + data.rating_total + ' ' + _("votes") + ")");
1598
1599                 }
1600               }, "json");
1601             });
1602           };
1603         }
1604       });
1605     });
1606     // -----------------------------------------------------
1607 [% END # / IF ( OpacStarRatings != 'disable' )%]
1608
1609 [% IF ( IDreamBooksReviews || IDreamBooksReadometer ) %]
1610     var isbn = $(".isbn:last").text().split(" ")[1];
1611     if (isbn) {
1612         isbn = isbn.replace(/\W*$/, '');
1613         isbn = isbn.replace(/-/, '');
1614
1615         if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
1616         // Use Microsoft XDR for IE version 8 or above
1617             var xdr = new XDomainRequest();
1618             xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e");
1619             xdr.onload = function() {
1620                 json = 'json = '+xdr.responseText; // the string now looks like..  json = { ... };
1621                 eval(json); // json is now a regular JSON object
1622                 parseIDBJSON(json); // parse using same function as for jQuery's success event
1623             }
1624             xdr.send();
1625         } else {
1626             $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){
1627                 parseIDBJSON(json);
1628             });
1629         }
1630     }
1631 [% END # / IDreamBooksReviews || IDreamBooksReadometer%]
1632
1633 });
1634     [% IF ( IDreamBooksReviews || IDreamBooksReadometer ) %]
1635         function parseIDBJSON( json ) {
1636             if(json.total_results > 0 && json.book.rating > 0){
1637                 var isbn = $(".isbn:last").text().split(" ")[1];
1638                 isbn = isbn.replace(/\W+/g, '');
1639
1640                 [% IF ( IDreamBooksReadometer ) %]
1641                     $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+_(" by ")+json.book.author+'" title="'+_("Rating based on reviews of ")+json.book.title+'"></a>');
1642                 [% END %]
1643
1644                 [% IF ( IDreamBooksReviews ) %]
1645                     //build new tab for critic reviews
1646                     $("#tab_idb_critic_reviews a").text($("#tab_idb_critic_reviews a").text().replace('XXX', json.book.review_count));
1647
1648                     //append happy-sad cloud review
1649
1650                     $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>"+_("rating based on reviews at iDreamBooks.com")+"</a></span>");
1651
1652                     //insert data into Book reviews tab
1653                     $.each(json.book.critic_reviews, function(){
1654                             $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>"+_("Review date: ")+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>"+_("Review result: ")+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='"+_("iDreamBooks.com rating")+"' title='"+this.pos_or_neg+"' /></a></div></div>");
1655                             });
1656                     $("#seemoreidb").attr('href', json.book.detail_link);
1657                     $("#tab_idb_critic_reviews").show();
1658                 [% END %]
1659             }
1660         }
1661     [% END # / IF IDreamBooksReviews || IDreamBooksReadometer %]
1662
1663     [% IF ( OpacBrowseResults && busc ) %]
1664         var timeoutRFW;
1665         var totalPagItemList = 10;
1666
1667         function rewindList()
1668         {
1669             var ul = $("#listResults");
1670             var li_ini = ul.children(':first').next();
1671             var index_ini = pag_index_ini;
1672             if (li_ini) {
1673                 index_ini = parseInt(li_ini.attr("class").substring(7), 10);
1674             }
1675             var li_end = ul.children(':last').prev();
1676             var index_end = arrPagination.length - 1;
1677             if (li_end) {
1678                 index_end = parseInt(li_end.attr("class").substring(7), 10);
1679             }
1680             if (index_ini > pag_index_ini) {
1681                 renderPagIndexList(index_ini - 1, ul, false);
1682                 renderPagination(index_ini - 1, arrPagination.length - 1, $("#ul_pagination_list"), true);
1683             }
1684         }//rewindList
1685
1686         function forwardList()
1687         {
1688             var ul = $("#listResults");
1689             var li_ini = ul.children(':first').next();
1690             var index_ini = pag_index_ini;
1691             if (li_ini) {
1692                 index_ini = parseInt(li_ini.attr("class").substring(7), 10);
1693             }
1694             var li_end = ul.children(':last').prev();
1695             var index_end = arrPagination.length - 1;
1696             if (li_end) {
1697                 index_end = parseInt(li_end.attr("class").substring(7), 10);
1698             }
1699             if (index_end < arrPagination.length - 1) {
1700                 renderPagIndexList(index_ini + 1, ul, false);
1701                 renderPagination(index_ini + 1, arrPagination.length - 1, $("#ul_pagination_list"), true);
1702             }
1703         }//forwardList
1704
1705         function renderPagIndexList(index, ul)
1706         {
1707             var $kids = ul.children("li");
1708             if ($kids.length > 0) {
1709                 $kids.each(function() {
1710                     $(this).remove();
1711                 });
1712             }
1713             var li;
1714             var html = "";
1715             var ini = index - 1;
1716             var end = ini + totalPagItemList - 1;
1717             li = $("<li />");
1718             html = (index > pag_index_ini)?"<a href='#' id='rew_list_index' onclick='rewindList()' title='" + _("Click to rewind the list to") + " " + ini + " - " + end + "'>&laquo;</a>":"&laquo;";
1719             li.html(html);
1720             ul.append(li);
1721             var title = "";
1722             for (var i=index; i < arrPagination.length && i < index + totalPagItemList; i++) {
1723                 if (arrPagination[i] == undefined) continue;
1724                 var li = $("<li />");
1725                 if (arrPagination[i].url != "") {
1726                     title = _("See biblio") + " &quot;" + arrPagination[i].title + "&quot; ";
1727                     if (arrPagination[i].author != "") title += " " + _("by") + "&quot;" + arrPagination[i].author + "&quot;";
1728                     title += " " + _("with biblionumber") + " " + arrPagination[i].biblionumber;
1729                     html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'";
1730                     html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'";
1731                     html += ">" + i + "</a>";
1732                 } else html = i;
1733                 li.html(html);
1734                 li.attr("class", "li_pag_" + i);
1735                 ul.append(li);
1736             }
1737             li = $("<li />");
1738             ini = index + 1;
1739             end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1;
1740             html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"<a href='#' id='fw_list_index' onclick='forwardList()' title='" + _("Click to forward the list to") + " " + ini + " - " + end + "'>&raquo;</a>":"&raquo;";
1741             li.html(html);
1742             ul.append(li);
1743         }//renderPagIndexList
1744
1745
1746         function renderPagination(index, total, ul, highlIndex)
1747         {
1748             for (var i = pag_index_ini; i <= total; i++) {
1749                 if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
1750                 $("#li_pag_" + i).remove();
1751             }
1752             var j = 0;
1753             for (var i = index; i <= total && j < totalPagItemList; i++) {
1754                 if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
1755                 var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
1756                 var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
1757                 if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author;
1758                 li.html(html);
1759                 if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD");
1760                 ul.append(li);
1761                 j++;
1762             }
1763             for (i = pag_index_ini; i < index && j < totalPagItemList; i++) {
1764                 if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
1765                 $("#li_pag_" + i).remove();
1766                 var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
1767                 var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
1768                 if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author;
1769                 li.html(html);
1770                 ul.append(li);
1771                 j++;
1772             }
1773         }//renderPagination
1774     [% END # / IF ( OpacBrowseResults && busc ) %]
1775 //]]>
1776 </script>
1777
1778 [% IF OPACPopupAuthorsSearch %]
1779     <script type="text/javascript">
1780     //<![CDATA[
1781         function showAuthors(element){
1782             var authornumber = $(element).attr("data-count");
1783
1784             // Check checkbox related to the clicked link
1785             $("#authorsList input[type='checkbox']").attr('checked', false);
1786             $("#author_"+authornumber).attr('checked', true);
1787
1788             makeAuthorRequest();
1789         }
1790
1791         function checkAll(checkbox, elem) {
1792             var check = $(checkbox).attr('checked') ? true : false;
1793             $(elem).find("input[type='checkbox']").attr('checked', check);
1794             elem == "#authorsList" ? makeAuthorRequest() : makeSubjectRequest();
1795         }
1796
1797         function makeAuthorRequest(){
1798             var values = [];
1799
1800             $("#authorsList").find("input[type='checkbox']:checked").each(function () {
1801                 values.push($(this).val());
1802             });
1803
1804             if (values.length > 0) {
1805                 var request = "/cgi-bin/koha/opac-search.pl?q=" + values.join(' and ');
1806                 $("#validAuthorSearch").attr("href", request);
1807             } else {
1808                 $("#validAuthorSearch").removeAttr("href");
1809             }
1810
1811         }
1812
1813         //Subjects
1814         function showSubjects(element, subjectnumber, subfieldnumber){
1815
1816             // Check checkbox related to the clicked link
1817             $("#subjectsList input[type='checkbox']").attr('checked', false);
1818             $("#subject_"+subjectnumber+"_"+subfieldnumber).attr('checked', true);
1819
1820             makeSubjectRequest();
1821
1822         }
1823
1824         function makeSubjectRequest() {
1825             var values = [];
1826             $("#subjectsList > ul").each(function() {
1827                 var all_checked = true;
1828                 var local_values = [];
1829                 $(this).find('input[type="checkbox"]').each(function() {
1830                     if($(this).attr('checked')) {
1831                         local_values.push($(this).val());
1832                     } else {
1833                         all_checked = false;
1834                     }
1835                 });
1836                 var authid = $(this).attr('data-authid');
1837                 if(all_checked && authid) {
1838                     values.push('an:' + authid);
1839                 } else {
1840                     values = values.concat(local_values);
1841                 }
1842             });
1843             if(values.length > 0) {
1844                 var request = "/cgi-bin/koha/opac-search.pl?q=" + values.join(' and ');
1845                 $("#validSubjectSearch").attr('href', request);
1846             } else {
1847                 $("#validSubjectSearch").removeAttr("href");
1848             }
1849         }
1850         $(document).ready(function() {
1851             $("a.showauthors").click(function(e){
1852                 e.preventDefault();
1853                 showAuthors(this);
1854             });
1855         });
1856
1857     //]]>
1858     </script>
1859 [% END # / IF OPACPopupAuthorsSearch  %]
1860 [% END %]