Bug 12561: Remove non-XSLT views
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-results.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
5 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
6 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
7 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
8
9 [% IF firstPage %]
10      [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
11      [% SET RecordedBooksEnabled = Koha.Preference('RecordedBooksLibraryID') && Koha.Preference('RecordedBooksClientSecret') %]
12 [% END %]
13
14 [% INCLUDE 'doc-head-open.inc' %]
15 <title>
16 [% IF ( searchdesc ) %]
17     [% IF ( ms_value ) %]
18         Results of search for '[% ms_value | html %]'
19     [% ELSE %]
20         Search results
21     [% END %]
22 [% ELSE %]
23     You did not specify any search criteria.
24 [% END %]
25 &rsaquo;
26 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
27 </title>
28 [% INCLUDE 'doc-head-close.inc' %]
29
30 <link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss |uri %]&amp;sort_by=acqdate_dsc&amp;format=rss" />
31 </head>
32 [% BLOCK cssinclude %][% END %]
33 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
34 [% INCLUDE 'masthead.inc' %]
35
36     <div class="main">
37         <nav aria-label="breadcrumb">
38             <ul class="breadcrumb">
39                 <li class="breadcrumb-item">
40                     <a href="/cgi-bin/koha/opac-main.pl">Home</a>
41                 </li>
42                 [% IF ( searchdesc ) %]
43                     [% IF ( ReturnPath ) %]
44                         <li class="breadcrumb-item">
45                             <a href="[% ReturnPath | url %]">Advanced search</a>
46                         </li>
47                     [% END %]
48                     <li class="breadcrumb-item active" aria-current="page">
49                         [% IF ( ms_value ) %]
50                             <a href="#" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'</a>
51                         [% ELSE %]
52                             <a href="#" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Search results</a>
53                         [% END %]
54                     </li>
55                 [% ELSE %]
56                     <li class="breadcrumb-item active" aria-current="page">
57                         <a href="#">You did not specify any search criteria</a>
58                     </li>
59                 [% END %]
60             </ul>
61         </nav>
62
63         [% UNLESS ( total ) %]
64             <div class="container-fluid">
65                 <div class="row">
66                     <div class="col">
67                         <h1 id="numresults">No results found!</h1>
68                         <p>
69                             [% IF ( searchdesc ) %]
70                                 No results found for that in [% LibraryName | html %] catalog.
71                                 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss" aria-label="Subscribe to this search" class="btn btn-link rsssearchlink noprint">
72                                     <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
73                                 </a>
74                             [% ELSE %]
75                                 You did not specify any search criteria.
76                             [% END %]
77                         </p>
78                         [% IF ( ReturnPath ) %]
79                            <div class="returntosearch">
80                                 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
81                             </div>
82                         [% END %]
83                         [% IF ( OPACNoResultsFound ) %]
84                             <div id="noresultsfound">
85                                 [% OPACNoResultsFound | $raw %]
86                             </div>
87                         [% END %]
88                     </div> <!-- / .col -->
89                 </div> <!-- / .row -->
90             </div> <!-- / .container-fluid -->
91         [% END # / UNLESS searchdesc %]
92
93         <div class="container-fluid">
94             <div class="row">
95                 [% IF ( opacfacets && total ) %]
96                     <div class="col-lg-2">
97                         <div id="facetcontainer">
98                             <!-- FACETS START -->
99                             [% INCLUDE 'opac-facets.inc' %]
100                             <!-- FACETS END -->
101                         </div>
102                     </div>
103                 [% END %]
104
105                 [% IF ( total ) %]
106                     [% IF ( opacfacets ) %]
107                         <div class="col-lg-10 order-first order-md-first order-lg-2 maincontent">
108                     [% ELSE %]
109                         <div class="col order-first order-md-first order-lg-2 maincontent">
110                    [% END %]
111                 [% ELSE %]
112                     [% IF ( opacfacets ) %]
113                         <div class="col-lg-10 order-first order-md-first order-lg-2">
114                     [% ELSE %]
115                         <div class="col order-first order-md-first order-lg-2">
116                     [% END %]
117                 [% END %]
118
119                 [% IF ( searchdesc ) %]
120                     [% IF ( total ) %]
121                         <h1 id="numresults">
122                             Your search returned [% total | html %] results.
123                             <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss" class="btn btn-link rsssearchlink noprint" aria-label="Subscribe to this search">
124                                 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
125                             </a>
126                         </h1>
127                         [% IF ( related ) %]
128                             <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
129                         [% END %]
130                     [% END # / IF total %]
131                 [% END # / IF searchdesc %]
132
133                 <div id="userresults">
134                     [% IF ( DidYouMean ) %]
135                         <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring | uri %]">suggestions</a></div>
136                     [% END %]
137
138                     [% IF ( koha_spsuggest ) %]
139                         Did you mean:
140                         <ul style="list-style: none;">
141                             [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
142                             <li>
143                                 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
144                             </li>
145                             [% END %]
146                         </ul>
147                     [% END # / IF koha_spsuggest%]
148                     [% IF ( total ) %]
149                         [% IF ( ReturnPath ) %]
150                             <div class="returntosearch">
151                                 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
152                             </div>
153                         [% END %]
154                     [% END %]
155                     [% IF ( query_error ) %]
156                         <div class="dialog alert">
157                             <h2>Error:</h2>
158                             [% query_error | html %]
159                         </div>
160                     [% END %]
161
162                     <!-- Search Results Table -->
163                     [% IF ( total ) %]
164
165                         <div class="searchresults">
166                             <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
167                                 <legend class="sr-only">Sort</legend>
168                                 [% IF ( searchdesc ) %]
169                                     [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
170                                         <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
171                                     [% END %]
172                                     [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
173                                         <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
174                                     [% END %]
175                                 [% END # IF /searchdesc %]
176
177                                 <div id="floating">
178                                     <div id="toolbar" class="toolbar row align-items-center">
179                                         <div id="top-pages" class="col">
180                                             [% INCLUDE 'page-numbers.inc' %]
181                                         </div>
182                                         [% UNLESS tag %]
183                                             <div class="sort_by col-sm-auto">
184                                                 <label for="sort_by" class="sr-only">Sort by:</label>
185                                                 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
186                                                     [% INCLUDE 'resort_form.inc' %]
187                                                 </select>
188
189                                                 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
190                                                     <label for="results_per_page">Results per page: </label>
191                                                     <select id="results_per_page" name="count">
192                                                         [% IF Koha.Preference('OPACnumSearchResults') %]
193                                                             [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
194                                                                 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
195                                                             [% ELSE %]
196                                                                 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
197                                                             [% END %]
198                                                         [% END %]
199                                                         [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
200                                                         [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
201                                                         [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
202                                                         [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
203                                                         [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
204                                                     </select>
205                                                 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
206                                             </div> <!-- /.sort_by -->
207                                             <div id="sortsubmit" class="sort_by col-auto">
208                                                 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
209                                             </div> <!-- /.sort_by -->
210                                         [% END # /UNLESS tag %]
211                                     </div> <!-- / #toolbar -->
212
213                                     <div class="selections-toolbar toolbar noprint">
214                                         [% IF ( OpacHighlightedWords ) %]
215                                             <div class="highlight_controls noprint">
216                                                 <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
217                                                 <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a>
218                                             </div>
219                                         [% END %]
220
221                                         <div class="check_control">
222                                             <!-- checkall, clearall are now needed for placehold -->
223                                             <span class="clearall">
224                                                 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
225                                             </span>
226                                             <span class="checkall">
227                                                 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
228                                             </span>
229                                         </div>
230
231                                         <div class="links">
232                                             [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
233                                                 <span class="selections">Select titles to:</span>
234                                             [% END %]
235                                             [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
236                                                 <span class="addto">
237                                                     <select class="disabled form-control form-control-sm" name="addto" id="addto">
238                                                         <option>Add to...</option>
239                                                         [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
240                                                             <option value="addtocart">Cart</option>
241                                                         [% END %]
242                                                         [% IF Koha.Preference('virtualshelves') %]
243                                                             [% IF loggedinusername AND add_to_some_private_shelves.count %]
244                                                                 <optgroup label="Your lists:">
245                                                                 [% SET number_of_private_shelves = 0 %]
246                                                                 [% FOREACH s IN add_to_some_private_shelves %]
247                                                                     [% IF shelfnumber != s.shelfnumber %]
248                                                                         <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
249                                                                         [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
250                                                                         [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
251                                                                     [% END %]
252                                                                 [% END %]
253                                                                 </optgroup>
254                                                             [% END %]
255                                                             [% IF add_to_some_public_shelves.count %]
256                                                                 <optgroup label="Public lists:">
257                                                                 [% SET number_of_public_shelves = 0 %]
258                                                                 [% FOREACH s IN add_to_some_public_shelves %]
259                                                                     [% IF shelfnumber != s.shelfnumber %]
260                                                                         <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
261                                                                         [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
262                                                                         [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
263                                                                     [% END %]
264                                                                 [% END %]
265                                                                 </optgroup>
266                                                             [% END %]
267                                                             [% IF ( add_to_some_private_shelves and add_to_some_private_shelves.count > 10 ) or ( add_to_some_public_shelves and add_to_some_public_shelves.count > 10 ) %]
268                                                                 <option value="morelists">[ More lists ]</option>
269                                                             [% END %]
270                                                             <option value="newlist">[ New list ]</option>
271                                                         [% END # /IF virtualshelves %]
272                                                     </select>
273                                                     <input type="submit" class="btn btn-sm btn-primary" value="Save" />
274                                                 </span>
275                                             [% END # /IF opacbookbag || virtualshelves %]
276
277                                             [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
278                                                 <button class="btn btn-link btn-sm hold disabled" type="button">
279                                                     <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
280                                                 </button>
281                                             [% END %]
282
283                                             [% IF ( TagsInputEnabled && loggedinusername ) %]
284                                                 <span id="tagsel_span">
285                                                     <button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button>
286                                                 </span>
287                                             [% END %]
288                                         </div> <!-- / .links -->
289                                         [% IF ( TagsInputEnabled && loggedinusername ) %]
290                                             <div id="tagsel_form" style="display:none">
291                                                 <label for="tagsel_new">New tag:</label>
292                                                 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
293                                                 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
294                                                 <a href="#" id="tagsel_cancel">(done)</a>
295                                             </div>
296                                             <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
297                                                 Tag status here.
298                                             </div>
299                                         [% END %]
300                                     </div> <!-- / .selections-toolbar -->
301                                 </div> <!-- /#floating -->
302
303                                 <!-- TABLE RESULTS START -->
304                                 <table class="table table-striped">
305                                     <caption class="sr-only">Results</caption>
306
307                                     <!-- Actual Search Results -->
308                                     [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
309                                         <tr>
310                                             [% # Cell 1: Checkbox %]
311                                             [% IF ( SEARCH_RESULT.title ) %]
312                                                 [% check_title = SEARCH_RESULT.title %]
313                                             [% ELSE %]
314                                                 [% check_title = SEARCH_RESULT.biblionumber %]
315                                             [% END %]
316                                             <td class="selectcol">
317                                                 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
318                                                     <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]" /> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
319                                                 [% ELSE %]
320                                                     [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
321                                                         <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
322                                                     [% ELSE %]
323                                                         [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
324                                                             [% UNLESS ( SEARCH_RESULT.norequests ) %]
325                                                                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
326                                                                 [% END %]
327                                                             [% END %]
328                                                         [% END # IF RequestOnOpac %]
329                                                     [% END # IF virtualshelves %]
330                                                 [% END # IF opacbookbag%]
331                                             </td>
332
333                                             [% # Cell 2: Show result number if OpacHiddenItems is empty %]
334                                             <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
335                                                 [% UNLESS suppress_result_number %]
336                                                     [% SEARCH_RESULT.result_number | html %].
337                                                 [% END %]
338                                             </td>
339
340                                             [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
341                                                 [% # Cell 3: Show item type image %]
342                                                 <td class="itypecol">
343                                                     [% IF ( SEARCH_RESULT.imageurl ) %]
344                                                         <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
345                                                     [% END %]
346                                                     [% IF ( SEARCH_RESULT.score_avg ) %]
347                                                         <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
348                                                     [% END %]
349                                                 </td>
350                                             [% END %]
351
352                                             [% # Cell 4: Search result details and controls %]
353                                             <td class="bibliocol">
354                                                 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
355                                                     <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
356                                                         [% IF ( SEARCH_RESULT.title ) %]
357                                                             [% img_title = SEARCH_RESULT.title %]
358                                                         [% ELSE %]
359                                                             [% img_title = SEARCH_RESULT.biblionumber %]
360                                                         [% END %]
361                                                         [% IF ( OPACLocalCoverImages ) %]
362                                                             <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
363                                                         [% END %]
364
365                                                         [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
366                                                             <span title="[% img_title | html %]" id="adlibris-thumbnail[% loop.count | html %]">
367                                                                 <img src="[% AdlibrisURL | html %]?isbn=[% SEARCH_RESULT.normalized_isbn | html %]"
368                                                                      alt="Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %]" class="adlibris-cover" />
369                                                             </span>
370                                                         [% END %]
371                                                         [% IF ( OPACAmazonCoverImages ) %]
372                                                             [% IF ( SEARCH_RESULT.normalized_isbn ) %]
373                                                                     <span title="[% img_title | html %]" id="amazon-thumbnail[% loop.count | html %]"><img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="item-thumbnail" /></span>
374                                                             [% ELSE %]
375                                                                 <span class="no-image">No cover image available</span>
376                                                             [% END %]
377                                                         [% END %]
378
379                                                         [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
380                                                             [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
381                                                                     <span title="[% img_title | html %]" id="syndetics-thumbnail[% loop.count | html %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc | html %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="" class="item-thumbnail" /></span>
382                                                             [% ELSE %]
383                                                                 <span class="no-image">No cover image available</span>
384                                                             [% END %]
385                                                         [% END %]
386
387                                                         [% IF ( GoogleJackets ) %]
388                                                             [% IF ( SEARCH_RESULT.normalized_isbn ) %]
389                                                                 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
390                                                             [% ELSE %]
391                                                                 <span class="no-image">No cover image available</span>
392                                                             [% END %]
393                                                         [% END %]
394
395                                                         [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
396                                                           [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
397                                                           [% IF ( coce_id ) %]
398                                                             <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
399                                                           [% ELSE %]
400                                                             <span class="no-image">No cover image available</span>
401                                                           [% END %]
402                                                         [% END %]
403
404                                                         [% IF OpenLibraryCovers %]
405                                                             [% IF SEARCH_RESULT.normalized_isbn %]
406                                                                 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
407                                                             [% ELSE %]
408                                                                 <span class="no-image">No cover image available</span>
409                                                             [% END %]
410                                                         [% END %]
411
412                                                         [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
413                                                             [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
414                                                             [% IF ( bt_id ) %]
415                                                                 <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
416                                                             [% ELSE %]
417                                                                 <span class="no-image">No cover image available</span>
418                                                             [% END %]
419                                                         [% END %]
420                                                     </a>
421
422                                                     [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
423                                                         [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
424                                                         [% IF ( bt_id ) %]
425                                                             <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
426                                                                 <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
427                                                             </a>
428                                                         [% ELSE %]
429                                                             <span class="no-image">No cover image available</span>
430                                                         [% END %]
431                                                     [% END %]
432
433                                                     [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
434                                                         [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
435                                                         [% IF custom_cover_image_url %]
436                                                             [% IF ( OPACURLOpenInNewWindow ) %]
437                                                                 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" target="_blank" rel="noreferrer"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
438                                                             [% ELSE %]
439                                                                 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
440                                                             [% END %]
441                                                         [% END %]
442                                                     [% END %]
443
444                                                 </div>
445                                                 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
446                                                     <!-- COinS / Openurl -->
447                                                     <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
448                                                 [% END %]
449                                                 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
450
451                                                 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
452
453                                                 [% IF ( SEARCH_RESULT.score_avg ) %]
454                                                     <div class="results_summary">
455                                                         [% FOREACH i  IN [ 1 2 3 4 5  ] %]
456                                                             [% IF ( SEARCH_RESULT.score_int >= i ) %]
457                                                                 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly star-rating-on"><a title="[% i | html %]">[% i | html %]</a></div>
458                                                             [% ELSE   %]
459                                                                 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
460                                                             [% END %]
461                                                         [% END %]
462                                                         <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp; [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
463
464                                                         [% IF ( SEARCH_RESULT.num_critics ) %]
465                                                             <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
466                                                         [% END %]
467                                                         [% IF ( SEARCH_RESULT.num_critics_pro ) %]
468                                                             <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
469                                                         [% END %]
470                                                         [% IF ( SEARCH_RESULT.num_videos ) %]
471                                                             <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
472                                                         [% END %]
473                                                         [% IF ( SEARCH_RESULT.num_quotations ) %]
474                                                             <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
475                                                         [% END %]
476                                                     </div> <!-- / .results_summary -->
477                                                 [% END # / IF SEARCH_RESULT.score_avg %]
478
479                                                 [% IF ( LibraryThingForLibrariesID ) %]
480                                                     <div class="ltfl_reviews"></div>
481                                                 [% END %]
482
483                                                 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
484                                                     <div class="results_summary tags">
485                                                         <span class="label">Tags:</span>
486                                                         <ul>
487                                                             [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
488                                                                 <li>
489                                                                     <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
490                                                                     <span class="weight">([% TagLoo.weight_total | html %])</span>
491                                                                 </li>
492                                                             [% END %]
493                                                         </ul>
494                                                     </div>
495                                                 [% END %]
496
497                                                 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
498                                                     <div class="results_summary shelves">
499                                                         <span class="label">Lists:</span>
500                                                         <ul>
501                                                             [% FOREACH shelf IN SEARCH_RESULT.shelves %]
502                                                                 <li>
503                                                                     <a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
504                                                                     [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
505                                                                 </li>
506                                                             [% END %]
507                                                         </ul>
508                                                     </div>
509                                                 [% END %]
510
511                                                 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
512                                                     <span class="results_summary">
513                                                         <span class="label">Match:</span>
514                                                         [% SEARCH_RESULT.searchhighlightblob | html %]
515                                                     </span>
516                                                 [% END %]
517
518                                                 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
519
520                                                 [% IF ( OpacStarRatings == 'all' ) %]
521                                                     <div class="results_summary ratings">
522                                                         [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
523                                                         [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
524                                                         <div class="br-wrapper br-theme-fontawesome-stars">
525                                                             <div class="br-widget br-readonly">
526                                                                 [% FOREACH i IN [ 1 2 3 4 5  ] %]
527                                                                     [% IF rating_avg_int == i %]
528                                                                         <a href="#" class="br-selected br-current"></a>
529                                                                     [% ELSIF rating_avg_int > i %]
530                                                                         <a href="#" class="br-selected"></a>
531                                                                     [% ELSE %]
532                                                                         <a href="#"></a>
533                                                                     [% END %]
534                                                                 [% END %]
535                                                             </div>
536                                                         </div>
537
538                                                         [% IF SEARCH_RESULT.ratings.count > 0  %]
539                                                             <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp;([% SEARCH_RESULT.ratings.count | html %] votes)</span>
540                                                         [% ELSE %]
541                                                             <br />
542                                                         [% END %]
543                                                     </div> <!-- / .results_summary -->
544                                                 [% END # / IF OpacStarRatings %]
545
546                                                 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
547
548                                                 </div>
549
550                                             </td>
551                                         </tr>
552                                     [% END # / FOREACH SEARCH_RESULT %]
553                                 </table>
554                             </form> <!-- / #bookbag_form -->
555
556                             <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
557                                 <legend class="sr-only">Pages</legend>
558                                 <!-- The value will be set by holdBiblioNums() in basket.js -->
559                                 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
560                             </form>
561                         </div> <!-- / .searchresults -->
562
563                         <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
564
565                     [% END # / IF total %]
566
567                     [%# Display "Not finding what you're looking for" for suggestion or ILL %]
568                     [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
569                         <div class="suggestion">
570                             Not finding what you're looking for?
571                             <ul>
572                                 [% IF Koha.Preference( 'suggestion' ) == 1 %]
573                                     [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
574                                         <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
575                                     [% ELSIF loggedinusername %]
576                                         <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
577                                     [% END %]
578                                 [% END %]
579                                 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
580                                     <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
581                                 [% END %]
582                             </ul>
583                         </div>
584                     [% END %]
585                     </div> <!-- / #userresults -->
586                 </div> <!-- /.span10/12 -->
587             </div> <!-- / .row -->
588         </div> <!-- / .container-fluid -->
589     </div><!-- / .main -->
590
591 [% INCLUDE 'opac-bottom.inc' %]
592 [% BLOCK jsinclude %]
593     [% IF ( LibraryThingForLibrariesID ) %]
594         <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&amp;systype=koha"></script>
595     [% END %]
596     [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
597     [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
598     [% Asset.js("js/authtoresults.js") | $raw %]
599     [% Asset.js("lib/hc-sticky.js") | $raw %]
600     [% IF ( OpacHighlightedWords ) %]
601         [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
602     [% END %]
603     [% IF OpenLibraryCovers || OpenLibrarySearch %]
604         [% Asset.js("js/openlibrary.js") | $raw %]
605     [% END %]
606
607     <script>
608         [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
609             function holdMultiple() {
610                 var checkedBiblioNums = ""; // Separated by "/"
611                 var checkedCount = 0;
612                 if(document.bookbag_form.biblionumber.length > 0) {
613                     for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
614                         if (document.bookbag_form.biblionumber[i].checked) {
615                             checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
616                             checkedCount++;
617                         }
618                     }
619                 }
620
621                 if (checkedCount > 0) {
622                     holdBiblioNums(checkedBiblioNums);
623                 } else {
624                     alert( __("No item was selected") );
625                 }
626             }
627
628             function holdBiblioNums(numList) {
629                 // numList: biblio numbers separated by "/"
630                 $("#hold_form_biblios").attr("value", numList);
631                 $("#hold_form").submit();
632             }
633         [% END # /IF opacuserlogin && RequestOnOpac %]
634
635         [% IF ( TagsInputEnabled && loggedinusername ) %]
636             function tagSelected() {
637                 var checkedBoxes = $(".searchresults :checkbox:checked");
638                 if ($(checkedBoxes).size() == 0) {
639                     alert( __("No item was selected") );
640                 } else {
641                     $("#tagsel_tag").hide();
642                     $(".resort").hide();
643                     $("#tagsel_form").show();
644                 }
645             }
646
647             function tagCanceled() {
648                 $("#tagsel_form").hide();
649                 $("#tagsel_tag").show();
650                 $(".resort").show();
651                 $("#tagsel_new").val("");
652                 $("#tagsel_status, .tagstatus").empty().hide();
653             }
654
655             function tagAdded() {
656                 var checkedBoxes = $(".searchresults :checkbox:checked");
657                 if ($(checkedBoxes).size() == 0) {
658                     alert( __("No item was selected") );
659                     return false;
660                 }
661
662                 var tag = $("#tagsel_new").val();
663                 if (!tag || (tag == "")) {
664                     alert(MSG_NO_TAG_SPECIFIED);
665                     return false;
666                 }
667
668                 var bibs = [];
669                 for (var i = 0; i < $(checkedBoxes).size(); i++) {
670                     var box = $(checkedBoxes).get(i);
671                     bibs[i] = $(box).val();
672                 }
673
674                 KOHA.Tags.add_multitags_button(bibs, tag);
675                 return false;
676             }
677         [% END # /IF TagsInputEnabled && loggedinusername %]
678
679
680         function enableCheckboxActions(){
681             // Enable/disable controls if checkboxes are checked
682             var checkedBoxes = $(".cb:checked");
683             var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
684             if ($(checkedBoxes).size()) {
685                 $(".selections").html(_("With selected titles: "));
686                 $(controls).removeClass("disabled");
687             } else {
688                 $(".selections").html(_("Select titles to: "));
689                 $(controls).addClass("disabled");
690             }
691         }
692
693         [% IF ( OpacHighlightedWords ) %]
694             var q_array = new Array();  // holds search terms if available
695
696             function highlightOff() {
697                 $("td").removeHighlight();
698                 $(".highlight_toggle").toggle();
699             }
700             function highlightOn() {
701                 var x;
702                 for (x in q_array) {
703                     q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
704                     q_array[x] = q_array[x].toLowerCase();
705                     var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
706                     if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
707                         $(".title").highlight(q_array[x]);
708                         $(".author").highlight(q_array[x]);
709                         $(".results_summary").highlight(q_array[x]);
710                     }
711                 }
712                 $(".highlight_toggle").toggle();
713             }
714         [% END # /IF OpacHighlightedWords %]
715
716         $(document).ready(function(){
717
718             $(".moretoggle").click(function(e){
719                 e.preventDefault();
720                 $(this).siblings(".collapsible-facet").toggle();
721                 $(this).siblings(".moretoggle").toggle();
722                 $(this).toggle();
723             });
724
725             [% IF ( OpacHighlightedWords ) %]
726                 $('a.title').each(function() {
727                     $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
728                 });
729             [% END %]
730
731             $(".cb").click(function(){
732                 enableCheckboxActions();
733             });
734             enableCheckboxActions();
735
736             $(".br-readonly a").on("click", function(e){
737                 e.preventDefault();
738             });
739
740             $('.resort').change(function() {
741                 $('#bookbag_form').submit();
742             });
743
744             $('#results_per_page').change(function() {
745                 $('#bookbag_form').submit();
746             });
747
748             [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
749                 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
750                     $("#addto").on("change",function(){
751                         cartList();
752                     });
753                     $(".addto").find("input:submit").click(function(){
754                         cartList();
755                         return false;
756                     });
757                 [% ELSE %]
758                     $("#addto").on("click",function(){
759                         cartList();
760                         return false;
761                     });
762                 [% END %]
763             [% END %]
764
765             function cartList(){
766                 addtoOption = $("#addto").find("option:selected");
767                 addtoval = addtoOption.val();
768                 if(addtoval == "addtolist"){
769                     var shelfnumber = addtoOption.attr("id").replace("s","");
770                     if (vShelfAdd()) {
771                         Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
772                     }
773                     return false;
774                 } else if(addtoval == "newlist"){
775                     [% IF ( loggedinusername ) %]if (vShelfAdd()) {
776                         Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
777                     }[% ELSE %]
778                         alert(_("You must be logged in to create or add to lists"));
779                     [% END %]
780                     return false;
781                 } else if(addtoval == "morelists"){
782                     [% IF ( loggedinusername ) %]
783                         if (vShelfAdd()) {
784                             Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
785                         }
786                     [% ELSE %]
787                         alert(_("You must be logged in to create or add to lists"));
788                     [% END %]
789                     return false;
790                 }
791                 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
792                     addMultiple();
793                     return false;
794                 }
795             }
796             $("#CheckAll").on("click",function(e){
797                 e.preventDefault();
798                 $(".cb").prop("checked", true);
799                 enableCheckboxActions();
800             });
801             $("#CheckNone").on("click",function(e){
802                 e.preventDefault();
803                 $(".cb").prop("checked", false);
804                 enableCheckboxActions();
805             });
806
807             $(".hold").on("click", function(e){
808                 e.preventDefault();
809                 holdMultiple();
810             });
811
812             [% IF ( query_desc ) %]
813                 [% IF ( OpacHighlightedWords ) %]
814                     q_array = query_desc.split(" ");
815                     // ensure that we don't have "" at the end of the array, which can
816                     // break the highlighter
817                     while (q_array.length > 0 && q_array[q_array.length-1] == "") {
818                         q_array = q_array.splice(0,-1);
819                     }
820                     highlightOn();
821                     $("#highlight_toggle_on" ).hide().click(function(e) {
822                         e.preventDefault();
823                         highlightOn();
824                     });
825                     $("#highlight_toggle_off").show().click(function(e) {
826                         e.preventDefault();
827                         highlightOff();
828                     });
829                 [% END # /IF OpacHighlightedWords %]
830                 [% IF ( OverDriveEnabled ) %]
831                     var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
832                     $( '#numresults' ) .after( $overdrive_results );
833                     //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
834                     //as the overdrive API treats double quotes as a search term and returns extra results
835                     od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
836                     od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
837                     od_querystring = od_querystring.replace(/\"/g,"'");
838                     KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
839                         if ( data.error ) {
840                             $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
841                             return;
842                         }
843
844                         if ( data.totalItems ) {
845                             $overdrive_results.html( '<a href="/cgi-bin/koha/opac-overdrive-search.pl?q=' + encodeURIComponent( od_querystring ) + '">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.totalItems, 'OverDrive') + '</a>' );
846                         } else {
847                             $overdrive_results.remove();
848                         }
849                     } );
850                 [% END # /IF OverDriveEnabled %]
851                 [% IF ( RecordedBooksEnabled ) %]
852                     var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
853                     $( '#numresults' ) .after( $recordedbooks_results );
854                     KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
855                         if ( data.error ) {
856                             $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks')  + ': ' + data.error);
857                             return;
858                         }
859
860                         // data.total can be either 42 or "60+"
861                         if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
862                             $recordedbooks_results.html( '<a href="/cgi-bin/koha/opac-recordedbooks-search.pl?q=' + encodeURIComponent( querystring ) + '">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.total, 'RecordedBooks') + '</a>' );
863                         } else {
864                             $recordedbooks_results.remove();
865                         }
866                     } );
867                 [% END # /IF RecordedBooksEnabled %]
868                 [% IF ( OpenLibrarySearch ) %]
869                     var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
870                     $( '#numresults' ) .after( $openlibrary_results );
871                     KOHA.OpenLibrary.search( querystring, null, function( data ) {
872                         if ( data.error ) {
873                             $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
874                             return;
875                         }
876
877                         if ( data.numFound > 0 ) {
878                             $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">'  + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
879                         } else {
880                             $openlibrary_results.remove();
881                         }
882                     } );
883                 [% END # /IF OpenLibrarySearch %]
884             [% END # /IF query_desc %]
885
886             [% IF ( TagsInputEnabled && loggedinusername ) %]
887                 $("#tagsel_tag").show().click(function(){
888                     tagSelected();
889                     return false;
890                 });
891                 $("#tagsel_cancel").click(function(){
892                     tagCanceled();
893                     return false;
894                 });
895                 $("#tagsel_button").click(function(){
896                     tagAdded();
897                     return false;
898                 });
899
900                 $(".tag_add").click(function(){
901                     var thisid = $(this).attr("id");
902                     thisid = thisid.replace("tag_add","");
903                     $(this).addClass("hidden");
904                     $("#tagform"+thisid).show();
905                     $("#newtag"+thisid).focus();
906                     $("#newtag"+thisid+"_status").empty().hide();
907                     return false;
908                 });
909                 $(".cancel_tag_add").click(function(){
910                     var thisid = $(this).attr("id");
911                     thisid = thisid.replace("cancel","");
912                     $("#tagform"+thisid).hide();
913                     $("#tag_add"+thisid).removeClass("hidden");
914                     $("#newtag"+thisid).val("");
915                     $("#newtag"+thisid+"_status").empty().hide();
916                     return false;
917                 });
918                 $(".tagbutton").click(function(){
919                     var thisid = $(this).attr("title");
920                     var tag = $("#newtag"+thisid).val();
921                     if (!tag || (tag == "")) {
922                         alert(MSG_NO_TAG_SPECIFIED);
923                         return false;
924                     }
925                     KOHA.Tags.add_tag_button(thisid, tag);
926                     return false;
927                 });
928             [% END # /IF TagsInputEnabled && loggedinusername %]
929
930             [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
931             [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
932             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
933             [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
934                 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
935             [% END %]
936
937             [% IF ( DidYouMean ) %]
938                 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
939                     function() {
940                         $(this).addClass("dym-loaded");
941                     });
942             [% END %]
943
944             $("input.newtag").on('keydown', function(e){
945                 if (e.keyCode == 13) { e.preventDefault(); }
946             });
947
948             Sticky = $("#floating");
949             Sticky.hcSticky({
950                 stickTo: ".searchresults",
951                 stickyClass: "floating"
952             });
953
954         });
955     </script>
956 [% END %]