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