4 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
5 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
6 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
7 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
10 [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
11 [% SET RecordedBooksEnabled = Koha.Preference('RecordedBooksLibraryID') && Koha.Preference('RecordedBooksClientSecret') %]
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 aria-label="breadcrumb">
38 <ul 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" aria-current="page">
50 <a href="#" 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="#" 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" aria-current="page">
57 <a href="#">You did not specify any search criteria</a>
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 %]&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' %]
106 [% IF ( opacfacets ) %]
107 <div class="col-lg-10 order-first order-md-first order-lg-2 maincontent">
109 <div class="col order-first order-md-first order-lg-2 maincontent">
112 [% IF ( opacfacets ) %]
113 <div class="col-lg-10 order-first order-md-first order-lg-2">
115 <div class="col order-first order-md-first order-lg-2">
119 [% IF ( searchdesc ) %]
122 Your search returned [% total | html %] results.
123 <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">
124 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
128 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
130 [% END # / IF total %]
131 [% END # / IF searchdesc %]
133 <div id="userresults">
134 [% IF ( DidYouMean ) %]
135 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
138 [% IF ( koha_spsuggest ) %]
140 <ul style="list-style: none;">
141 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
143 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
147 [% END # / IF koha_spsuggest%]
149 [% IF ( ReturnPath ) %]
150 <div class="returntosearch">
151 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
155 [% IF ( query_error ) %]
156 <div class="dialog alert">
158 [% query_error | html %]
162 <!-- Search Results Table -->
165 <div class="searchresults">
166 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
167 <legend class="sr-only">Sort</legend>
168 [% IF ( searchdesc ) %]
169 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
170 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
172 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
173 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
175 [% END # IF /searchdesc %]
178 <div id="toolbar" class="toolbar row align-items-center">
179 <div id="top-pages" class="col">
180 [% INCLUDE 'page-numbers.inc' %]
183 <div class="sort_by col-sm-auto">
184 <label for="sort_by" class="sr-only">Sort by:</label>
185 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
186 [% INCLUDE 'resort_form.inc' %]
189 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
190 <label for="results_per_page">Results per page: </label>
191 <select id="results_per_page" name="count">
192 [% IF Koha.Preference('OPACnumSearchResults') %]
193 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
194 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
196 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
199 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
200 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
201 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
202 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
203 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
205 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
206 </div> <!-- /.sort_by -->
207 <div id="sortsubmit" class="sort_by col-auto">
208 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
209 </div> <!-- /.sort_by -->
210 [% END # /UNLESS tag %]
211 </div> <!-- / #toolbar -->
213 <div class="selections-toolbar toolbar noprint">
214 [% IF ( OpacHighlightedWords ) %]
215 <div class="highlight_controls noprint">
216 <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>
217 <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>
221 <div class="check_control">
222 <!-- checkall, clearall are now needed for placehold -->
223 <span class="clearall">
224 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
226 <span class="checkall">
227 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
232 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
233 <span class="selections">Select titles to:</span>
235 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
237 <select class="disabled form-control form-control-sm" name="addto" id="addto">
238 <option>Add to...</option>
239 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
240 <option value="addtocart">Cart</option>
242 [% IF Koha.Preference('virtualshelves') %]
243 [% IF loggedinusername AND add_to_some_private_shelves.count %]
244 <optgroup label="Your lists:">
245 [% SET number_of_private_shelves = 0 %]
246 [% FOREACH s IN add_to_some_private_shelves %]
247 [% IF shelfnumber != s.shelfnumber %]
248 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
249 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
250 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
255 [% IF add_to_some_public_shelves.count %]
256 <optgroup label="Public lists:">
257 [% SET number_of_public_shelves = 0 %]
258 [% FOREACH s IN add_to_some_public_shelves %]
259 [% IF shelfnumber != s.shelfnumber %]
260 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
261 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
262 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
267 [% 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 ) %]
268 <option value="morelists">[ More lists ]</option>
270 <option value="newlist">[ New list ]</option>
271 [% END # /IF virtualshelves %]
273 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
275 [% END # /IF opacbookbag || virtualshelves %]
277 [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
278 <button class="btn btn-link btn-sm hold disabled" type="button">
279 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
283 [% IF ( TagsInputEnabled && loggedinusername ) %]
284 <span id="tagsel_span">
285 <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>
288 </div> <!-- / .links -->
289 [% IF ( TagsInputEnabled && loggedinusername ) %]
290 <div id="tagsel_form" style="display:none">
291 <label for="tagsel_new">New tag:</label>
292 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
293 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
294 <a href="#" id="tagsel_cancel">(done)</a>
296 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
300 </div> <!-- / .selections-toolbar -->
301 </div> <!-- /#floating -->
303 <!-- TABLE RESULTS START -->
304 <table class="table table-striped">
305 <caption class="sr-only">Results</caption>
307 <!-- Actual Search Results -->
308 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
310 [% # Cell 1: Checkbox %]
311 [% IF ( SEARCH_RESULT.title ) %]
312 [% check_title = SEARCH_RESULT.title %]
314 [% check_title = SEARCH_RESULT.biblionumber %]
316 <td class="selectcol">
317 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
318 <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 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
321 <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>
323 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
324 [% UNLESS ( SEARCH_RESULT.norequests ) %]
325 [% 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>
328 [% END # IF RequestOnOpac %]
329 [% END # IF virtualshelves %]
330 [% END # IF opacbookbag%]
333 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
334 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
335 [% UNLESS suppress_result_number %]
336 [% SEARCH_RESULT.result_number | html %].
340 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
341 [% # Cell 3: Show item type image %]
342 <td class="itypecol">
343 [% IF ( SEARCH_RESULT.imageurl ) %]
344 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
346 [% IF ( SEARCH_RESULT.score_avg ) %]
347 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
352 [% # Cell 4: Search result details and controls %]
353 <td class="bibliocol">
354 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
355 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
356 [% IF ( SEARCH_RESULT.title ) %]
357 [% img_title = SEARCH_RESULT.title %]
359 [% img_title = SEARCH_RESULT.biblionumber %]
361 [% IF ( OPACLocalCoverImages ) %]
362 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
365 [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
366 <span title="[% img_title | html %]" id="adlibris-thumbnail[% loop.count | html %]">
367 <img src="[% AdlibrisURL | html %]?isbn=[% SEARCH_RESULT.normalized_isbn | html %]"
368 alt="Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %]" class="adlibris-cover" />
371 [% IF ( OPACAmazonCoverImages ) %]
372 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
373 <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>
375 <span class="no-image">No cover image available</span>
379 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
380 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
381 <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>
383 <span class="no-image">No cover image available</span>
387 [% IF ( GoogleJackets ) %]
388 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
389 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
391 <span class="no-image">No cover image available</span>
395 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
396 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
398 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
400 <span class="no-image">No cover image available</span>
404 [% IF OpenLibraryCovers %]
405 [% IF SEARCH_RESULT.normalized_isbn %]
406 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
408 <span class="no-image">No cover image available</span>
412 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
413 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
415 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
417 <span class="no-image">No cover image available</span>
422 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
423 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
425 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
426 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
429 <span class="no-image">No cover image available</span>
433 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
434 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
435 [% IF custom_cover_image_url %]
436 [% IF ( OPACURLOpenInNewWindow ) %]
437 <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>
439 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
445 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
446 <!-- COinS / Openurl -->
447 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
449 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
451 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
453 [% IF ( SEARCH_RESULT.score_avg ) %]
454 <div class="results_summary">
455 [% FOREACH i IN [ 1 2 3 4 5 ] %]
456 [% IF ( SEARCH_RESULT.score_int >= i ) %]
457 <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>
459 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
462 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
464 [% IF ( SEARCH_RESULT.num_critics ) %]
465 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
467 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
468 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
470 [% IF ( SEARCH_RESULT.num_videos ) %]
471 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
473 [% IF ( SEARCH_RESULT.num_quotations ) %]
474 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
476 </div> <!-- / .results_summary -->
477 [% END # / IF SEARCH_RESULT.score_avg %]
479 [% IF ( LibraryThingForLibrariesID ) %]
480 <div class="ltfl_reviews"></div>
483 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
484 <div class="results_summary tags">
485 <span class="label">Tags:</span>
487 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
489 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
490 <span class="weight">([% TagLoo.weight_total | html %])</span>
497 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
498 <div class="results_summary shelves">
499 <span class="label">Lists:</span>
501 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
503 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
504 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
511 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
512 <span class="results_summary">
513 <span class="label">Match:</span>
514 [% SEARCH_RESULT.searchhighlightblob | html %]
518 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
520 [% IF ( OpacStarRatings == 'all' ) %]
521 <div class="results_summary ratings">
522 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
523 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
524 <div class="br-wrapper br-theme-fontawesome-stars">
525 <div class="br-widget br-readonly">
526 [% FOREACH i IN [ 1 2 3 4 5 ] %]
527 [% IF rating_avg_int == i %]
528 <a href="#" class="br-selected br-current"></a>
529 [% ELSIF rating_avg_int > i %]
530 <a href="#" class="br-selected"></a>
538 [% IF SEARCH_RESULT.ratings.count > 0 %]
539 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
543 </div> <!-- / .results_summary -->
544 [% END # / IF OpacStarRatings %]
546 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
552 [% END # / FOREACH SEARCH_RESULT %]
554 </form> <!-- / #bookbag_form -->
556 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
557 <legend class="sr-only">Pages</legend>
558 <!-- The value will be set by holdBiblioNums() in basket.js -->
559 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
561 </div> <!-- / .searchresults -->
563 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
565 [% END # / IF total %]
567 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
568 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
569 <div class="suggestion">
570 Not finding what you're looking for?
572 [% IF Koha.Preference( 'suggestion' ) == 1 %]
573 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
574 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
575 [% ELSIF loggedinusername %]
576 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
579 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
580 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
585 </div> <!-- / #userresults -->
586 </div> <!-- /.span10/12 -->
587 </div> <!-- / .row -->
588 </div> <!-- / .container-fluid -->
589 </div><!-- / .main -->
591 [% INCLUDE 'opac-bottom.inc' %]
592 [% BLOCK jsinclude %]
593 [% IF ( LibraryThingForLibrariesID ) %]
594 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
596 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
597 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
598 [% Asset.js("js/authtoresults.js") | $raw %]
599 [% Asset.js("lib/hc-sticky.js") | $raw %]
600 [% IF ( OpacHighlightedWords ) %]
601 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
603 [% IF OpenLibraryCovers || OpenLibrarySearch %]
604 [% Asset.js("js/openlibrary.js") | $raw %]
608 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
609 function holdMultiple() {
610 var checkedBiblioNums = ""; // Separated by "/"
611 var checkedCount = 0;
612 if(document.bookbag_form.biblionumber.length > 0) {
613 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
614 if (document.bookbag_form.biblionumber[i].checked) {
615 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
621 if (checkedCount > 0) {
622 holdBiblioNums(checkedBiblioNums);
624 alert( __("No item was selected") );
628 function holdBiblioNums(numList) {
629 // numList: biblio numbers separated by "/"
630 $("#hold_form_biblios").attr("value", numList);
631 $("#hold_form").submit();
633 [% END # /IF opacuserlogin && RequestOnOpac %]
635 [% IF ( TagsInputEnabled && loggedinusername ) %]
636 function tagSelected() {
637 var checkedBoxes = $(".searchresults :checkbox:checked");
638 if ($(checkedBoxes).size() == 0) {
639 alert( __("No item was selected") );
641 $("#tagsel_tag").hide();
643 $("#tagsel_form").show();
647 function tagCanceled() {
648 $("#tagsel_form").hide();
649 $("#tagsel_tag").show();
651 $("#tagsel_new").val("");
652 $("#tagsel_status, .tagstatus").empty().hide();
655 function tagAdded() {
656 var checkedBoxes = $(".searchresults :checkbox:checked");
657 if ($(checkedBoxes).size() == 0) {
658 alert( __("No item was selected") );
662 var tag = $("#tagsel_new").val();
663 if (!tag || (tag == "")) {
664 alert(MSG_NO_TAG_SPECIFIED);
669 for (var i = 0; i < $(checkedBoxes).size(); i++) {
670 var box = $(checkedBoxes).get(i);
671 bibs[i] = $(box).val();
674 KOHA.Tags.add_multitags_button(bibs, tag);
677 [% END # /IF TagsInputEnabled && loggedinusername %]
680 function enableCheckboxActions(){
681 // Enable/disable controls if checkboxes are checked
682 var checkedBoxes = $(".cb:checked");
683 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
684 if ($(checkedBoxes).size()) {
685 $(".selections").html(_("With selected titles: "));
686 $(controls).removeClass("disabled");
688 $(".selections").html(_("Select titles to: "));
689 $(controls).addClass("disabled");
693 [% IF ( OpacHighlightedWords ) %]
694 var q_array = new Array(); // holds search terms if available
696 function highlightOff() {
697 $("td").removeHighlight();
698 $(".highlight_toggle").toggle();
700 function highlightOn() {
703 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
704 q_array[x] = q_array[x].toLowerCase();
705 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
706 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
707 $(".title").highlight(q_array[x]);
708 $(".author").highlight(q_array[x]);
709 $(".results_summary").highlight(q_array[x]);
712 $(".highlight_toggle").toggle();
714 [% END # /IF OpacHighlightedWords %]
716 $(document).ready(function(){
718 $(".moretoggle").click(function(e){
720 $(this).siblings(".collapsible-facet").toggle();
721 $(this).siblings(".moretoggle").toggle();
725 [% IF ( OpacHighlightedWords ) %]
726 $('a.title').each(function() {
727 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
731 $(".cb").click(function(){
732 enableCheckboxActions();
734 enableCheckboxActions();
736 $(".br-readonly a").on("click", function(e){
740 $('.resort').change(function() {
741 $('#bookbag_form').submit();
744 $('#results_per_page').change(function() {
745 $('#bookbag_form').submit();
748 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
749 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
750 $("#addto").on("change",function(){
753 $(".addto").find("input:submit").click(function(){
758 $("#addto").on("click",function(){
766 addtoOption = $("#addto").find("option:selected");
767 addtoval = addtoOption.val();
768 if(addtoval == "addtolist"){
769 var shelfnumber = addtoOption.attr("id").replace("s","");
771 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
774 } else if(addtoval == "newlist"){
775 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
776 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
778 alert(_("You must be logged in to create or add to lists"));
781 } else if(addtoval == "morelists"){
782 [% IF ( loggedinusername ) %]
784 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
787 alert(_("You must be logged in to create or add to lists"));
791 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
796 $("#CheckAll").on("click",function(e){
798 $(".cb").prop("checked", true);
799 enableCheckboxActions();
801 $("#CheckNone").on("click",function(e){
803 $(".cb").prop("checked", false);
804 enableCheckboxActions();
807 $(".hold").on("click", function(e){
812 [% IF ( query_desc ) %]
813 [% IF ( OpacHighlightedWords ) %]
814 q_array = query_desc.split(" ");
815 // ensure that we don't have "" at the end of the array, which can
816 // break the highlighter
817 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
818 q_array = q_array.splice(0,-1);
821 $("#highlight_toggle_on" ).hide().click(function(e) {
825 $("#highlight_toggle_off").show().click(function(e) {
829 [% END # /IF OpacHighlightedWords %]
830 [% IF ( OverDriveEnabled ) %]
831 var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
832 $( '#numresults' ) .after( $overdrive_results );
833 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
834 //as the overdrive API treats double quotes as a search term and returns extra results
835 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
836 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
837 od_querystring = od_querystring.replace(/\"/g,"'");
838 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
840 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
844 if ( data.totalItems ) {
845 $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>' );
847 $overdrive_results.remove();
850 [% END # /IF OverDriveEnabled %]
851 [% IF ( RecordedBooksEnabled ) %]
852 var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
853 $( '#numresults' ) .after( $recordedbooks_results );
854 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
856 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
860 // data.total can be either 42 or "60+"
861 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
862 $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>' );
864 $recordedbooks_results.remove();
867 [% END # /IF RecordedBooksEnabled %]
868 [% IF ( OpenLibrarySearch ) %]
869 var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
870 $( '#numresults' ) .after( $openlibrary_results );
871 KOHA.OpenLibrary.search( querystring, null, function( data ) {
873 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
877 if ( data.numFound > 0 ) {
878 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
880 $openlibrary_results.remove();
883 [% END # /IF OpenLibrarySearch %]
884 [% END # /IF query_desc %]
886 [% IF ( TagsInputEnabled && loggedinusername ) %]
887 $("#tagsel_tag").show().click(function(){
891 $("#tagsel_cancel").click(function(){
895 $("#tagsel_button").click(function(){
900 $(".tag_add").click(function(){
901 var thisid = $(this).attr("id");
902 thisid = thisid.replace("tag_add","");
903 $(this).addClass("hidden");
904 $("#tagform"+thisid).show();
905 $("#newtag"+thisid).focus();
906 $("#newtag"+thisid+"_status").empty().hide();
909 $(".cancel_tag_add").click(function(){
910 var thisid = $(this).attr("id");
911 thisid = thisid.replace("cancel","");
912 $("#tagform"+thisid).hide();
913 $("#tag_add"+thisid).removeClass("hidden");
914 $("#newtag"+thisid).val("");
915 $("#newtag"+thisid+"_status").empty().hide();
918 $(".tagbutton").click(function(){
919 var thisid = $(this).attr("title");
920 var tag = $("#newtag"+thisid).val();
921 if (!tag || (tag == "")) {
922 alert(MSG_NO_TAG_SPECIFIED);
925 KOHA.Tags.add_tag_button(thisid, tag);
928 [% END # /IF TagsInputEnabled && loggedinusername %]
930 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
931 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
932 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
933 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
934 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
937 [% IF ( DidYouMean ) %]
938 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
940 $(this).addClass("dym-loaded");
944 $("input.newtag").on('keydown', function(e){
945 if (e.keyCode == 13) { e.preventDefault(); }
948 Sticky = $("#floating");
950 stickTo: ".searchresults",
951 stickyClass: "floating"