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