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