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