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