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') %]
14 [% INCLUDE 'doc-head-open.inc' %]
16 [% IF ( searchdesc ) %]
18 Results of search for '[% ms_value | html %]'
23 You did not specify any search criteria.
26 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
28 [% INCLUDE 'doc-head-close.inc' %]
30 <link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" />
32 [% BLOCK cssinclude %][% END %]
33 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
34 [% INCLUDE 'masthead.inc' %]
37 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
38 <ol class="breadcrumb">
39 <li class="breadcrumb-item">
40 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
42 [% IF ( searchdesc ) %]
43 [% IF ( ReturnPath ) %]
44 <li class="breadcrumb-item">
45 <a href="[% ReturnPath | url %]">Advanced search</a>
48 <li class="breadcrumb-item active">
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 %]">Results of search for '[% ms_value | html %]'</a>
52 <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>
56 <li class="breadcrumb-item active">
57 <a href="#" aria-current="page">You did not specify any search criteria</a>
61 </nav> <!-- /#breadcrumbs -->
63 [% UNLESS ( total ) %]
64 <div class="container-fluid">
67 <h1 id="numresults">No results found!</h1>
69 [% IF ( searchdesc ) %]
70 No results found for that in [% LibraryName | html %] catalog.
71 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" aria-label="Subscribe to this search" class="btn btn-link rsssearchlink noprint">
72 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
75 You did not specify any search criteria.
78 [% IF ( ReturnPath ) %]
79 <div class="returntosearch">
80 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
83 [% IF ( OPACNoResultsFound ) %]
84 <div id="noresultsfound">
85 [% OPACNoResultsFound | $raw %]
88 </div> <!-- / .col -->
89 </div> <!-- / .row -->
90 </div> <!-- / .container-fluid -->
91 [% END # / UNLESS searchdesc %]
93 <div class="container-fluid">
95 [% IF ( opacfacets && total ) %]
96 <div class="col-lg-2">
97 <div id="facetcontainer">
99 [% INCLUDE 'opac-facets.inc' %]
105 [% IF ( opacfacets ) %]
106 <div class="col-lg-10 maincontent">
108 <div class="col maincontent">
111 [% IF ( searchdesc ) %]
114 Your search returned [% total | html %] results.
115 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" class="btn btn-link rsssearchlink noprint" aria-label="Subscribe to this search">
116 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
120 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
122 [% END # / IF total %]
123 [% END # / IF searchdesc %]
125 <div id="userresults">
126 [% IF ( DidYouMean ) %]
127 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
130 [% IF ( koha_spsuggest ) %]
132 <ul style="list-style: none;">
133 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
135 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
139 [% END # / IF koha_spsuggest%]
141 [% IF ( ReturnPath ) %]
142 <div class="returntosearch">
143 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
147 [% IF ( query_error ) %]
148 <div class="dialog alert">
150 [% query_error | html %]
154 <!-- Search Results Table -->
157 <div class="searchresults">
158 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
159 <legend class="sr-only">Sort</legend>
160 [% IF ( searchdesc ) %]
161 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
162 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
164 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
165 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
167 [% END # IF /searchdesc %]
170 <div id="toolbar" class="toolbar row align-items-center">
171 <div id="top-pages" class="col">
172 [% INCLUDE 'page-numbers.inc' %]
175 <div class="sort_by col-sm-auto">
176 <label for="sort_by" class="sr-only">Sort by:</label>
177 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
178 [% INCLUDE 'resort_form.inc' %]
181 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
182 <label for="results_per_page">Results per page: </label>
183 <select id="results_per_page" name="count">
184 [% IF Koha.Preference('OPACnumSearchResults') %]
185 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
186 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">[% Koha.Preference('OPACnumSearchResults') | html %] (default)</option>
188 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">[% Koha.Preference('OPACnumSearchResults') | html %] (default)</option>
191 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
192 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
193 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
194 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
195 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
197 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
198 </div> <!-- /.sort_by -->
199 <div id="sortsubmit" class="sort_by col-auto">
200 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
201 </div> <!-- /.sort_by -->
202 [% END # /UNLESS tag %]
203 </div> <!-- / #toolbar -->
205 <div class="selections-toolbar toolbar noprint">
206 [% IF ( OpacHighlightedWords ) %]
207 <div class="highlight_controls noprint">
208 <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>
209 <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>
213 <div class="check_control">
214 <!-- checkall, clearall are now needed for placehold -->
215 <span class="clearall">
216 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
218 <span class="checkall">
219 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
224 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
225 <span class="selections">Select titles to:</span>
227 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
229 <select class="disabled form-control form-control-sm" name="addto" id="addto">
230 <option>Add to...</option>
231 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
232 <option value="addtocart">Cart</option>
234 [% IF Koha.Preference('virtualshelves') %]
235 [% IF loggedinusername AND add_to_some_private_shelves.count %]
236 <optgroup label="Your lists:">
237 [% SET number_of_private_shelves = 0 %]
238 [% FOREACH s IN add_to_some_private_shelves %]
239 [% IF shelfnumber != s.shelfnumber %]
240 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
241 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
242 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
247 [% IF add_to_some_public_shelves.count %]
248 <optgroup label="Public lists:">
249 [% SET number_of_public_shelves = 0 %]
250 [% FOREACH s IN add_to_some_public_shelves %]
251 [% IF shelfnumber != s.shelfnumber %]
252 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
253 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
254 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
259 [% 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 ) %]
260 <option value="morelists">[ More lists ]</option>
262 <option value="newlist">[ New list ]</option>
263 [% END # /IF virtualshelves %]
265 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
267 [% END # /IF opacbookbag || virtualshelves %]
269 [% IF ( ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
270 <button class="btn btn-link btn-sm hold disabled" type="button">
271 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
275 [% IF ( TagsInputEnabled && loggedinusername ) %]
276 <span id="tagsel_span">
277 <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>
280 </div> <!-- / .links -->
281 [% IF ( TagsInputEnabled && loggedinusername ) %]
282 <div id="tagsel_form" style="display:none">
283 <label for="tagsel_new">New tag:</label>
284 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
285 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
286 <a href="#" id="tagsel_cancel">(done)</a>
288 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
292 </div> <!-- / .selections-toolbar -->
293 </div> <!-- /#floating -->
295 <!-- TABLE RESULTS START -->
296 <table class="table table-striped">
297 <caption class="sr-only">Results</caption>
299 <!-- Actual Search Results -->
300 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
302 [% # Cell 1: Checkbox %]
303 [% IF ( SEARCH_RESULT.title ) %]
304 [% check_title = SEARCH_RESULT.title %]
306 [% check_title = SEARCH_RESULT.biblionumber %]
308 <td class="selectcol">
309 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
310 <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 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
313 <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 [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
316 [% UNLESS ( SEARCH_RESULT.norequests ) %]
317 [% 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>
320 [% END # IF OPACHoldRequests %]
321 [% END # IF virtualshelves %]
322 [% END # IF opacbookbag%]
325 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
326 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
327 [% UNLESS suppress_result_number %]
328 [% SEARCH_RESULT.result_number | html %].
332 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
333 [% # Cell 3: Show item type image %]
334 <td class="itypecol">
335 [% IF ( SEARCH_RESULT.imageurl ) %]
336 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
338 [% IF ( SEARCH_RESULT.score_avg ) %]
339 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
344 [% # Cell 4: Search result details and controls %]
345 <td class="bibliocol">
346 [% IF ( SEARCH_RESULT.title ) %]
347 [% img_title = SEARCH_RESULT.title %]
349 [% img_title = SEARCH_RESULT.biblionumber %]
351 <div class="coverimages cover-slides itemtype_[% SEARCH_RESULT.itemtype | html %]" data-isbn="[% To.json(SEARCH_RESULT.normalized_isbn) | $raw %]" data-imgtitle="[% img_title | html %]">
352 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
354 [% IF ( OPACLocalCoverImages ) %]
355 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
358 [% IF ( OPACAmazonCoverImages ) %]
359 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
360 <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 <span class="no-image">No cover image available</span>
366 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
367 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
368 <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>
370 <span class="no-image">No cover image available</span>
374 [% IF ( GoogleJackets ) %]
375 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
376 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
378 <span class="no-image">No cover image available</span>
382 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
383 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
385 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
387 <span class="no-image">No cover image available</span>
391 [% IF OpenLibraryCovers %]
392 [% IF SEARCH_RESULT.normalized_isbn %]
393 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
395 <span class="no-image">No cover image available</span>
399 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
400 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
402 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
404 <span class="no-image">No cover image available</span>
409 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
410 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
412 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
413 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
416 <span class="no-image">No cover image available</span>
420 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
421 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
422 [% IF custom_cover_image_url %]
423 [% IF ( OPACURLOpenInNewWindow ) %]
424 <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 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
432 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
433 <!-- COinS / Openurl -->
434 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
436 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
438 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
440 [% IF ( SEARCH_RESULT.score_avg ) %]
441 <div class="results_summary">
442 [% FOREACH i IN [ 1 2 3 4 5 ] %]
443 [% IF ( SEARCH_RESULT.score_int >= i ) %]
444 <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 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
449 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
451 [% IF ( SEARCH_RESULT.num_critics ) %]
452 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
454 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
455 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
457 [% IF ( SEARCH_RESULT.num_videos ) %]
458 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
460 [% IF ( SEARCH_RESULT.num_quotations ) %]
461 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
463 </div> <!-- / .results_summary -->
464 [% END # / IF SEARCH_RESULT.score_avg %]
466 [% IF ( LibraryThingForLibrariesID ) %]
467 <div class="ltfl_reviews"></div>
470 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
471 <div class="results_summary tags">
472 <span class="label">Tags:</span>
474 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
476 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a>
477 <span class="weight">([% TagLoo.weight_total | html %])</span>
484 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
485 <div class="results_summary shelves">
486 <span class="label">Lists:</span>
488 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
490 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
491 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
498 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
499 <span class="results_summary">
500 <span class="label">Match:</span>
501 [% SEARCH_RESULT.searchhighlightblob | html %]
505 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
507 [% IF ( OpacStarRatings == 'all' ) %]
508 <div class="results_summary ratings">
509 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
510 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
511 <div class="br-wrapper br-theme-fontawesome-stars">
512 <div class="br-widget br-readonly">
513 [% FOREACH i IN [ 1 2 3 4 5 ] %]
514 [% IF rating_avg_int == i %]
515 <a href="#" class="br-selected br-current"></a>
516 [% ELSIF rating_avg_int > i %]
517 <a href="#" class="br-selected"></a>
525 [% IF SEARCH_RESULT.ratings.count > 0 %]
526 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
530 </div> <!-- / .results_summary -->
531 [% END # / IF OpacStarRatings %]
533 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
539 [% END # / FOREACH SEARCH_RESULT %]
541 </form> <!-- / #bookbag_form -->
543 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
544 <legend class="sr-only">Pages</legend>
545 <!-- The value will be set by holdBiblioNums() in basket.js -->
546 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
548 </div> <!-- / .searchresults -->
550 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
552 [% END # / IF total %]
554 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
555 [% IF suggestion || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
556 <div class="suggestion">
557 Not finding what you're looking for?
560 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
561 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
562 [% ELSIF loggedinusername %]
563 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
566 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
567 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
572 </div> <!-- / #userresults -->
573 </div> <!-- /.span10/12 -->
574 </div> <!-- / .row -->
575 </div> <!-- / .container-fluid -->
576 </div><!-- / .main -->
578 [% INCLUDE 'opac-bottom.inc' %]
579 [% BLOCK jsinclude %]
580 [% IF ( LibraryThingForLibrariesID ) %]
581 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
583 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
584 [% Asset.js("js/authtoresults.js") | $raw %]
585 [% Asset.js("lib/hc-sticky.js") | $raw %]
586 [% IF ( OpacHighlightedWords ) %]
587 [% Asset.js("lib/jquery/plugins/jquery.highlight-5.js") | $raw %]
589 [% IF OpenLibraryCovers || OpenLibrarySearch %]
590 [% Asset.js("js/openlibrary.js") | $raw %]
592 [% CoverImagePlugins | $raw %]
594 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
595 function holdMultiple() {
596 var checkedBiblioNums = ""; // Separated by "/"
597 var checkedCount = 0;
598 if(document.bookbag_form.biblionumber.length > 0) {
599 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
600 if (document.bookbag_form.biblionumber[i].checked) {
601 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
607 if (checkedCount > 0) {
608 holdBiblioNums(checkedBiblioNums);
610 alert( _("No item was selected") );
614 function holdBiblioNums(numList) {
615 // numList: biblio numbers separated by "/"
616 $("#hold_form_biblios").attr("value", numList);
617 $("#hold_form").submit();
619 [% END # /IF opacuserlogin && OPACHoldRequests %]
621 [% IF ( TagsInputEnabled && loggedinusername ) %]
622 function tagSelected() {
623 var checkedBoxes = $(".searchresults :checkbox:checked");
624 if ($(checkedBoxes).size() == 0) {
625 alert( _("No item was selected") );
627 $("#tagsel_tag").hide();
629 $("#tagsel_form").show();
633 function tagCanceled() {
634 $("#tagsel_form").hide();
635 $("#tagsel_tag").show();
637 $("#tagsel_new").val("");
638 $("#tagsel_status, .tagstatus").empty().hide();
641 function tagAdded() {
642 var checkedBoxes = $(".searchresults :checkbox:checked");
643 if ($(checkedBoxes).size() == 0) {
644 alert( _("No item was selected") );
648 var tag = $("#tagsel_new").val();
649 if (!tag || (tag == "")) {
650 alert(MSG_NO_TAG_SPECIFIED);
655 for (var i = 0; i < $(checkedBoxes).size(); i++) {
656 var box = $(checkedBoxes).get(i);
657 bibs[i] = $(box).val();
660 KOHA.Tags.add_multitags_button(bibs, tag);
663 [% END # /IF TagsInputEnabled && loggedinusername %]
666 function enableCheckboxActions(){
667 // Enable/disable controls if checkboxes are checked
668 var checkedBoxes = $(".cb:checked");
669 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
670 if ($(checkedBoxes).size()) {
671 $(".selections").html(_("With selected titles: "));
672 $(controls).removeClass("disabled");
674 $(".selections").html(_("Select titles to: "));
675 $(controls).addClass("disabled");
679 [% IF ( OpacHighlightedWords ) %]
680 var q_array = new Array(); // holds search terms if available
682 function highlightOff() {
683 $("td").removeHighlight();
684 $(".highlight_toggle").toggle();
686 function highlightOn() {
689 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
690 q_array[x] = q_array[x].toLowerCase();
691 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
692 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
693 $(".title").highlight(q_array[x]);
694 $(".author").highlight(q_array[x]);
695 $(".results_summary").highlight(q_array[x]);
698 $(".highlight_toggle").toggle();
700 [% END # /IF OpacHighlightedWords %]
702 $(document).ready(function(){
704 $(".moretoggle").click(function(e){
706 $(this).siblings(".collapsible-facet").toggle();
707 $(this).siblings(".moretoggle").toggle();
711 [% IF ( OpacHighlightedWords ) %]
712 $('a.title').each(function() {
713 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
717 $(".cb").click(function(){
718 enableCheckboxActions();
720 enableCheckboxActions();
722 $(".br-readonly a").on("click", function(e){
726 $('.resort').change(function() {
727 $('#bookbag_form').submit();
730 $('#results_per_page').change(function() {
731 $('#bookbag_form').submit();
734 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
735 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
736 $("#addto").on("change",function(){
739 $(".addto").find("input:submit").click(function(){
744 $("#addto").on("click",function(){
752 addtoOption = $("#addto").find("option:selected");
753 addtoval = addtoOption.val();
754 if(addtoval == "addtolist"){
755 var shelfnumber = addtoOption.attr("id").replace("s","");
757 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
760 } else if(addtoval == "newlist"){
761 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
762 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
764 alert(_("You must be logged in to create or add to lists"));
767 } else if(addtoval == "morelists"){
768 [% IF ( loggedinusername ) %]
770 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
773 alert(_("You must be logged in to create or add to lists"));
777 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
782 $("#CheckAll").on("click",function(e){
784 $(".cb").prop("checked", true);
785 enableCheckboxActions();
787 $("#CheckNone").on("click",function(e){
789 $(".cb").prop("checked", false);
790 enableCheckboxActions();
793 $(".hold").on("click", function(e){
798 [% IF ( query_desc ) %]
799 [% IF ( OpacHighlightedWords ) %]
800 q_array = query_desc.split(" ");
801 // ensure that we don't have "" at the end of the array, which can
802 // break the highlighter
803 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
804 q_array = q_array.splice(0,-1);
807 $("#highlight_toggle_on" ).hide().click(function(e) {
811 $("#highlight_toggle_off").show().click(function(e) {
815 [% END # /IF OpacHighlightedWords %]
816 [% IF ( OverDriveEnabled ) %]
817 var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
818 $( '#numresults' ) .after( $overdrive_results );
819 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
820 //as the overdrive API treats double quotes as a search term and returns extra results
821 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
822 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
823 od_querystring = od_querystring.replace(/\"/g,"'");
824 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
826 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
830 if ( data.totalItems ) {
831 $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>' );
833 $overdrive_results.remove();
836 [% END # /IF OverDriveEnabled %]
837 [% IF ( OpenLibrarySearch ) %]
838 var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
839 $( '#numresults' ) .after( $openlibrary_results );
840 KOHA.OpenLibrary.search( querystring, null, function( data ) {
842 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
846 if ( data.numFound > 0 ) {
847 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
849 $openlibrary_results.remove();
852 [% END # /IF OpenLibrarySearch %]
853 [% END # /IF query_desc %]
855 [% IF ( TagsInputEnabled && loggedinusername ) %]
856 $("#tagsel_tag").show().click(function(){
860 $("#tagsel_cancel").click(function(){
864 $("#tagsel_button").click(function(){
869 $(".tag_add").click(function(){
870 var thisid = $(this).attr("id");
871 thisid = thisid.replace("tag_add","");
872 $(this).addClass("hidden");
873 $("#tagform"+thisid).show();
874 $("#newtag"+thisid).focus();
875 $("#newtag"+thisid+"_status").empty().hide();
878 $(".cancel_tag_add").click(function(){
879 var thisid = $(this).attr("id");
880 thisid = thisid.replace("cancel","");
881 $("#tagform"+thisid).hide();
882 $("#tag_add"+thisid).removeClass("hidden");
883 $("#newtag"+thisid).val("");
884 $("#newtag"+thisid+"_status").empty().hide();
887 $(".tagbutton").click(function(){
888 var thisid = $(this).attr("title");
889 var tag = $("#newtag"+thisid).val();
890 if (!tag || (tag == "")) {
891 alert(MSG_NO_TAG_SPECIFIED);
894 KOHA.Tags.add_tag_button(thisid, tag);
897 [% END # /IF TagsInputEnabled && loggedinusername %]
899 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
900 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
901 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
902 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
903 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
906 [% IF ( DidYouMean ) %]
907 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
909 $(this).addClass("dym-loaded");
913 $("input.newtag").on('keydown', function(e){
914 if (e.keyCode == 13) { e.preventDefault(); }
917 Sticky = $("#floating");
919 stickTo: ".searchresults",
920 stickyClass: "floating"