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' %]
103 [% IF ( opacfacets ) %]
104 <div class="col-lg-10 maincontent">
106 <div class="col maincontent">
109 [% IF ( searchdesc ) %]
112 Your search returned [% total | html %] results.
113 <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">
114 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
118 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
120 [% END # / IF total %]
121 [% END # / IF searchdesc %]
123 <div id="userresults">
124 [% IF ( DidYouMean ) %]
125 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
128 [% IF ( koha_spsuggest ) %]
130 <ul style="list-style: none;">
131 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
133 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
137 [% END # / IF koha_spsuggest%]
139 [% IF ( ReturnPath ) %]
140 <div class="returntosearch">
141 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
145 [% IF ( query_error ) %]
146 <div class="dialog alert">
148 [% query_error | html %]
152 <!-- Search Results Table -->
155 <div class="searchresults">
156 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
157 <legend class="sr-only">Sort</legend>
158 [% IF ( searchdesc ) %]
159 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
160 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
162 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
163 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
165 [% END # IF /searchdesc %]
168 <div id="toolbar" class="toolbar row align-items-center">
169 <div id="top-pages" class="col">
170 [% INCLUDE 'page-numbers.inc' %]
173 <div class="sort_by col-sm-auto">
174 <label for="sort_by" class="sr-only">Sort by:</label>
175 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
176 [% INCLUDE 'resort_form.inc' %]
179 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
180 <label for="results_per_page">Results per page: </label>
181 <select id="results_per_page" name="count">
182 [% IF Koha.Preference('OPACnumSearchResults') %]
183 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
184 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
186 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
189 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
190 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
191 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
192 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
193 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
195 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
196 </div> <!-- /.sort_by -->
197 <div id="sortsubmit" class="sort_by col-auto">
198 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
199 </div> <!-- /.sort_by -->
200 [% END # /UNLESS tag %]
201 </div> <!-- / #toolbar -->
203 <div class="selections-toolbar toolbar noprint">
204 [% IF ( OpacHighlightedWords ) %]
205 <div class="highlight_controls noprint">
206 <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>
207 <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a>
211 <div class="check_control">
212 <!-- checkall, clearall are now needed for placehold -->
213 <span class="clearall">
214 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
216 <span class="checkall">
217 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
222 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
223 <span class="selections">Select titles to:</span>
225 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
227 <select class="disabled form-control form-control-sm" name="addto" id="addto">
228 <option>Add to...</option>
229 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
230 <option value="addtocart">Cart</option>
232 [% IF Koha.Preference('virtualshelves') %]
233 [% IF loggedinusername AND add_to_some_private_shelves.count %]
234 <optgroup label="Your lists:">
235 [% SET number_of_private_shelves = 0 %]
236 [% FOREACH s IN add_to_some_private_shelves %]
237 [% IF shelfnumber != s.shelfnumber %]
238 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
239 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
240 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
245 [% IF add_to_some_public_shelves.count %]
246 <optgroup label="Public lists:">
247 [% SET number_of_public_shelves = 0 %]
248 [% FOREACH s IN add_to_some_public_shelves %]
249 [% IF shelfnumber != s.shelfnumber %]
250 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
251 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
252 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
257 [% 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 ) %]
258 <option value="morelists">[ More lists ]</option>
260 <option value="newlist">[ New list ]</option>
261 [% END # /IF virtualshelves %]
263 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
265 [% END # /IF opacbookbag || virtualshelves %]
267 [% IF ( ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
268 <button class="btn btn-link btn-sm hold disabled" type="button">
269 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
273 [% IF ( TagsInputEnabled && loggedinusername ) %]
274 <span id="tagsel_span">
275 <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>
278 </div> <!-- / .links -->
279 [% IF ( TagsInputEnabled && loggedinusername ) %]
280 <div id="tagsel_form" style="display:none">
281 <label for="tagsel_new">New tag:</label>
282 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
283 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
284 <a href="#" id="tagsel_cancel">(done)</a>
286 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
290 </div> <!-- / .selections-toolbar -->
291 </div> <!-- /#floating -->
293 <!-- TABLE RESULTS START -->
294 <table class="table table-striped">
295 <caption class="sr-only">Results</caption>
297 <!-- Actual Search Results -->
298 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
300 [% # Cell 1: Checkbox %]
301 [% IF ( SEARCH_RESULT.title ) %]
302 [% check_title = SEARCH_RESULT.title %]
304 [% check_title = SEARCH_RESULT.biblionumber %]
306 <td class="selectcol">
307 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
308 <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>
310 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
311 <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
313 [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
314 [% UNLESS ( SEARCH_RESULT.norequests ) %]
315 [% 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>
318 [% END # IF OPACHoldRequests %]
319 [% END # IF virtualshelves %]
320 [% END # IF opacbookbag%]
323 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
324 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
325 [% UNLESS suppress_result_number %]
326 [% SEARCH_RESULT.result_number | html %].
330 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
331 [% # Cell 3: Show item type image %]
332 <td class="itypecol">
333 [% IF ( SEARCH_RESULT.imageurl ) %]
334 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
336 [% IF ( SEARCH_RESULT.score_avg ) %]
337 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
342 [% # Cell 4: Search result details and controls %]
343 <td class="bibliocol">
344 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
345 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
346 [% IF ( SEARCH_RESULT.title ) %]
347 [% img_title = SEARCH_RESULT.title %]
349 [% img_title = SEARCH_RESULT.biblionumber %]
351 [% IF ( OPACLocalCoverImages ) %]
352 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
355 [% IF ( OPACAmazonCoverImages ) %]
356 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
357 <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>
359 <span class="no-image">No cover image available</span>
363 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
364 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
365 <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>
367 <span class="no-image">No cover image available</span>
371 [% IF ( GoogleJackets ) %]
372 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
373 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
375 <span class="no-image">No cover image available</span>
379 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
380 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
382 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
384 <span class="no-image">No cover image available</span>
388 [% IF OpenLibraryCovers %]
389 [% IF SEARCH_RESULT.normalized_isbn %]
390 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
392 <span class="no-image">No cover image available</span>
396 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
397 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
399 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
401 <span class="no-image">No cover image available</span>
406 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
407 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
409 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
410 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
413 <span class="no-image">No cover image available</span>
417 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
418 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
419 [% IF custom_cover_image_url %]
420 [% IF ( OPACURLOpenInNewWindow ) %]
421 <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>
423 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
429 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
430 <!-- COinS / Openurl -->
431 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
433 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
435 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
437 [% IF ( SEARCH_RESULT.score_avg ) %]
438 <div class="results_summary">
439 [% FOREACH i IN [ 1 2 3 4 5 ] %]
440 [% IF ( SEARCH_RESULT.score_int >= i ) %]
441 <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>
443 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
446 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
448 [% IF ( SEARCH_RESULT.num_critics ) %]
449 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
451 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
452 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
454 [% IF ( SEARCH_RESULT.num_videos ) %]
455 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
457 [% IF ( SEARCH_RESULT.num_quotations ) %]
458 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
460 </div> <!-- / .results_summary -->
461 [% END # / IF SEARCH_RESULT.score_avg %]
463 [% IF ( LibraryThingForLibrariesID ) %]
464 <div class="ltfl_reviews"></div>
467 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
468 <div class="results_summary tags">
469 <span class="label">Tags:</span>
471 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
473 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a>
474 <span class="weight">([% TagLoo.weight_total | html %])</span>
481 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
482 <div class="results_summary shelves">
483 <span class="label">Lists:</span>
485 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
487 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
488 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
495 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
496 <span class="results_summary">
497 <span class="label">Match:</span>
498 [% SEARCH_RESULT.searchhighlightblob | html %]
502 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
504 [% IF ( OpacStarRatings == 'all' ) %]
505 <div class="results_summary ratings">
506 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
507 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
508 <div class="br-wrapper br-theme-fontawesome-stars">
509 <div class="br-widget br-readonly">
510 [% FOREACH i IN [ 1 2 3 4 5 ] %]
511 [% IF rating_avg_int == i %]
512 <a href="#" class="br-selected br-current"></a>
513 [% ELSIF rating_avg_int > i %]
514 <a href="#" class="br-selected"></a>
522 [% IF SEARCH_RESULT.ratings.count > 0 %]
523 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
527 </div> <!-- / .results_summary -->
528 [% END # / IF OpacStarRatings %]
530 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
536 [% END # / FOREACH SEARCH_RESULT %]
538 </form> <!-- / #bookbag_form -->
540 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
541 <legend class="sr-only">Pages</legend>
542 <!-- The value will be set by holdBiblioNums() in basket.js -->
543 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
545 </div> <!-- / .searchresults -->
547 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
549 [% END # / IF total %]
551 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
552 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
553 <div class="suggestion">
554 Not finding what you're looking for?
556 [% IF Koha.Preference( 'suggestion' ) == 1 %]
557 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
558 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
559 [% ELSIF loggedinusername %]
560 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
563 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
564 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
569 </div> <!-- / #userresults -->
570 </div> <!-- /.span10/12 -->
571 </div> <!-- / .row -->
572 </div> <!-- / .container-fluid -->
573 </div><!-- / .main -->
575 [% INCLUDE 'opac-bottom.inc' %]
576 [% BLOCK jsinclude %]
577 [% IF ( LibraryThingForLibrariesID ) %]
578 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
580 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
581 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
582 [% Asset.js("js/authtoresults.js") | $raw %]
583 [% Asset.js("lib/hc-sticky.js") | $raw %]
584 [% IF ( OpacHighlightedWords ) %]
585 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
587 [% IF OpenLibraryCovers || OpenLibrarySearch %]
588 [% Asset.js("js/openlibrary.js") | $raw %]
592 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
593 function holdMultiple() {
594 var checkedBiblioNums = ""; // Separated by "/"
595 var checkedCount = 0;
596 if(document.bookbag_form.biblionumber.length > 0) {
597 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
598 if (document.bookbag_form.biblionumber[i].checked) {
599 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
605 if (checkedCount > 0) {
606 holdBiblioNums(checkedBiblioNums);
608 alert( __("No item was selected") );
612 function holdBiblioNums(numList) {
613 // numList: biblio numbers separated by "/"
614 $("#hold_form_biblios").attr("value", numList);
615 $("#hold_form").submit();
617 [% END # /IF opacuserlogin && OPACHoldRequests %]
619 [% IF ( TagsInputEnabled && loggedinusername ) %]
620 function tagSelected() {
621 var checkedBoxes = $(".searchresults :checkbox:checked");
622 if ($(checkedBoxes).size() == 0) {
623 alert( __("No item was selected") );
625 $("#tagsel_tag").hide();
627 $("#tagsel_form").show();
631 function tagCanceled() {
632 $("#tagsel_form").hide();
633 $("#tagsel_tag").show();
635 $("#tagsel_new").val("");
636 $("#tagsel_status, .tagstatus").empty().hide();
639 function tagAdded() {
640 var checkedBoxes = $(".searchresults :checkbox:checked");
641 if ($(checkedBoxes).size() == 0) {
642 alert( __("No item was selected") );
646 var tag = $("#tagsel_new").val();
647 if (!tag || (tag == "")) {
648 alert(MSG_NO_TAG_SPECIFIED);
653 for (var i = 0; i < $(checkedBoxes).size(); i++) {
654 var box = $(checkedBoxes).get(i);
655 bibs[i] = $(box).val();
658 KOHA.Tags.add_multitags_button(bibs, tag);
661 [% END # /IF TagsInputEnabled && loggedinusername %]
664 function enableCheckboxActions(){
665 // Enable/disable controls if checkboxes are checked
666 var checkedBoxes = $(".cb:checked");
667 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
668 if ($(checkedBoxes).size()) {
669 $(".selections").html(_("With selected titles: "));
670 $(controls).removeClass("disabled");
672 $(".selections").html(_("Select titles to: "));
673 $(controls).addClass("disabled");
677 [% IF ( OpacHighlightedWords ) %]
678 var q_array = new Array(); // holds search terms if available
680 function highlightOff() {
681 $("td").removeHighlight();
682 $(".highlight_toggle").toggle();
684 function highlightOn() {
687 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
688 q_array[x] = q_array[x].toLowerCase();
689 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
690 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
691 $(".title").highlight(q_array[x]);
692 $(".author").highlight(q_array[x]);
693 $(".results_summary").highlight(q_array[x]);
696 $(".highlight_toggle").toggle();
698 [% END # /IF OpacHighlightedWords %]
700 $(document).ready(function(){
702 $(".moretoggle").click(function(e){
704 $(this).siblings(".collapsible-facet").toggle();
705 $(this).siblings(".moretoggle").toggle();
709 [% IF ( OpacHighlightedWords ) %]
710 $('a.title').each(function() {
711 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
715 $(".cb").click(function(){
716 enableCheckboxActions();
718 enableCheckboxActions();
720 $(".br-readonly a").on("click", function(e){
724 $('.resort').change(function() {
725 $('#bookbag_form').submit();
728 $('#results_per_page').change(function() {
729 $('#bookbag_form').submit();
732 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
733 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
734 $("#addto").on("change",function(){
737 $(".addto").find("input:submit").click(function(){
742 $("#addto").on("click",function(){
750 addtoOption = $("#addto").find("option:selected");
751 addtoval = addtoOption.val();
752 if(addtoval == "addtolist"){
753 var shelfnumber = addtoOption.attr("id").replace("s","");
755 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
758 } else if(addtoval == "newlist"){
759 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
760 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
762 alert(_("You must be logged in to create or add to lists"));
765 } else if(addtoval == "morelists"){
766 [% IF ( loggedinusername ) %]
768 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
771 alert(_("You must be logged in to create or add to lists"));
775 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
780 $("#CheckAll").on("click",function(e){
782 $(".cb").prop("checked", true);
783 enableCheckboxActions();
785 $("#CheckNone").on("click",function(e){
787 $(".cb").prop("checked", false);
788 enableCheckboxActions();
791 $(".hold").on("click", function(e){
796 [% IF ( query_desc ) %]
797 [% IF ( OpacHighlightedWords ) %]
798 q_array = query_desc.split(" ");
799 // ensure that we don't have "" at the end of the array, which can
800 // break the highlighter
801 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
802 q_array = q_array.splice(0,-1);
805 $("#highlight_toggle_on" ).hide().click(function(e) {
809 $("#highlight_toggle_off").show().click(function(e) {
813 [% END # /IF OpacHighlightedWords %]
814 [% IF ( OverDriveEnabled ) %]
815 var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
816 $( '#numresults' ) .after( $overdrive_results );
817 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
818 //as the overdrive API treats double quotes as a search term and returns extra results
819 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
820 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
821 od_querystring = od_querystring.replace(/\"/g,"'");
822 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
824 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
828 if ( data.totalItems ) {
829 $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>' );
831 $overdrive_results.remove();
834 [% END # /IF OverDriveEnabled %]
835 [% IF ( RecordedBooksEnabled ) %]
836 var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
837 $( '#numresults' ) .after( $recordedbooks_results );
838 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
840 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
844 // data.total can be either 42 or "60+"
845 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
846 $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>' );
848 $recordedbooks_results.remove();
851 [% END # /IF RecordedBooksEnabled %]
852 [% IF ( OpenLibrarySearch ) %]
853 var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
854 $( '#numresults' ) .after( $openlibrary_results );
855 KOHA.OpenLibrary.search( querystring, null, function( data ) {
857 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
861 if ( data.numFound > 0 ) {
862 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
864 $openlibrary_results.remove();
867 [% END # /IF OpenLibrarySearch %]
868 [% END # /IF query_desc %]
870 [% IF ( TagsInputEnabled && loggedinusername ) %]
871 $("#tagsel_tag").show().click(function(){
875 $("#tagsel_cancel").click(function(){
879 $("#tagsel_button").click(function(){
884 $(".tag_add").click(function(){
885 var thisid = $(this).attr("id");
886 thisid = thisid.replace("tag_add","");
887 $(this).addClass("hidden");
888 $("#tagform"+thisid).show();
889 $("#newtag"+thisid).focus();
890 $("#newtag"+thisid+"_status").empty().hide();
893 $(".cancel_tag_add").click(function(){
894 var thisid = $(this).attr("id");
895 thisid = thisid.replace("cancel","");
896 $("#tagform"+thisid).hide();
897 $("#tag_add"+thisid).removeClass("hidden");
898 $("#newtag"+thisid).val("");
899 $("#newtag"+thisid+"_status").empty().hide();
902 $(".tagbutton").click(function(){
903 var thisid = $(this).attr("title");
904 var tag = $("#newtag"+thisid).val();
905 if (!tag || (tag == "")) {
906 alert(MSG_NO_TAG_SPECIFIED);
909 KOHA.Tags.add_tag_button(thisid, tag);
912 [% END # /IF TagsInputEnabled && loggedinusername %]
914 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
915 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
916 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
917 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
918 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
921 [% IF ( DidYouMean ) %]
922 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
924 $(this).addClass("dym-loaded");
928 $("input.newtag").on('keydown', function(e){
929 if (e.keyCode == 13) { e.preventDefault(); }
932 Sticky = $("#floating");
934 stickTo: ".searchresults",
935 stickyClass: "floating"