4 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
5 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
8 [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
9 [% SET RecordedBooksEnabled = Koha.Preference('RecordedBooksLibraryID') && Koha.Preference('RecordedBooksClientSecret') %]
12 [% INCLUDE 'doc-head-open.inc' %]
14 [% IF ( searchdesc ) %]
16 Results of search for '[% ms_value | html %]'
21 You did not specify any search criteria.
24 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
26 [% INCLUDE 'doc-head-close.inc' %]
28 <link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" />
30 [% BLOCK cssinclude %][% END %]
31 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
32 [% INCLUDE 'masthead.inc' %]
35 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
36 <ol class="breadcrumb">
37 <li class="breadcrumb-item">
38 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
40 [% IF ( searchdesc ) %]
41 [% IF ( ReturnPath ) %]
42 <li class="breadcrumb-item">
43 <a href="[% ReturnPath | url %]">Advanced search</a>
46 <li class="breadcrumb-item active">
48 <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'</a>
50 <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Search results</a>
54 <li class="breadcrumb-item active">
55 <a href="#" aria-current="page">You did not specify any search criteria</a>
59 </nav> <!-- /#breadcrumbs -->
61 [% UNLESS ( total ) %]
62 <div class="container-fluid">
65 <h1 id="numresults">No results found!</h1>
67 [% IF ( searchdesc ) %]
68 No results found for that in [% LibraryName | html %] catalog.
69 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&format=rss" aria-label="Subscribe to this search" class="btn btn-link rsssearchlink noprint">
70 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
73 You did not specify any search criteria.
76 [% IF ( ReturnPath ) %]
77 <div class="returntosearch">
78 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
81 [% IF ( OPACNoResultsFound ) %]
82 <div id="noresultsfound">
83 [% OPACNoResultsFound | $raw %]
86 </div> <!-- / .col -->
87 </div> <!-- / .row -->
88 </div> <!-- / .container-fluid -->
89 [% END # / UNLESS searchdesc %]
91 <div class="container-fluid">
93 [% IF ( opacfacets && total ) %]
94 <div class="col-lg-2">
95 <div id="facetcontainer">
97 [% INCLUDE 'opac-facets.inc' %]
104 [% IF ( opacfacets ) %]
105 <div class="col-lg-10 order-first order-md-first order-lg-2 maincontent">
107 <div class="col order-first order-md-first order-lg-2 maincontent">
110 [% IF ( opacfacets ) %]
111 <div class="col-lg-10 order-first order-md-first order-lg-2">
113 <div class="col order-first order-md-first order-lg-2">
117 [% IF ( searchdesc ) %]
120 Your search returned [% total | html %] results.
121 <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">
122 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
126 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
128 [% END # / IF total %]
129 [% END # / IF searchdesc %]
131 <div id="userresults">
132 [% IF ( DidYouMean ) %]
133 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
136 [% IF ( koha_spsuggest ) %]
138 <ul style="list-style: none;">
139 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
141 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
145 [% END # / IF koha_spsuggest%]
147 [% IF ( ReturnPath ) %]
148 <div class="returntosearch">
149 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
153 [% IF ( query_error ) %]
154 <div class="dialog alert">
156 [% query_error | html %]
160 <!-- Search Results Table -->
163 <div class="searchresults">
164 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
165 <legend class="sr-only">Sort</legend>
166 [% IF ( searchdesc ) %]
167 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
168 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
170 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
171 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
173 [% END # IF /searchdesc %]
176 <div id="toolbar" class="toolbar row align-items-center">
177 <div id="top-pages" class="col">
178 [% INCLUDE 'page-numbers.inc' %]
181 <div class="sort_by col-sm-auto">
182 <label for="sort_by" class="sr-only">Sort by:</label>
183 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
184 [% INCLUDE 'resort_form.inc' %]
187 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
188 <label for="results_per_page">Results per page: </label>
189 <select id="results_per_page" name="count">
190 [% IF Koha.Preference('OPACnumSearchResults') %]
191 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
192 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
194 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
197 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
198 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
199 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
200 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
201 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
203 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
204 </div> <!-- /.sort_by -->
205 <div id="sortsubmit" class="sort_by col-auto">
206 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
207 </div> <!-- /.sort_by -->
208 [% END # /UNLESS tag %]
209 </div> <!-- / #toolbar -->
211 <div class="selections-toolbar toolbar noprint">
212 [% IF ( OpacHighlightedWords ) %]
213 <div class="highlight_controls noprint">
214 <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>
215 <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>
219 <div class="check_control">
220 <!-- checkall, clearall are now needed for placehold -->
221 <span class="clearall">
222 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
224 <span class="checkall">
225 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
230 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
231 <span class="selections">Select titles to:</span>
233 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
235 <select class="disabled form-control form-control-sm" name="addto" id="addto">
236 <option>Add to...</option>
237 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
238 <option value="addtocart">Cart</option>
240 [% IF Koha.Preference('virtualshelves') %]
241 [% IF loggedinusername AND add_to_some_private_shelves.count %]
242 <optgroup label="Your lists:">
243 [% SET number_of_private_shelves = 0 %]
244 [% FOREACH s IN add_to_some_private_shelves %]
245 [% IF shelfnumber != s.shelfnumber %]
246 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
247 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
248 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
253 [% IF add_to_some_public_shelves.count %]
254 <optgroup label="Public lists:">
255 [% SET number_of_public_shelves = 0 %]
256 [% FOREACH s IN add_to_some_public_shelves %]
257 [% IF shelfnumber != s.shelfnumber %]
258 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
259 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
260 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
265 [% 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 ) %]
266 <option value="morelists">[ More lists ]</option>
268 <option value="newlist">[ New list ]</option>
269 [% END # /IF virtualshelves %]
271 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
273 [% END # /IF opacbookbag || virtualshelves %]
275 [% IF ( ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
276 <button class="btn btn-link btn-sm hold disabled" type="button">
277 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
281 [% IF ( TagsInputEnabled && loggedinusername ) %]
282 <span id="tagsel_span">
283 <button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button>
286 </div> <!-- / .links -->
287 [% IF ( TagsInputEnabled && loggedinusername ) %]
288 <div id="tagsel_form" style="display:none">
289 <label for="tagsel_new">New tag:</label>
290 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
291 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
292 <a href="#" id="tagsel_cancel">(done)</a>
294 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
298 </div> <!-- / .selections-toolbar -->
299 </div> <!-- /#floating -->
301 <!-- TABLE RESULTS START -->
302 <table class="table table-striped">
303 <caption class="sr-only">Results</caption>
305 <!-- Actual Search Results -->
306 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
308 [% # Cell 1: Checkbox %]
309 [% IF ( SEARCH_RESULT.title ) %]
310 [% check_title = SEARCH_RESULT.title %]
312 [% check_title = SEARCH_RESULT.biblionumber %]
314 <td class="selectcol">
315 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
316 <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>
318 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
319 <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 [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
322 [% UNLESS ( SEARCH_RESULT.norequests ) %]
323 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
326 [% END # IF OPACHoldRequests %]
327 [% END # IF virtualshelves %]
328 [% END # IF opacbookbag%]
331 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
332 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
333 [% UNLESS suppress_result_number %]
334 [% SEARCH_RESULT.result_number | html %].
338 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
339 [% # Cell 3: Show item type image %]
340 <td class="itypecol">
341 [% IF ( SEARCH_RESULT.imageurl ) %]
342 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
344 [% IF ( SEARCH_RESULT.score_avg ) %]
345 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
350 [% # Cell 4: Search result details and controls %]
351 <td class="bibliocol">
352 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
353 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
354 [% IF ( SEARCH_RESULT.title ) %]
355 [% img_title = SEARCH_RESULT.title %]
357 [% img_title = SEARCH_RESULT.biblionumber %]
359 [% IF ( OPACLocalCoverImages ) %]
360 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
363 [% IF ( OPACAmazonCoverImages ) %]
364 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
365 <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>
367 <span class="no-image">No cover image available</span>
371 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
372 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
373 <span title="[% img_title | html %]" id="syndetics-thumbnail[% loop.count | html %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc | html %]&oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="" class="item-thumbnail" /></span>
375 <span class="no-image">No cover image available</span>
379 [% IF ( GoogleJackets ) %]
380 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
381 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
383 <span class="no-image">No cover image available</span>
387 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
388 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
390 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
392 <span class="no-image">No cover image available</span>
396 [% IF OpenLibraryCovers %]
397 [% IF SEARCH_RESULT.normalized_isbn %]
398 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
400 <span class="no-image">No cover image available</span>
404 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
405 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
407 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
409 <span class="no-image">No cover image available</span>
414 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
415 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
417 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
418 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
421 <span class="no-image">No cover image available</span>
425 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
426 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
427 [% IF custom_cover_image_url %]
428 [% IF ( OPACURLOpenInNewWindow ) %]
429 <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>
431 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
437 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
438 <!-- COinS / Openurl -->
439 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
441 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
443 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
445 [% IF ( SEARCH_RESULT.score_avg ) %]
446 <div class="results_summary">
447 [% FOREACH i IN [ 1 2 3 4 5 ] %]
448 [% IF ( SEARCH_RESULT.score_int >= i ) %]
449 <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>
451 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
454 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
456 [% IF ( SEARCH_RESULT.num_critics ) %]
457 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
459 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
460 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
462 [% IF ( SEARCH_RESULT.num_videos ) %]
463 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
465 [% IF ( SEARCH_RESULT.num_quotations ) %]
466 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
468 </div> <!-- / .results_summary -->
469 [% END # / IF SEARCH_RESULT.score_avg %]
471 [% IF ( LibraryThingForLibrariesID ) %]
472 <div class="ltfl_reviews"></div>
475 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
476 <div class="results_summary tags">
477 <span class="label">Tags:</span>
479 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
481 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
482 <span class="weight">([% TagLoo.weight_total | html %])</span>
489 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
490 <div class="results_summary shelves">
491 <span class="label">Lists:</span>
493 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
495 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
496 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
503 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
504 <span class="results_summary">
505 <span class="label">Match:</span>
506 [% SEARCH_RESULT.searchhighlightblob | html %]
510 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
512 [% IF ( OpacStarRatings == 'all' ) %]
513 <div class="results_summary ratings">
514 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
515 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
516 <div class="br-wrapper br-theme-fontawesome-stars">
517 <div class="br-widget br-readonly">
518 [% FOREACH i IN [ 1 2 3 4 5 ] %]
519 [% IF rating_avg_int == i %]
520 <a href="#" class="br-selected br-current"></a>
521 [% ELSIF rating_avg_int > i %]
522 <a href="#" class="br-selected"></a>
530 [% IF SEARCH_RESULT.ratings.count > 0 %]
531 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
535 </div> <!-- / .results_summary -->
536 [% END # / IF OpacStarRatings %]
538 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
544 [% END # / FOREACH SEARCH_RESULT %]
546 </form> <!-- / #bookbag_form -->
548 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
549 <legend class="sr-only">Pages</legend>
550 <!-- The value will be set by holdBiblioNums() in basket.js -->
551 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
553 </div> <!-- / .searchresults -->
555 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
557 [% END # / IF total %]
559 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
560 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
561 <div class="suggestion">
562 Not finding what you're looking for?
564 [% IF Koha.Preference( 'suggestion' ) == 1 %]
565 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
566 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
567 [% ELSIF loggedinusername %]
568 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
571 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
572 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
577 </div> <!-- / #userresults -->
578 </div> <!-- /.span10/12 -->
579 </div> <!-- / .row -->
580 </div> <!-- / .container-fluid -->
581 </div><!-- / .main -->
583 [% INCLUDE 'opac-bottom.inc' %]
584 [% BLOCK jsinclude %]
585 [% IF ( LibraryThingForLibrariesID ) %]
586 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
588 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
589 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
590 [% Asset.js("js/authtoresults.js") | $raw %]
591 [% Asset.js("lib/hc-sticky.js") | $raw %]
592 [% IF ( OpacHighlightedWords ) %]
593 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
595 [% IF OpenLibraryCovers || OpenLibrarySearch %]
596 [% Asset.js("js/openlibrary.js") | $raw %]
600 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
601 function holdMultiple() {
602 var checkedBiblioNums = ""; // Separated by "/"
603 var checkedCount = 0;
604 if(document.bookbag_form.biblionumber.length > 0) {
605 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
606 if (document.bookbag_form.biblionumber[i].checked) {
607 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
613 if (checkedCount > 0) {
614 holdBiblioNums(checkedBiblioNums);
616 alert( __("No item was selected") );
620 function holdBiblioNums(numList) {
621 // numList: biblio numbers separated by "/"
622 $("#hold_form_biblios").attr("value", numList);
623 $("#hold_form").submit();
625 [% END # /IF opacuserlogin && OPACHoldRequests %]
627 [% IF ( TagsInputEnabled && loggedinusername ) %]
628 function tagSelected() {
629 var checkedBoxes = $(".searchresults :checkbox:checked");
630 if ($(checkedBoxes).size() == 0) {
631 alert( __("No item was selected") );
633 $("#tagsel_tag").hide();
635 $("#tagsel_form").show();
639 function tagCanceled() {
640 $("#tagsel_form").hide();
641 $("#tagsel_tag").show();
643 $("#tagsel_new").val("");
644 $("#tagsel_status, .tagstatus").empty().hide();
647 function tagAdded() {
648 var checkedBoxes = $(".searchresults :checkbox:checked");
649 if ($(checkedBoxes).size() == 0) {
650 alert( __("No item was selected") );
654 var tag = $("#tagsel_new").val();
655 if (!tag || (tag == "")) {
656 alert(MSG_NO_TAG_SPECIFIED);
661 for (var i = 0; i < $(checkedBoxes).size(); i++) {
662 var box = $(checkedBoxes).get(i);
663 bibs[i] = $(box).val();
666 KOHA.Tags.add_multitags_button(bibs, tag);
669 [% END # /IF TagsInputEnabled && loggedinusername %]
672 function enableCheckboxActions(){
673 // Enable/disable controls if checkboxes are checked
674 var checkedBoxes = $(".cb:checked");
675 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
676 if ($(checkedBoxes).size()) {
677 $(".selections").html(_("With selected titles: "));
678 $(controls).removeClass("disabled");
680 $(".selections").html(_("Select titles to: "));
681 $(controls).addClass("disabled");
685 [% IF ( OpacHighlightedWords ) %]
686 var q_array = new Array(); // holds search terms if available
688 function highlightOff() {
689 $("td").removeHighlight();
690 $(".highlight_toggle").toggle();
692 function highlightOn() {
695 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
696 q_array[x] = q_array[x].toLowerCase();
697 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
698 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
699 $(".title").highlight(q_array[x]);
700 $(".author").highlight(q_array[x]);
701 $(".results_summary").highlight(q_array[x]);
704 $(".highlight_toggle").toggle();
706 [% END # /IF OpacHighlightedWords %]
708 $(document).ready(function(){
710 $(".moretoggle").click(function(e){
712 $(this).siblings(".collapsible-facet").toggle();
713 $(this).siblings(".moretoggle").toggle();
717 [% IF ( OpacHighlightedWords ) %]
718 $('a.title').each(function() {
719 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
723 $(".cb").click(function(){
724 enableCheckboxActions();
726 enableCheckboxActions();
728 $(".br-readonly a").on("click", function(e){
732 $('.resort').change(function() {
733 $('#bookbag_form').submit();
736 $('#results_per_page').change(function() {
737 $('#bookbag_form').submit();
740 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
741 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
742 $("#addto").on("change",function(){
745 $(".addto").find("input:submit").click(function(){
750 $("#addto").on("click",function(){
758 addtoOption = $("#addto").find("option:selected");
759 addtoval = addtoOption.val();
760 if(addtoval == "addtolist"){
761 var shelfnumber = addtoOption.attr("id").replace("s","");
763 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
766 } else if(addtoval == "newlist"){
767 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
768 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
770 alert(_("You must be logged in to create or add to lists"));
773 } else if(addtoval == "morelists"){
774 [% IF ( loggedinusername ) %]
776 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
779 alert(_("You must be logged in to create or add to lists"));
783 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
788 $("#CheckAll").on("click",function(e){
790 $(".cb").prop("checked", true);
791 enableCheckboxActions();
793 $("#CheckNone").on("click",function(e){
795 $(".cb").prop("checked", false);
796 enableCheckboxActions();
799 $(".hold").on("click", function(e){
804 [% IF ( query_desc ) %]
805 [% IF ( OpacHighlightedWords ) %]
806 q_array = query_desc.split(" ");
807 // ensure that we don't have "" at the end of the array, which can
808 // break the highlighter
809 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
810 q_array = q_array.splice(0,-1);
813 $("#highlight_toggle_on" ).hide().click(function(e) {
817 $("#highlight_toggle_off").show().click(function(e) {
821 [% END # /IF OpacHighlightedWords %]
822 [% IF ( OverDriveEnabled ) %]
823 var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
824 $( '#numresults' ) .after( $overdrive_results );
825 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
826 //as the overdrive API treats double quotes as a search term and returns extra results
827 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
828 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
829 od_querystring = od_querystring.replace(/\"/g,"'");
830 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
832 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
836 if ( data.totalItems ) {
837 $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>' );
839 $overdrive_results.remove();
842 [% END # /IF OverDriveEnabled %]
843 [% IF ( RecordedBooksEnabled ) %]
844 var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
845 $( '#numresults' ) .after( $recordedbooks_results );
846 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
848 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
852 // data.total can be either 42 or "60+"
853 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
854 $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>' );
856 $recordedbooks_results.remove();
859 [% END # /IF RecordedBooksEnabled %]
860 [% IF ( OpenLibrarySearch ) %]
861 var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
862 $( '#numresults' ) .after( $openlibrary_results );
863 KOHA.OpenLibrary.search( querystring, null, function( data ) {
865 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
869 if ( data.numFound > 0 ) {
870 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
872 $openlibrary_results.remove();
875 [% END # /IF OpenLibrarySearch %]
876 [% END # /IF query_desc %]
878 [% IF ( TagsInputEnabled && loggedinusername ) %]
879 $("#tagsel_tag").show().click(function(){
883 $("#tagsel_cancel").click(function(){
887 $("#tagsel_button").click(function(){
892 $(".tag_add").click(function(){
893 var thisid = $(this).attr("id");
894 thisid = thisid.replace("tag_add","");
895 $(this).addClass("hidden");
896 $("#tagform"+thisid).show();
897 $("#newtag"+thisid).focus();
898 $("#newtag"+thisid+"_status").empty().hide();
901 $(".cancel_tag_add").click(function(){
902 var thisid = $(this).attr("id");
903 thisid = thisid.replace("cancel","");
904 $("#tagform"+thisid).hide();
905 $("#tag_add"+thisid).removeClass("hidden");
906 $("#newtag"+thisid).val("");
907 $("#newtag"+thisid+"_status").empty().hide();
910 $(".tagbutton").click(function(){
911 var thisid = $(this).attr("title");
912 var tag = $("#newtag"+thisid).val();
913 if (!tag || (tag == "")) {
914 alert(MSG_NO_TAG_SPECIFIED);
917 KOHA.Tags.add_tag_button(thisid, tag);
920 [% END # /IF TagsInputEnabled && loggedinusername %]
922 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
923 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
924 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
925 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
926 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
929 [% IF ( DidYouMean ) %]
930 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
932 $(this).addClass("dym-loaded");
936 $("input.newtag").on('keydown', function(e){
937 if (e.keyCode == 13) { e.preventDefault(); }
940 Sticky = $("#floating");
942 stickTo: ".searchresults",
943 stickyClass: "floating"