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' %]
15 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog ›
16 [% IF ( searchdesc ) %]
18 Results of search for '[% ms_value | html %]'
23 You did not specify any search criteria.
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 aria-label="breadcrumb">
35 <ul 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" aria-current="page">
47 <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>
49 <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>
53 <li class="breadcrumb-item active" aria-current="page">
54 <a href="#">You did not specify any search criteria</a>
60 [% UNLESS ( total ) %]
61 <div class="container-fluid">
64 <h2 id="numresults">No results found!</h2>
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' %]
103 [% IF ( opacfacets ) %]
104 <div class="col-lg-10 order-first order-md-first order-lg-2 maincontent">
106 <div class="col order-first order-md-first order-lg-2 maincontent">
109 [% IF ( opacfacets ) %]
110 <div class="col-lg-10 order-first order-md-first order-lg-2">
112 <div class="col order-first order-md-first order-lg-2">
116 [% IF ( searchdesc ) %]
119 Your search returned [% total | html %] results.
120 <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">
121 <i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
125 <p>(related searches:[% FOREACH relate IN related %] [% relate.related_search | html %][% END %]).</p>
127 [% END # / IF total %]
128 [% END # / IF searchdesc %]
130 <div id="userresults">
131 [% IF ( DidYouMean ) %]
132 <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]">suggestions</a></div>
135 [% IF ( koha_spsuggest ) %]
137 <ul style="list-style: none;">
138 [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
140 <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion | uri %]">[% SPELL_SUGGES.spsuggestion | html %]</a>
144 [% END # / IF koha_spsuggest%]
146 [% IF ( ReturnPath ) %]
147 <div class="returntosearch">
148 <p><a href="[% ReturnPath | url %]">Return to the last advanced search</a></p>
152 [% IF ( query_error ) %]
153 <div class="dialog alert">
155 [% query_error | html %]
159 <!-- Search Results Table -->
162 <div class="searchresults">
163 <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
164 [% IF ( searchdesc ) %]
165 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
166 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
168 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
169 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
171 [% END # IF /searchdesc %]
174 <div id="toolbar" class="toolbar row align-items-center">
175 <div id="top-pages" class="col">
176 [% INCLUDE 'page-numbers.inc' %]
179 <div class="sort_by col-sm-auto">
180 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
181 [% INCLUDE 'resort_form.inc' %]
184 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
185 <label for="results_per_page">Results per page: </label>
186 <select id="results_per_page" name="count">
187 [% IF Koha.Preference('OPACnumSearchResults') %]
188 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
189 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
191 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
194 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
195 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
196 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
197 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
198 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
200 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
201 </div> <!-- /.sort_by -->
202 <div id="sortsubmit" class="sort_by col-auto">
203 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
204 </div> <!-- /.sort_by -->
205 [% END # /UNLESS tag %]
206 </div> <!-- / #toolbar -->
208 <div class="selections-toolbar toolbar noprint">
209 [% IF ( OpacHighlightedWords ) %]
210 <div class="highlight_controls noprint">
211 <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>
212 <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>
216 <div class="check_control">
217 <!-- checkall, clearall are now needed for placehold -->
218 <span class="clearall">
219 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
221 <span class="checkall">
222 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
227 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
228 <span class="selections">Select titles to:</span>
230 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
232 <select class="disabled form-control form-control-sm" name="addto" id="addto">
233 <option>Add to...</option>
234 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
235 <option value="addtocart">Cart</option>
237 [% IF Koha.Preference('virtualshelves') %]
238 [% IF loggedinusername AND add_to_some_private_shelves.count %]
239 <optgroup label="Your lists:">
240 [% SET number_of_private_shelves = 0 %]
241 [% FOREACH s IN add_to_some_private_shelves %]
242 [% IF shelfnumber != s.shelfnumber %]
243 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
244 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
245 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
250 [% IF add_to_some_public_shelves.count %]
251 <optgroup label="Public lists:">
252 [% SET number_of_public_shelves = 0 %]
253 [% FOREACH s IN add_to_some_public_shelves %]
254 [% IF shelfnumber != s.shelfnumber %]
255 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
256 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
257 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
262 [% 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 ) %]
263 <option value="morelists">[ More lists ]</option>
265 <option value="newlist">[ New list ]</option>
266 [% END # /IF virtualshelves %]
268 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
270 [% END # /IF opacbookbag || virtualshelves %]
272 [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
273 <button class="btn btn-link btn-sm hold disabled" type="button">
274 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
278 [% IF ( TagsInputEnabled && loggedinusername ) %]
279 <span id="tagsel_span">
280 <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>
283 </div> <!-- / .links -->
284 [% IF ( TagsInputEnabled && loggedinusername ) %]
285 <div id="tagsel_form" style="display:none">
286 <label for="tagsel_new">New tag:</label>
287 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
288 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
289 <a href="#" id="tagsel_cancel">(done)</a>
291 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
295 </div> <!-- / .selections-toolbar -->
296 </div> <!-- /#floating -->
298 <!-- TABLE RESULTS START -->
299 <table class="table table-striped">
301 <!-- Actual Search Results -->
302 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
304 [% # Cell 1: Checkbox %]
305 [% IF ( SEARCH_RESULT.title ) %]
306 [% check_title = SEARCH_RESULT.title %]
308 [% check_title = SEARCH_RESULT.biblionumber %]
310 <td class="selectcol">
311 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
312 <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>
314 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
315 <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 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
318 [% UNLESS ( SEARCH_RESULT.norequests ) %]
319 [% 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>
322 [% END # IF RequestOnOpac %]
323 [% END # IF virtualshelves %]
324 [% END # IF opacbookbag%]
327 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
328 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
329 [% UNLESS suppress_result_number %]
330 [% SEARCH_RESULT.result_number | html %].
334 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
335 [% # Cell 3: Show item type image %]
336 <td class="itypecol">
337 [% IF ( SEARCH_RESULT.imageurl ) %]
338 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
340 [% IF ( SEARCH_RESULT.score_avg ) %]
341 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
346 [% # Cell 4: Search result details and controls %]
347 <td class="bibliocol">
348 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
349 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
350 [% IF ( SEARCH_RESULT.title ) %]
351 [% img_title = SEARCH_RESULT.title %]
353 [% img_title = SEARCH_RESULT.biblionumber %]
355 [% IF ( OPACLocalCoverImages ) %]
356 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
359 [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
360 <span title="[% img_title | html %]" id="adlibris-thumbnail[% loop.count | html %]">
361 <img src="[% AdlibrisURL | html %]?isbn=[% SEARCH_RESULT.normalized_isbn | html %]"
362 alt="Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %]" class="adlibris-cover" />
365 [% IF ( OPACAmazonCoverImages ) %]
366 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
367 <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>
369 <span class="no-image">No cover image available</span>
373 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
374 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
375 <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>
377 <span class="no-image">No cover image available</span>
381 [% IF ( GoogleJackets ) %]
382 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
383 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
385 <span class="no-image">No cover image available</span>
389 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
390 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
392 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
394 <span class="no-image">No cover image available</span>
398 [% IF OpenLibraryCovers %]
399 [% IF SEARCH_RESULT.normalized_isbn %]
400 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
402 <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 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
411 <span class="no-image">No cover image available</span>
416 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
417 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
419 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
420 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
423 <span class="no-image">No cover image available</span>
427 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
428 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
429 [% IF custom_cover_image_url %]
430 [% IF ( OPACURLOpenInNewWindow ) %]
431 <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>
433 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
439 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
440 <!-- COinS / Openurl -->
441 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
443 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
444 [% IF ( OPACXSLTResultsDisplay ) %]
445 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
447 [% IF ( BiblioDefaultViewmarc ) %]
448 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
450 [% IF ( BiblioDefaultViewisbd ) %]
451 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
453 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
457 [% INCLUDE 'biblio-title.inc' biblio=SEARCH_RESULT %]
459 [% IF ( SEARCH_RESULT.author ) %]
460 by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author | url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author | html %]</a>
465 <span class="results_summary publisher">
466 <span class="label">Publication:</span>
467 [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %]
468 [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %]
469 [% IF ( SEARCH_RESULT.publicationyear ) %]
470 [% SEARCH_RESULT.publicationyear | html %]
472 [% IF ( SEARCH_RESULT.copyrightdate ) %]
473 [% SEARCH_RESULT.copyrightdate | html %]
476 [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %]
477 [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %]
478 [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %][% END %]
479 [% IF ( SEARCH_RESULT.timestamp ) %] <em>(modified on [% SEARCH_RESULT.timestamp | html %])</em>[% END %]
482 [% IF ( SEARCH_RESULT.summary ) %]
483 <span class="result_summary">
484 [% SEARCH_RESULT.summary | html %]
488 [% IF ( SEARCH_RESULT.copyrightdate ) %]
489 <span class="results_summary date">
490 <span class="label">Date:</span>
491 [% SEARCH_RESULT.copyrightdate | html %]
495 <span class="results_summary">
496 <span class="label">Availability:</span>
497 [% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
498 <span class="available"><strong>Items available:</strong>
499 [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
500 [% IF available_items_loo.this_branch %]
501 <span class="highlight-row-results">
506 [% IF ( singleBranchMode ) %]
507 <span class="shelvingloc">[% available_items_loo.location | html %]</span>
509 [% available_items_loo.branchname | html %]
512 [% IF ( OPACItemsResultsDisplay ) %]
513 [% UNLESS ( singleBranchMode ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
514 [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/opac-search.pl?q=callnum:%22[% available_items_loo.itemcallnumber | url %]%22">[% available_items_loo.itemcallnumber | html %]</a>][% END %]
516 ([% available_items_loo.count | html %]),
518 [% END # / FOREACH available_items_loo %]
521 [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %]
522 [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
523 <span id="alternateholdings">[% ALTERNATEHOLDING.holding | html %]</span>,
526 <span class="unavailable">No items available:</span>
528 [% END # / IF SEARCH_RESULT.available_items_loop.size %]
530 <span class="unavailable">
531 [% IF ( SEARCH_RESULT.onloancount ) %] Checked out ([% SEARCH_RESULT.onloancount | html %]), [% END %]
532 [% IF ( SEARCH_RESULT.withdrawncount ) %] Withdrawn ([% SEARCH_RESULT.withdrawncount | html %]), [% END %]
533 [% UNLESS ( SEARCH_RESULT.hidelostitems ) %][% IF ( SEARCH_RESULT.itemlostcount ) %] Lost ([% SEARCH_RESULT.itemlostcount | html %]),[% END %][% END %]
534 [% IF ( SEARCH_RESULT.damagedcount ) %] Damaged ([% SEARCH_RESULT.damagedcount | html %]),[% END %]
535 [% IF ( SEARCH_RESULT.orderedcount ) %] On order ([% SEARCH_RESULT.orderedcount | html %]),[% END %]
536 [% IF ( SEARCH_RESULT.onholdcount ) %] On hold ([% SEARCH_RESULT.onholdcount | html %]),[% END %]
537 [% IF ( SEARCH_RESULT.intransitcount ) %] In transit ([% SEARCH_RESULT.intransitcount | html %]),[% END %]
539 </span> <!-- / .results_summary -->
540 [% END # / IF OPACXSLTResultsDisplay %]
542 [% IF ( SEARCH_RESULT.score_avg ) %]
543 <div class="results_summary">
544 [% FOREACH i IN [ 1 2 3 4 5 ] %]
545 [% IF ( SEARCH_RESULT.score_int >= i ) %]
546 <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>
548 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
551 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
553 [% IF ( SEARCH_RESULT.num_critics ) %]
554 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
556 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
557 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
559 [% IF ( SEARCH_RESULT.num_videos ) %]
560 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
562 [% IF ( SEARCH_RESULT.num_quotations ) %]
563 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
565 </div> <!-- / .results_summary -->
566 [% END # / IF SEARCH_RESULT.score_avg %]
568 [% IF ( LibraryThingForLibrariesID ) %]
569 <div class="ltfl_reviews"></div>
572 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
573 <div class="results_summary tags">
574 <span class="label">Tags:</span>
576 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
578 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
579 <span class="weight">([% TagLoo.weight_total | html %])</span>
586 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
587 <div class="results_summary shelves">
588 <span class="label">Lists:</span>
590 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
592 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
593 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
600 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
601 <span class="results_summary">
602 <span class="label">Match:</span>
603 [% SEARCH_RESULT.searchhighlightblob | html %]
607 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
609 [% IF ( OpacStarRatings == 'all' ) %]
610 <div class="results_summary ratings">
611 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
612 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
613 <div class="br-wrapper br-theme-fontawesome-stars">
614 <div class="br-widget br-readonly">
615 [% FOREACH i IN [ 1 2 3 4 5 ] %]
616 [% IF rating_avg_int == i %]
617 <a href="#" class="br-selected br-current"></a>
618 [% ELSIF rating_avg_int > i %]
619 <a href="#" class="br-selected"></a>
627 [% IF SEARCH_RESULT.ratings.count > 0 %]
628 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
632 </div> <!-- / .results_summary -->
633 [% END # / IF OpacStarRatings %]
635 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
641 [% END # / FOREACH SEARCH_RESULT %]
643 </form> <!-- / #bookbag_form -->
645 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
646 <!-- The value will be set by holdBiblioNums() in basket.js -->
647 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
649 </div> <!-- / .searchresults -->
651 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
653 [% END # / IF total %]
655 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
656 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
657 <div class="suggestion">
658 Not finding what you're looking for?
660 [% IF Koha.Preference( 'suggestion' ) == 1 %]
661 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
662 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
663 [% ELSIF loggedinusername %]
664 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
667 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
668 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
673 </div> <!-- / #userresults -->
674 </div> <!-- /.span10/12 -->
675 </div> <!-- / .row -->
676 </div> <!-- / .container-fluid -->
677 </div><!-- / .main -->
679 [% INCLUDE 'opac-bottom.inc' %]
680 [% BLOCK jsinclude %]
681 [% IF ( LibraryThingForLibrariesID ) %]
682 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
684 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
685 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
686 [% Asset.js("js/authtoresults.js") | $raw %]
687 [% Asset.js("lib/hc-sticky.js") | $raw %]
688 [% IF ( OpacHighlightedWords ) %]
689 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
691 [% IF OpenLibraryCovers || OpenLibrarySearch %]
692 [% Asset.js("js/openlibrary.js") | $raw %]
696 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
697 function holdMultiple() {
698 var checkedBiblioNums = ""; // Separated by "/"
699 var checkedCount = 0;
700 if(document.bookbag_form.biblionumber.length > 0) {
701 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
702 if (document.bookbag_form.biblionumber[i].checked) {
703 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
709 if (checkedCount > 0) {
710 holdBiblioNums(checkedBiblioNums);
712 alert( __("No item was selected") );
716 function holdBiblioNums(numList) {
717 // numList: biblio numbers separated by "/"
718 $("#hold_form_biblios").attr("value", numList);
719 $("#hold_form").submit();
721 [% END # /IF opacuserlogin && RequestOnOpac %]
723 [% IF ( TagsInputEnabled && loggedinusername ) %]
724 function tagSelected() {
725 var checkedBoxes = $(".searchresults :checkbox:checked");
726 if ($(checkedBoxes).size() == 0) {
727 alert( __("No item was selected") );
729 $("#tagsel_tag").hide();
731 $("#tagsel_form").show();
735 function tagCanceled() {
736 $("#tagsel_form").hide();
737 $("#tagsel_tag").show();
739 $("#tagsel_new").val("");
740 $("#tagsel_status, .tagstatus").empty().hide();
743 function tagAdded() {
744 var checkedBoxes = $(".searchresults :checkbox:checked");
745 if ($(checkedBoxes).size() == 0) {
746 alert( __("No item was selected") );
750 var tag = $("#tagsel_new").val();
751 if (!tag || (tag == "")) {
752 alert(MSG_NO_TAG_SPECIFIED);
757 for (var i = 0; i < $(checkedBoxes).size(); i++) {
758 var box = $(checkedBoxes).get(i);
759 bibs[i] = $(box).val();
762 KOHA.Tags.add_multitags_button(bibs, tag);
765 [% END # /IF TagsInputEnabled && loggedinusername %]
768 function enableCheckboxActions(){
769 // Enable/disable controls if checkboxes are checked
770 var checkedBoxes = $(".cb:checked");
771 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
772 if ($(checkedBoxes).size()) {
773 $(".selections").html(_("With selected titles: "));
774 $(controls).removeClass("disabled");
776 $(".selections").html(_("Select titles to: "));
777 $(controls).addClass("disabled");
781 [% IF ( OpacHighlightedWords ) %]
782 var q_array = new Array(); // holds search terms if available
784 function highlightOff() {
785 $("td").removeHighlight();
786 $(".highlight_toggle").toggle();
788 function highlightOn() {
791 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
792 q_array[x] = q_array[x].toLowerCase();
793 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
794 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
795 $(".title").highlight(q_array[x]);
796 $(".author").highlight(q_array[x]);
797 $(".results_summary").highlight(q_array[x]);
800 $(".highlight_toggle").toggle();
802 [% END # /IF OpacHighlightedWords %]
804 $(document).ready(function(){
806 $(".moretoggle").click(function(e){
808 $(this).siblings(".collapsible-facet").toggle();
809 $(this).siblings(".moretoggle").toggle();
813 [% IF ( OpacHighlightedWords ) %]
814 $('a.title').each(function() {
815 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
819 $(".cb").click(function(){
820 enableCheckboxActions();
822 enableCheckboxActions();
824 $(".br-readonly a").on("click", function(e){
828 $('.resort').change(function() {
829 $('#bookbag_form').submit();
832 $('#results_per_page').change(function() {
833 $('#bookbag_form').submit();
836 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
837 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
838 $("#addto").on("change",function(){
841 $(".addto").find("input:submit").click(function(){
846 $("#addto").on("click",function(){
854 addtoOption = $("#addto").find("option:selected");
855 addtoval = addtoOption.val();
856 if(addtoval == "addtolist"){
857 var shelfnumber = addtoOption.attr("id").replace("s","");
859 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
862 } else if(addtoval == "newlist"){
863 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
864 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
866 alert(_("You must be logged in to create or add to lists"));
869 } else if(addtoval == "morelists"){
870 [% IF ( loggedinusername ) %]
872 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
875 alert(_("You must be logged in to create or add to lists"));
879 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
884 $("#CheckAll").on("click",function(e){
886 $(".cb").prop("checked", true);
887 enableCheckboxActions();
889 $("#CheckNone").on("click",function(e){
891 $(".cb").prop("checked", false);
892 enableCheckboxActions();
895 $(".hold").on("click", function(e){
900 [% IF ( query_desc ) %]
901 [% IF ( OpacHighlightedWords ) %]
902 q_array = query_desc.split(" ");
903 // ensure that we don't have "" at the end of the array, which can
904 // break the highlighter
905 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
906 q_array = q_array.splice(0,-1);
909 $("#highlight_toggle_on" ).hide().click(function(e) {
913 $("#highlight_toggle_off").show().click(function(e) {
917 [% END # /IF OpacHighlightedWords %]
918 [% IF ( OverDriveEnabled ) %]
919 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>' );
920 $( '#numresults' ) .append( ' ' )
921 .append( $overdrive_results );
922 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
923 //as the overdrive API treats double quotes as a search term and returns extra results
924 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
925 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
926 od_querystring = od_querystring.replace(/\"/g,"'");
927 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
929 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
933 if ( data.totalItems ) {
934 $overdrive_results.html( '<a href="/cgi-bin/koha/opac-overdrive-search.pl?q=' + escape( od_querystring ) + '">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.totalItems, 'OverDrive') + '</a>' );
936 $overdrive_results.remove();
939 [% END # /IF OverDriveEnabled %]
940 [% IF ( RecordedBooksEnabled ) %]
941 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>' );
942 $( '#numresults' ) .append( ' ' )
943 .append( $recordedbooks_results );
944 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
946 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
950 // data.total can be either 42 or "60+"
951 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
952 $recordedbooks_results.html( '<a href="/cgi-bin/koha/opac-recordedbooks-search.pl?q=' + escape( querystring ) + '">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.total, 'RecordedBooks') + '</a>' );
954 $recordedbooks_results.remove();
957 [% END # /IF RecordedBooksEnabled %]
958 [% IF ( OpenLibrarySearch ) %]
959 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>' );
960 $( '#numresults' ) .append( ' ' )
961 .append( $openlibrary_results );
962 KOHA.OpenLibrary.search( querystring, null, function( data ) {
964 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
968 if ( data.numFound > 0 ) {
969 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
971 $openlibrary_results.remove();
974 [% END # /IF OpenLibrarySearch %]
975 [% END # /IF query_desc %]
977 [% IF ( TagsInputEnabled && loggedinusername ) %]
978 $("#tagsel_tag").show().click(function(){
982 $("#tagsel_cancel").click(function(){
986 $("#tagsel_button").click(function(){
991 $(".tag_add").click(function(){
992 var thisid = $(this).attr("id");
993 thisid = thisid.replace("tag_add","");
994 $(this).addClass("hidden");
995 $("#tagform"+thisid).show();
996 $("#newtag"+thisid).focus();
997 $("#newtag"+thisid+"_status").empty().hide();
1000 $(".cancel_tag_add").click(function(){
1001 var thisid = $(this).attr("id");
1002 thisid = thisid.replace("cancel","");
1003 $("#tagform"+thisid).hide();
1004 $("#tag_add"+thisid).removeClass("hidden");
1005 $("#newtag"+thisid).val("");
1006 $("#newtag"+thisid+"_status").empty().hide();
1009 $(".tagbutton").click(function(){
1010 var thisid = $(this).attr("title");
1011 var tag = $("#newtag"+thisid).val();
1012 if (!tag || (tag == "")) {
1013 alert(MSG_NO_TAG_SPECIFIED);
1016 KOHA.Tags.add_tag_button(thisid, tag);
1019 [% END # /IF TagsInputEnabled && loggedinusername %]
1021 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1022 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1023 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1024 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1025 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1028 [% IF ( DidYouMean ) %]
1029 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
1031 $(this).addClass("dym-loaded");
1035 $("input.newtag").on('keydown', function(e){
1036 if (e.keyCode == 13) { e.preventDefault(); }
1039 Sticky = $("#floating");
1041 stickTo: ".searchresults",
1042 stickyClass: "floating"