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