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') %]
11 [% INCLUDE 'doc-head-open.inc' %]
13 [% IF ( searchdesc ) %]
15 Results of search for '[% ms_value | html %]'
20 You did not specify any search criteria.
23 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
25 [% INCLUDE 'doc-head-close.inc' %]
27 <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" />
29 [% BLOCK cssinclude %][% END %]
30 [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
31 [% INCLUDE 'masthead.inc' %]
34 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
35 <ol class="breadcrumb">
36 <li class="breadcrumb-item">
37 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
39 [% IF ( searchdesc ) %]
40 [% IF ( ReturnPath ) %]
41 <li class="breadcrumb-item">
42 <a href="[% ReturnPath | url %]">Advanced search</a>
45 <li class="breadcrumb-item active">
47 <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'</a>
49 <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>
53 <li class="breadcrumb-item active">
54 <a href="#" aria-current="page">You did not specify any search criteria</a>
58 </nav> <!-- /#breadcrumbs -->
60 [% UNLESS ( total ) %]
61 <div class="container-fluid">
64 <h1 id="numresults">No results found!</h1>
66 [% IF ( searchdesc ) %]
67 No results found for that in [% LibraryName | html %] catalog.
68 <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">
69 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
72 You did not specify any search criteria.
75 [% IF ( ReturnPath ) %]
76 <div class="returntosearch">
77 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
80 [% IF ( OPACNoResultsFound ) %]
81 <div id="noresultsfound">
82 [% OPACNoResultsFound | $raw %]
85 </div> <!-- / .col -->
86 </div> <!-- / .row -->
87 </div> <!-- / .container-fluid -->
88 [% END # / UNLESS searchdesc %]
90 <div class="container-fluid">
92 [% IF ( opacfacets && total ) %]
93 <div class="col-lg-2">
94 <div id="facetcontainer">
96 [% INCLUDE 'opac-facets.inc' %]
102 [% IF ( opacfacets ) %]
103 <div class="col-lg-10 maincontent">
105 <div class="col maincontent">
108 [% IF ( searchdesc ) %]
111 Your search returned [% total | html %] results.
112 <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">
113 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
117 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
119 [% END # / IF total %]
120 [% END # / IF searchdesc %]
122 <div id="userresults">
123 [% IF ( DidYouMean ) %]
124 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
127 [% IF ( koha_spsuggest ) %]
129 <ul style="list-style: none;">
130 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
132 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
136 [% END # / IF koha_spsuggest%]
138 [% IF ( ReturnPath ) %]
139 <div class="returntosearch">
140 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
144 [% IF ( query_error ) %]
145 <div class="dialog alert">
147 [% query_error | html %]
151 <!-- Search Results Table -->
154 <div class="searchresults">
155 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
156 <legend class="sr-only">Sort</legend>
157 [% IF ( searchdesc ) %]
158 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
159 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
161 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
162 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
164 [% END # IF /searchdesc %]
167 <div id="toolbar" class="toolbar row align-items-center">
168 <div id="top-pages" class="col">
169 [% INCLUDE 'page-numbers.inc' %]
172 <div class="sort_by col-sm-auto">
173 <label for="sort_by" class="sr-only">Sort by:</label>
174 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
175 [% INCLUDE 'resort_form.inc' %]
178 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
179 <label for="results_per_page">Results per page: </label>
180 <select id="results_per_page" name="count">
181 [% IF Koha.Preference('OPACnumSearchResults') %]
182 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
183 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">[% Koha.Preference('OPACnumSearchResults') | html %] (default)</option>
185 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">[% Koha.Preference('OPACnumSearchResults') | html %] (default)</option>
188 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
189 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
190 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
191 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
192 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
194 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
195 </div> <!-- /.sort_by -->
196 <div id="sortsubmit" class="sort_by col-auto">
197 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
198 </div> <!-- /.sort_by -->
199 [% END # /UNLESS tag %]
200 </div> <!-- / #toolbar -->
202 <div class="selections-toolbar toolbar noprint">
203 [% IF ( OpacHighlightedWords ) %]
204 <div class="highlight_controls noprint">
205 <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>
206 <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>
210 <div class="check_control">
211 <!-- checkall, clearall are now needed for placehold -->
212 <span class="clearall">
213 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
215 <span class="checkall">
216 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
221 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
222 <span class="selections">Select titles to:</span>
224 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
226 <select class="disabled form-control form-control-sm" name="addto" id="addto">
227 <option>Add to...</option>
228 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
229 <option value="addtocart">Cart</option>
231 [% IF Koha.Preference('virtualshelves') %]
232 [% IF loggedinusername AND add_to_some_private_shelves.count %]
233 <optgroup label="Your lists:">
234 [% SET number_of_private_shelves = 0 %]
235 [% FOREACH s IN add_to_some_private_shelves %]
236 [% IF shelfnumber != s.shelfnumber %]
237 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
238 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
239 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
244 [% IF add_to_some_public_shelves.count %]
245 <optgroup label="Public lists:">
246 [% SET number_of_public_shelves = 0 %]
247 [% FOREACH s IN add_to_some_public_shelves %]
248 [% IF shelfnumber != s.shelfnumber %]
249 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
250 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
251 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
256 [% 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 ) %]
257 <option value="morelists">[ More lists ]</option>
259 <option value="newlist">[ New list ]</option>
260 [% END # /IF virtualshelves %]
262 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
264 [% END # /IF opacbookbag || virtualshelves %]
266 [% IF ( ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
267 <button class="btn btn-link btn-sm hold disabled" type="button">
268 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
272 [% IF ( TagsInputEnabled && loggedinusername ) %]
273 <span id="tagsel_span">
274 <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>
277 </div> <!-- / .links -->
278 [% IF ( TagsInputEnabled && loggedinusername ) %]
279 <div id="tagsel_form" style="display:none">
280 <label for="tagsel_new">New tag:</label>
281 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
282 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
283 <a href="#" id="tagsel_cancel">(done)</a>
285 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
289 </div> <!-- / .selections-toolbar -->
290 </div> <!-- /#floating -->
292 <!-- TABLE RESULTS START -->
293 <table class="table table-striped">
294 <caption class="sr-only">Results</caption>
296 <!-- Actual Search Results -->
297 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
299 [% # Cell 1: Checkbox %]
300 [% IF ( SEARCH_RESULT.title ) %]
301 [% check_title = SEARCH_RESULT.title %]
303 [% check_title = SEARCH_RESULT.biblionumber %]
305 <td class="selectcol">
306 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
307 <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]" /> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
309 [% IF Koha.Preference( 'virtualshelves' ) == 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( 'OPACHoldRequests' ) == 1 %]
313 [% UNLESS ( SEARCH_RESULT.norequests ) %]
314 [% 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>
317 [% END # IF OPACHoldRequests %]
318 [% END # IF virtualshelves %]
319 [% END # IF opacbookbag%]
322 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
323 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
324 [% UNLESS suppress_result_number %]
325 [% SEARCH_RESULT.result_number | html %].
329 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
330 [% # Cell 3: Show item type image %]
331 <td class="itypecol">
332 [% IF ( SEARCH_RESULT.imageurl ) %]
333 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
335 [% IF ( SEARCH_RESULT.score_avg ) %]
336 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
341 [% # Cell 4: Search result details and controls %]
342 <td class="bibliocol">
343 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
344 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
345 [% IF ( SEARCH_RESULT.title ) %]
346 [% img_title = SEARCH_RESULT.title %]
348 [% img_title = SEARCH_RESULT.biblionumber %]
350 [% IF ( OPACLocalCoverImages ) %]
351 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
354 [% IF ( OPACAmazonCoverImages ) %]
355 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
356 <span title="[% img_title | html %]" id="amazon-thumbnail[% loop.count | html %]"><img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="item-thumbnail" /></span>
358 <span class="no-image">No cover image available</span>
362 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
363 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
364 <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>
366 <span class="no-image">No cover image available</span>
370 [% IF ( GoogleJackets ) %]
371 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
372 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
374 <span class="no-image">No cover image available</span>
378 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
379 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
381 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
383 <span class="no-image">No cover image available</span>
387 [% IF OpenLibraryCovers %]
388 [% IF SEARCH_RESULT.normalized_isbn %]
389 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
391 <span class="no-image">No cover image available</span>
395 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
396 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
398 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
400 <span class="no-image">No cover image available</span>
405 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
406 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
408 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
409 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
412 <span class="no-image">No cover image available</span>
416 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
417 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
418 [% IF custom_cover_image_url %]
419 [% IF ( OPACURLOpenInNewWindow ) %]
420 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" target="_blank" rel="noreferrer"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
422 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
428 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
429 <!-- COinS / Openurl -->
430 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
432 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
434 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
436 [% IF ( SEARCH_RESULT.score_avg ) %]
437 <div class="results_summary">
438 [% FOREACH i IN [ 1 2 3 4 5 ] %]
439 [% IF ( SEARCH_RESULT.score_int >= i ) %]
440 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly star-rating-on"><a title="[% i | html %]">[% i | html %]</a></div>
442 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
445 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
447 [% IF ( SEARCH_RESULT.num_critics ) %]
448 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
450 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
451 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
453 [% IF ( SEARCH_RESULT.num_videos ) %]
454 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
456 [% IF ( SEARCH_RESULT.num_quotations ) %]
457 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
459 </div> <!-- / .results_summary -->
460 [% END # / IF SEARCH_RESULT.score_avg %]
462 [% IF ( LibraryThingForLibrariesID ) %]
463 <div class="ltfl_reviews"></div>
466 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
467 <div class="results_summary tags">
468 <span class="label">Tags:</span>
470 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
472 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a>
473 <span class="weight">([% TagLoo.weight_total | html %])</span>
480 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
481 <div class="results_summary shelves">
482 <span class="label">Lists:</span>
484 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
486 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
487 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
494 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
495 <span class="results_summary">
496 <span class="label">Match:</span>
497 [% SEARCH_RESULT.searchhighlightblob | html %]
501 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
503 [% IF ( OpacStarRatings == 'all' ) %]
504 <div class="results_summary ratings">
505 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
506 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
507 <div class="br-wrapper br-theme-fontawesome-stars">
508 <div class="br-widget br-readonly">
509 [% FOREACH i IN [ 1 2 3 4 5 ] %]
510 [% IF rating_avg_int == i %]
511 <a href="#" class="br-selected br-current"></a>
512 [% ELSIF rating_avg_int > i %]
513 <a href="#" class="br-selected"></a>
521 [% IF SEARCH_RESULT.ratings.count > 0 %]
522 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
526 </div> <!-- / .results_summary -->
527 [% END # / IF OpacStarRatings %]
529 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
535 [% END # / FOREACH SEARCH_RESULT %]
537 </form> <!-- / #bookbag_form -->
539 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
540 <legend class="sr-only">Pages</legend>
541 <!-- The value will be set by holdBiblioNums() in basket.js -->
542 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
544 </div> <!-- / .searchresults -->
546 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
548 [% END # / IF total %]
550 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
551 [% IF suggestion || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
552 <div class="suggestion">
553 Not finding what you're looking for?
556 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
557 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
558 [% ELSIF loggedinusername %]
559 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
562 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
563 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
568 </div> <!-- / #userresults -->
569 </div> <!-- /.span10/12 -->
570 </div> <!-- / .row -->
571 </div> <!-- / .container-fluid -->
572 </div><!-- / .main -->
574 [% INCLUDE 'opac-bottom.inc' %]
575 [% BLOCK jsinclude %]
576 [% IF ( LibraryThingForLibrariesID ) %]
577 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
579 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
580 [% Asset.js("js/authtoresults.js") | $raw %]
581 [% Asset.js("lib/hc-sticky.js") | $raw %]
582 [% IF ( OpacHighlightedWords ) %]
583 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
585 [% IF OpenLibraryCovers || OpenLibrarySearch %]
586 [% Asset.js("js/openlibrary.js") | $raw %]
590 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
591 function holdMultiple() {
592 var checkedBiblioNums = ""; // Separated by "/"
593 var checkedCount = 0;
594 if(document.bookbag_form.biblionumber.length > 0) {
595 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
596 if (document.bookbag_form.biblionumber[i].checked) {
597 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
603 if (checkedCount > 0) {
604 holdBiblioNums(checkedBiblioNums);
606 alert( __("No item was selected") );
610 function holdBiblioNums(numList) {
611 // numList: biblio numbers separated by "/"
612 $("#hold_form_biblios").attr("value", numList);
613 $("#hold_form").submit();
615 [% END # /IF opacuserlogin && OPACHoldRequests %]
617 [% IF ( TagsInputEnabled && loggedinusername ) %]
618 function tagSelected() {
619 var checkedBoxes = $(".searchresults :checkbox:checked");
620 if ($(checkedBoxes).size() == 0) {
621 alert( __("No item was selected") );
623 $("#tagsel_tag").hide();
625 $("#tagsel_form").show();
629 function tagCanceled() {
630 $("#tagsel_form").hide();
631 $("#tagsel_tag").show();
633 $("#tagsel_new").val("");
634 $("#tagsel_status, .tagstatus").empty().hide();
637 function tagAdded() {
638 var checkedBoxes = $(".searchresults :checkbox:checked");
639 if ($(checkedBoxes).size() == 0) {
640 alert( __("No item was selected") );
644 var tag = $("#tagsel_new").val();
645 if (!tag || (tag == "")) {
646 alert(MSG_NO_TAG_SPECIFIED);
651 for (var i = 0; i < $(checkedBoxes).size(); i++) {
652 var box = $(checkedBoxes).get(i);
653 bibs[i] = $(box).val();
656 KOHA.Tags.add_multitags_button(bibs, tag);
659 [% END # /IF TagsInputEnabled && loggedinusername %]
662 function enableCheckboxActions(){
663 // Enable/disable controls if checkboxes are checked
664 var checkedBoxes = $(".cb:checked");
665 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
666 if ($(checkedBoxes).size()) {
667 $(".selections").html(_("With selected titles: "));
668 $(controls).removeClass("disabled");
670 $(".selections").html(_("Select titles to: "));
671 $(controls).addClass("disabled");
675 [% IF ( OpacHighlightedWords ) %]
676 var q_array = new Array(); // holds search terms if available
678 function highlightOff() {
679 $("td").removeHighlight();
680 $(".highlight_toggle").toggle();
682 function highlightOn() {
685 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
686 q_array[x] = q_array[x].toLowerCase();
687 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
688 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
689 $(".title").highlight(q_array[x]);
690 $(".author").highlight(q_array[x]);
691 $(".results_summary").highlight(q_array[x]);
694 $(".highlight_toggle").toggle();
696 [% END # /IF OpacHighlightedWords %]
698 $(document).ready(function(){
700 $(".moretoggle").click(function(e){
702 $(this).siblings(".collapsible-facet").toggle();
703 $(this).siblings(".moretoggle").toggle();
707 [% IF ( OpacHighlightedWords ) %]
708 $('a.title').each(function() {
709 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
713 $(".cb").click(function(){
714 enableCheckboxActions();
716 enableCheckboxActions();
718 $(".br-readonly a").on("click", function(e){
722 $('.resort').change(function() {
723 $('#bookbag_form').submit();
726 $('#results_per_page').change(function() {
727 $('#bookbag_form').submit();
730 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
731 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
732 $("#addto").on("change",function(){
735 $(".addto").find("input:submit").click(function(){
740 $("#addto").on("click",function(){
748 addtoOption = $("#addto").find("option:selected");
749 addtoval = addtoOption.val();
750 if(addtoval == "addtolist"){
751 var shelfnumber = addtoOption.attr("id").replace("s","");
753 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
756 } else if(addtoval == "newlist"){
757 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
758 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
760 alert(_("You must be logged in to create or add to lists"));
763 } else if(addtoval == "morelists"){
764 [% IF ( loggedinusername ) %]
766 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
769 alert(_("You must be logged in to create or add to lists"));
773 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
778 $("#CheckAll").on("click",function(e){
780 $(".cb").prop("checked", true);
781 enableCheckboxActions();
783 $("#CheckNone").on("click",function(e){
785 $(".cb").prop("checked", false);
786 enableCheckboxActions();
789 $(".hold").on("click", function(e){
794 [% IF ( query_desc ) %]
795 [% IF ( OpacHighlightedWords ) %]
796 q_array = query_desc.split(" ");
797 // ensure that we don't have "" at the end of the array, which can
798 // break the highlighter
799 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
800 q_array = q_array.splice(0,-1);
803 $("#highlight_toggle_on" ).hide().click(function(e) {
807 $("#highlight_toggle_off").show().click(function(e) {
811 [% END # /IF OpacHighlightedWords %]
812 [% IF ( OverDriveEnabled ) %]
813 var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
814 $( '#numresults' ) .after( $overdrive_results );
815 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
816 //as the overdrive API treats double quotes as a search term and returns extra results
817 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
818 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
819 od_querystring = od_querystring.replace(/\"/g,"'");
820 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
822 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
826 if ( data.totalItems ) {
827 $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>' );
829 $overdrive_results.remove();
832 [% END # /IF OverDriveEnabled %]
833 [% IF ( OpenLibrarySearch ) %]
834 var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
835 $( '#numresults' ) .after( $openlibrary_results );
836 KOHA.OpenLibrary.search( querystring, null, function( data ) {
838 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
842 if ( data.numFound > 0 ) {
843 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
845 $openlibrary_results.remove();
848 [% END # /IF OpenLibrarySearch %]
849 [% END # /IF query_desc %]
851 [% IF ( TagsInputEnabled && loggedinusername ) %]
852 $("#tagsel_tag").show().click(function(){
856 $("#tagsel_cancel").click(function(){
860 $("#tagsel_button").click(function(){
865 $(".tag_add").click(function(){
866 var thisid = $(this).attr("id");
867 thisid = thisid.replace("tag_add","");
868 $(this).addClass("hidden");
869 $("#tagform"+thisid).show();
870 $("#newtag"+thisid).focus();
871 $("#newtag"+thisid+"_status").empty().hide();
874 $(".cancel_tag_add").click(function(){
875 var thisid = $(this).attr("id");
876 thisid = thisid.replace("cancel","");
877 $("#tagform"+thisid).hide();
878 $("#tag_add"+thisid).removeClass("hidden");
879 $("#newtag"+thisid).val("");
880 $("#newtag"+thisid+"_status").empty().hide();
883 $(".tagbutton").click(function(){
884 var thisid = $(this).attr("title");
885 var tag = $("#newtag"+thisid).val();
886 if (!tag || (tag == "")) {
887 alert(MSG_NO_TAG_SPECIFIED);
890 KOHA.Tags.add_tag_button(thisid, tag);
893 [% END # /IF TagsInputEnabled && loggedinusername %]
895 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
896 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
897 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
898 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
899 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
902 [% IF ( DidYouMean ) %]
903 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
905 $(this).addClass("dym-loaded");
909 $("input.newtag").on('keydown', function(e){
910 if (e.keyCode == 13) { e.preventDefault(); }
913 Sticky = $("#floating");
915 stickTo: ".searchresults",
916 stickyClass: "floating"