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