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