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