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