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