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