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