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 %]
11 [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
12 [% SET RecordedBooksEnabled = Koha.Preference('RecordedBooksLibraryID') && Koha.Preference('RecordedBooksClientSecret') %]
15 [% INCLUDE 'doc-head-open.inc' %]
17 [% IF ( searchdesc ) %]
19 Results of search for '[% ms_value | html %]'
24 You did not specify any search criteria.
27 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
29 [% INCLUDE 'doc-head-close.inc' %]
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 %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" />
33 [% BLOCK cssinclude %][% END %]
34 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
35 [% INCLUDE 'masthead.inc' %]
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>
43 [% IF ( searchdesc ) %]
44 [% IF ( ReturnPath ) %]
45 <li class="breadcrumb-item">
46 <a href="[% ReturnPath | url %]">Advanced search</a>
49 <li class="breadcrumb-item active">
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>
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>
57 <li class="breadcrumb-item active">
58 <a href="#" aria-current="page">You did not specify any search criteria</a>
62 </nav> <!-- /#breadcrumbs -->
64 [% UNLESS ( total ) %]
65 <div class="container-fluid">
68 <h1 id="numresults">No results found!</h1>
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 %]&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>
76 You did not specify any search criteria.
79 [% IF ( ReturnPath ) %]
80 <div class="returntosearch">
81 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
84 [% IF ( OPACNoResultsFound ) %]
85 <div id="noresultsfound">
86 [% OPACNoResultsFound | $raw %]
89 </div> <!-- / .col -->
90 </div> <!-- / .row -->
91 </div> <!-- / .container-fluid -->
92 [% END # / UNLESS searchdesc %]
94 <div class="container-fluid">
96 [% IF ( opacfacets && total ) %]
97 <div class="col-lg-2">
98 <div id="facetcontainer">
100 [% INCLUDE 'opac-facets.inc' %]
106 [% IF ( opacfacets ) %]
107 <div class="col-lg-10 maincontent">
109 <div class="col maincontent">
112 [% IF ( searchdesc ) %]
115 Your search returned [% total | html %] results.
116 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&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>
121 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
123 [% END # / IF total %]
124 [% END # / IF searchdesc %]
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&q=[% querystring | uri %]">suggestions</a></div>
131 [% IF ( koha_spsuggest ) %]
133 <ul style="list-style: none;">
134 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
136 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
140 [% END # / IF koha_spsuggest%]
142 [% IF ( ReturnPath ) %]
143 <div class="returntosearch">
144 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
148 [% IF ( query_error ) %]
149 <div class="dialog alert">
151 [% query_error | html %]
155 <!-- Search Results Table -->
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 %]"/>
165 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
166 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
168 [% END # IF /searchdesc %]
171 <div id="toolbar" class="toolbar row align-items-center">
172 <div id="top-pages" class="col">
173 [% INCLUDE 'page-numbers.inc' %]
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' %]
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>
189 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">[% Koha.Preference('OPACnumSearchResults') | html %] (default)</option>
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 %]
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 -->
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>
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>
219 <span class="checkall">
220 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
225 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
226 <span class="selections">Select titles to:</span>
228 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
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>
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 %]
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 %]
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>
263 <option value="newlist">[ New list ]</option>
264 [% END # /IF virtualshelves %]
266 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
268 [% END # /IF opacbookbag || virtualshelves %]
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
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>
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>
289 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
293 </div> <!-- / .selections-toolbar -->
294 </div> <!-- /#floating -->
296 <!-- TABLE RESULTS START -->
297 <table class="table table-striped">
298 <caption class="sr-only">Results</caption>
300 <!-- Actual Search Results -->
301 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
303 [% # Cell 1: Checkbox %]
304 [% IF ( SEARCH_RESULT.title ) %]
305 [% check_title = SEARCH_RESULT.title %]
307 [% check_title = SEARCH_RESULT.biblionumber %]
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>
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>
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>
321 [% END # IF OPACHoldRequests %]
322 [% END # IF virtualshelves %]
323 [% END # IF opacbookbag%]
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 %].
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 %]" />
339 [% IF ( SEARCH_RESULT.score_avg ) %]
340 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
345 [% # Cell 4: Search result details and controls %]
346 <td class="bibliocol">
347 [% IF ( SEARCH_RESULT.title ) %]
348 [% img_title = SEARCH_RESULT.title %]
350 [% img_title = SEARCH_RESULT.biblionumber %]
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 %]">
355 [% IF ( OPACLocalCoverImages ) %]
356 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
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>
363 <span class="no-image">No cover image available</span>
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&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc | html %]&oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="" class="item-thumbnail" /></span>
371 <span class="no-image">No cover image available</span>
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>
379 <span class="no-image">No cover image available</span>
383 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
384 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
386 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
388 <span class="no-image">No cover image available</span>
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>
396 <span class="no-image">No cover image available</span>
400 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
401 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
403 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
405 <span class="no-image">No cover image available</span>
410 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
411 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
413 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
414 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
417 <span class="no-image">No cover image available</span>
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>
427 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
433 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
434 <!-- COinS / Openurl -->
435 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
437 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
439 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
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>
447 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
450 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
452 [% IF ( SEARCH_RESULT.num_critics ) %]
453 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
455 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
456 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
458 [% IF ( SEARCH_RESULT.num_videos ) %]
459 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
461 [% IF ( SEARCH_RESULT.num_quotations ) %]
462 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
464 </div> <!-- / .results_summary -->
465 [% END # / IF SEARCH_RESULT.score_avg %]
467 [% IF ( LibraryThingForLibrariesID ) %]
468 <div class="ltfl_reviews"></div>
471 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
472 <div class="results_summary tags">
473 <span class="label">Tags:</span>
475 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
477 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a>
478 <span class="weight">([% TagLoo.weight_total | html %])</span>
485 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
486 <div class="results_summary shelves">
487 <span class="label">Lists:</span>
489 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
491 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
492 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
499 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
500 <span class="results_summary">
501 <span class="label">Match:</span>
502 [% SEARCH_RESULT.searchhighlightblob | html %]
506 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
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>
526 [% IF SEARCH_RESULT.ratings.count > 0 %]
527 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
531 </div> <!-- / .results_summary -->
532 [% END # / IF OpacStarRatings %]
534 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
540 [% END # / FOREACH SEARCH_RESULT %]
542 </form> <!-- / #bookbag_form -->
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=""/>
549 </div> <!-- / .searchresults -->
551 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
553 [% END # / IF total %]
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?
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>
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>
573 </div> <!-- / #userresults -->
574 </div> <!-- /.span10/12 -->
575 </div> <!-- / .row -->
576 </div> <!-- / .container-fluid -->
577 </div><!-- / .main -->
579 [% INCLUDE 'opac-bottom.inc' %]
580 [% BLOCK jsinclude %]
581 [% IF ( LibraryThingForLibrariesID ) %]
582 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
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 %]
591 [% IF OpenLibraryCovers || OpenLibrarySearch %]
592 [% Asset.js("js/openlibrary.js") | $raw %]
594 [% CoverImagePlugins | $raw %]
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 + "/");
609 if (checkedCount > 0) {
610 holdBiblioNums(checkedBiblioNums);
612 alert( __("No item was selected") );
616 function holdBiblioNums(numList) {
617 // numList: biblio numbers separated by "/"
618 $("#hold_form_biblios").attr("value", numList);
619 $("#hold_form").submit();
621 [% END # /IF opacuserlogin && OPACHoldRequests %]
623 [% IF ( TagsInputEnabled && loggedinusername ) %]
624 function tagSelected() {
625 var checkedBoxes = $(".searchresults :checkbox:checked");
626 if ($(checkedBoxes).size() == 0) {
627 alert( __("No item was selected") );
629 $("#tagsel_tag").hide();
631 $("#tagsel_form").show();
635 function tagCanceled() {
636 $("#tagsel_form").hide();
637 $("#tagsel_tag").show();
639 $("#tagsel_new").val("");
640 $("#tagsel_status, .tagstatus").empty().hide();
643 function tagAdded() {
644 var checkedBoxes = $(".searchresults :checkbox:checked");
645 if ($(checkedBoxes).size() == 0) {
646 alert( __("No item was selected") );
650 var tag = $("#tagsel_new").val();
651 if (!tag || (tag == "")) {
652 alert(MSG_NO_TAG_SPECIFIED);
657 for (var i = 0; i < $(checkedBoxes).size(); i++) {
658 var box = $(checkedBoxes).get(i);
659 bibs[i] = $(box).val();
662 KOHA.Tags.add_multitags_button(bibs, tag);
665 [% END # /IF TagsInputEnabled && loggedinusername %]
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");
676 $(".selections").html(_("Select titles to: "));
677 $(controls).addClass("disabled");
681 [% IF ( OpacHighlightedWords ) %]
682 var q_array = new Array(); // holds search terms if available
684 function highlightOff() {
685 $("td").removeHighlight();
686 $(".highlight_toggle").toggle();
688 function highlightOn() {
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]);
700 $(".highlight_toggle").toggle();
702 [% END # /IF OpacHighlightedWords %]
704 $(document).ready(function(){
706 $(".moretoggle").click(function(e){
708 $(this).siblings(".collapsible-facet").toggle();
709 $(this).siblings(".moretoggle").toggle();
713 [% IF ( OpacHighlightedWords ) %]
714 $('a.title').each(function() {
715 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
719 $(".cb").click(function(){
720 enableCheckboxActions();
722 enableCheckboxActions();
724 $(".br-readonly a").on("click", function(e){
728 $('.resort').change(function() {
729 $('#bookbag_form').submit();
732 $('#results_per_page').change(function() {
733 $('#bookbag_form').submit();
736 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
737 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
738 $("#addto").on("change",function(){
741 $(".addto").find("input:submit").click(function(){
746 $("#addto").on("click",function(){
754 addtoOption = $("#addto").find("option:selected");
755 addtoval = addtoOption.val();
756 if(addtoval == "addtolist"){
757 var shelfnumber = addtoOption.attr("id").replace("s","");
759 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
762 } else if(addtoval == "newlist"){
763 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
764 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
766 alert(_("You must be logged in to create or add to lists"));
769 } else if(addtoval == "morelists"){
770 [% IF ( loggedinusername ) %]
772 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
775 alert(_("You must be logged in to create or add to lists"));
779 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
784 $("#CheckAll").on("click",function(e){
786 $(".cb").prop("checked", true);
787 enableCheckboxActions();
789 $("#CheckNone").on("click",function(e){
791 $(".cb").prop("checked", false);
792 enableCheckboxActions();
795 $(".hold").on("click", function(e){
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);
809 $("#highlight_toggle_on" ).hide().click(function(e) {
813 $("#highlight_toggle_off").show().click(function(e) {
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 ) {
828 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
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>' );
835 $overdrive_results.remove();
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 ) {
844 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
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>' );
852 $recordedbooks_results.remove();
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 ) {
861 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
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>' );
868 $openlibrary_results.remove();
871 [% END # /IF OpenLibrarySearch %]
872 [% END # /IF query_desc %]
874 [% IF ( TagsInputEnabled && loggedinusername ) %]
875 $("#tagsel_tag").show().click(function(){
879 $("#tagsel_cancel").click(function(){
883 $("#tagsel_button").click(function(){
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();
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();
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);
913 KOHA.Tags.add_tag_button(thisid, tag);
916 [% END # /IF TagsInputEnabled && loggedinusername %]
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 %]');
925 [% IF ( DidYouMean ) %]
926 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
928 $(this).addClass("dym-loaded");
932 $("input.newtag").on('keydown', function(e){
933 if (e.keyCode == 13) { e.preventDefault(); }
936 Sticky = $("#floating");
938 stickTo: ".searchresults",
939 stickyClass: "floating"