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 [% IF ( searchdesc ) %]
168 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
169 <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
171 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
172 <input type="hidden" name="[% LIMIT_INPUT.input_name | html %]" value="[% LIMIT_INPUT.input_value | html %]"/>
174 [% END # IF /searchdesc %]
177 <div id="toolbar" class="toolbar row align-items-center">
178 <div id="top-pages" class="col">
179 [% INCLUDE 'page-numbers.inc' %]
182 <div class="sort_by col-sm-auto">
183 <select id="sort_by" class="resort form-control form-control-sm" name="sort_by">
184 [% INCLUDE 'resort_form.inc' %]
187 [% IF Koha.Preference('OPACnumSearchResultsDropdown') %]
188 <label for="results_per_page">Results per page: </label>
189 <select id="results_per_page" name="count">
190 [% IF Koha.Preference('OPACnumSearchResults') %]
191 [% IF results_per_page == Koha.Preference('OPACnumSearchResults') %]
192 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]" selected="selected">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
194 <option value="[% Koha.Preference('OPACnumSearchResults') | html %]">Library default: [% Koha.Preference('OPACnumSearchResults') | html %]</option>
197 [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
198 [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
199 [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
200 [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
201 [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
203 [% END # IF Koha.Preference('OPACnumSearchResultsDropdown') %]
204 </div> <!-- /.sort_by -->
205 <div id="sortsubmit" class="sort_by col-auto">
206 <input type="submit" class="btn btn-primary btn-sm clearfix" value="Go" />
207 </div> <!-- /.sort_by -->
208 [% END # /UNLESS tag %]
209 </div> <!-- / #toolbar -->
211 <div class="selections-toolbar toolbar noprint">
212 [% IF ( OpacHighlightedWords ) %]
213 <div class="highlight_controls noprint">
214 <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>
215 <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>
219 <div class="check_control">
220 <!-- checkall, clearall are now needed for placehold -->
221 <span class="clearall">
222 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
224 <span class="checkall">
225 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
230 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
231 <span class="selections">Select titles to:</span>
233 [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
235 <select class="disabled form-control form-control-sm" name="addto" id="addto">
236 <option>Add to...</option>
237 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
238 <option value="addtocart">Cart</option>
240 [% IF Koha.Preference('virtualshelves') %]
241 [% IF loggedinusername AND add_to_some_private_shelves.count %]
242 <optgroup label="Your lists:">
243 [% SET number_of_private_shelves = 0 %]
244 [% FOREACH s IN add_to_some_private_shelves %]
245 [% IF shelfnumber != s.shelfnumber %]
246 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
247 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
248 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
253 [% IF add_to_some_public_shelves.count %]
254 <optgroup label="Public lists:">
255 [% SET number_of_public_shelves = 0 %]
256 [% FOREACH s IN add_to_some_public_shelves %]
257 [% IF shelfnumber != s.shelfnumber %]
258 <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
259 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
260 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
265 [% 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 ) %]
266 <option value="morelists">[ More lists ]</option>
268 <option value="newlist">[ New list ]</option>
269 [% END # /IF virtualshelves %]
271 <input type="submit" class="btn btn-sm btn-primary" value="Save" />
273 [% END # /IF opacbookbag || virtualshelves %]
275 [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
276 <button class="btn btn-link btn-sm hold disabled" type="button">
277 <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
281 [% IF ( TagsInputEnabled && loggedinusername ) %]
282 <span id="tagsel_span">
283 <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>
286 </div> <!-- / .links -->
287 [% IF ( TagsInputEnabled && loggedinusername ) %]
288 <div id="tagsel_form" style="display:none">
289 <label for="tagsel_new">New tag:</label>
290 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
291 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
292 <a href="#" id="tagsel_cancel">(done)</a>
294 <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
298 </div> <!-- / .selections-toolbar -->
299 </div> <!-- /#floating -->
301 <!-- TABLE RESULTS START -->
302 <table class="table table-striped">
304 <!-- Actual Search Results -->
305 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
307 [% # Cell 1: Checkbox %]
308 [% IF ( SEARCH_RESULT.title ) %]
309 [% check_title = SEARCH_RESULT.title %]
311 [% check_title = SEARCH_RESULT.biblionumber %]
313 <td class="selectcol">
314 [% IF Koha.Preference( 'opacbookbag' ) == 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( 'virtualshelves' ) == 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( 'RequestOnOpac' ) == 1 %]
321 [% UNLESS ( SEARCH_RESULT.norequests ) %]
322 [% 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>
325 [% END # IF RequestOnOpac %]
326 [% END # IF virtualshelves %]
327 [% END # IF opacbookbag%]
330 [% # Cell 2: Show result number if OpacHiddenItems is empty %]
331 <td class="numcol[%- IF suppress_result_number -%] hidden[%- END -%]">
332 [% UNLESS suppress_result_number %]
333 [% SEARCH_RESULT.result_number | html %].
337 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %]
338 [% # Cell 3: Show item type image %]
339 <td class="itypecol">
340 [% IF ( SEARCH_RESULT.imageurl ) %]
341 <img src="[% SEARCH_RESULT.imageurl | html %]" title="[% SEARCH_RESULT.description | html %]" alt="[% SEARCH_RESULT.description | html %]" />
343 [% IF ( SEARCH_RESULT.score_avg ) %]
344 <img src="[% themelang | html %]/../images/bonus.png" title="bonus" style="max-height: 35px;"/>
349 [% # Cell 4: Search result details and controls %]
350 <td class="bibliocol">
351 <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
352 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
353 [% IF ( SEARCH_RESULT.title ) %]
354 [% img_title = SEARCH_RESULT.title %]
356 [% img_title = SEARCH_RESULT.biblionumber %]
358 [% IF ( OPACLocalCoverImages ) %]
359 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
362 [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %]
363 <span title="[% img_title | html %]" id="adlibris-thumbnail[% loop.count | html %]">
364 <img src="[% AdlibrisURL | html %]?isbn=[% SEARCH_RESULT.normalized_isbn | html %]"
365 alt="Adlibris thumbnail for ISBN: [% SEARCH_RESULT.normalized_isbn | html %]" class="adlibris-cover" />
368 [% IF ( OPACAmazonCoverImages ) %]
369 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
370 <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>
372 <span class="no-image">No cover image available</span>
376 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
377 [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %]
378 <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>
380 <span class="no-image">No cover image available</span>
384 [% IF ( GoogleJackets ) %]
385 [% IF ( SEARCH_RESULT.normalized_isbn ) %]
386 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></span>
388 <span class="no-image">No cover image available</span>
392 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
393 [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn | html %]
395 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
397 <span class="no-image">No cover image available</span>
401 [% IF OpenLibraryCovers %]
402 [% IF SEARCH_RESULT.normalized_isbn %]
403 <span title="[% img_title | html %]" class="[% SEARCH_RESULT.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
405 <span class="no-image">No cover image available</span>
409 [% IF ( BakerTaylorEnabled && !BakerTaylorBookstoreURL ) %]
410 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
412 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
414 <span class="no-image">No cover image available</span>
419 [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %]
420 [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
422 <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
423 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
426 <span class="no-image">No cover image available</span>
430 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
431 [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
432 [% IF custom_cover_image_url %]
433 [% IF ( OPACURLOpenInNewWindow ) %]
434 <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>
436 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
442 [% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
443 <!-- COinS / Openurl -->
444 <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span>
446 <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary">
447 [% IF ( OPACXSLTResultsDisplay ) %]
448 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
450 [% IF ( BiblioDefaultViewmarc ) %]
451 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
453 [% IF ( BiblioDefaultViewisbd ) %]
454 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
456 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
460 [% INCLUDE 'biblio-title.inc' biblio=SEARCH_RESULT %]
462 [% IF ( SEARCH_RESULT.author ) %]
463 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>
468 <span class="results_summary publisher">
469 <span class="label">Publication:</span>
470 [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %]
471 [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %]
472 [% IF ( SEARCH_RESULT.publicationyear ) %]
473 [% SEARCH_RESULT.publicationyear | html %]
475 [% IF ( SEARCH_RESULT.copyrightdate ) %]
476 [% SEARCH_RESULT.copyrightdate | html %]
479 [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %]
480 [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %]
481 [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %][% END %]
482 [% IF ( SEARCH_RESULT.timestamp ) %] <em>(modified on [% SEARCH_RESULT.timestamp | html %])</em>[% END %]
485 [% IF ( SEARCH_RESULT.summary ) %]
486 <span class="result_summary">
487 [% SEARCH_RESULT.summary | html %]
491 [% IF ( SEARCH_RESULT.copyrightdate ) %]
492 <span class="results_summary date">
493 <span class="label">Date:</span>
494 [% SEARCH_RESULT.copyrightdate | html %]
498 <span class="results_summary">
499 <span class="label">Availability:</span>
500 [% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
501 <span class="available"><strong>Items available:</strong>
502 [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
503 [% IF available_items_loo.this_branch %]
504 <span class="highlight-row-results">
509 [% IF ( singleBranchMode ) %]
510 <span class="shelvingloc">[% available_items_loo.location | html %]</span>
512 [% available_items_loo.branchname | html %]
515 [% IF ( OPACItemsResultsDisplay ) %]
516 [% UNLESS ( singleBranchMode ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
517 [% 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 %]
519 ([% available_items_loo.count | html %]),
521 [% END # / FOREACH available_items_loo %]
524 [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %]
525 [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
526 <span id="alternateholdings">[% ALTERNATEHOLDING.holding | html %]</span>,
529 <span class="unavailable">No items available:</span>
531 [% END # / IF SEARCH_RESULT.available_items_loop.size %]
533 <span class="unavailable">
534 [% IF ( SEARCH_RESULT.onloancount ) %] Checked out ([% SEARCH_RESULT.onloancount | html %]), [% END %]
535 [% IF ( SEARCH_RESULT.withdrawncount ) %] Withdrawn ([% SEARCH_RESULT.withdrawncount | html %]), [% END %]
536 [% UNLESS ( SEARCH_RESULT.hidelostitems ) %][% IF ( SEARCH_RESULT.itemlostcount ) %] Lost ([% SEARCH_RESULT.itemlostcount | html %]),[% END %][% END %]
537 [% IF ( SEARCH_RESULT.damagedcount ) %] Damaged ([% SEARCH_RESULT.damagedcount | html %]),[% END %]
538 [% IF ( SEARCH_RESULT.orderedcount ) %] On order ([% SEARCH_RESULT.orderedcount | html %]),[% END %]
539 [% IF ( SEARCH_RESULT.onholdcount ) %] On hold ([% SEARCH_RESULT.onholdcount | html %]),[% END %]
540 [% IF ( SEARCH_RESULT.intransitcount ) %] In transit ([% SEARCH_RESULT.intransitcount | html %]),[% END %]
542 </span> <!-- / .results_summary -->
543 [% END # / IF OPACXSLTResultsDisplay %]
545 [% IF ( SEARCH_RESULT.score_avg ) %]
546 <div class="results_summary">
547 [% FOREACH i IN [ 1 2 3 4 5 ] %]
548 [% IF ( SEARCH_RESULT.score_int >= i ) %]
549 <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>
551 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
554 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
556 [% IF ( SEARCH_RESULT.num_critics ) %]
557 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
559 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
560 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
562 [% IF ( SEARCH_RESULT.num_videos ) %]
563 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
565 [% IF ( SEARCH_RESULT.num_quotations ) %]
566 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
568 </div> <!-- / .results_summary -->
569 [% END # / IF SEARCH_RESULT.score_avg %]
571 [% IF ( LibraryThingForLibrariesID ) %]
572 <div class="ltfl_reviews"></div>
575 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
576 <div class="results_summary tags">
577 <span class="label">Tags:</span>
579 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
581 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
582 <span class="weight">([% TagLoo.weight_total | html %])</span>
589 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
590 <div class="results_summary shelves">
591 <span class="label">Lists:</span>
593 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
595 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
596 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
603 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
604 <span class="results_summary">
605 <span class="label">Match:</span>
606 [% SEARCH_RESULT.searchhighlightblob | html %]
610 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
612 [% IF ( OpacStarRatings == 'all' ) %]
613 <div class="results_summary ratings">
614 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
615 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
616 <div class="br-wrapper br-theme-fontawesome-stars">
617 <div class="br-widget br-readonly">
618 [% FOREACH i IN [ 1 2 3 4 5 ] %]
619 [% IF rating_avg_int == i %]
620 <a href="#" class="br-selected br-current"></a>
621 [% ELSIF rating_avg_int > i %]
622 <a href="#" class="br-selected"></a>
630 [% IF SEARCH_RESULT.ratings.count > 0 %]
631 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
635 </div> <!-- / .results_summary -->
636 [% END # / IF OpacStarRatings %]
638 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
644 [% END # / FOREACH SEARCH_RESULT %]
646 </form> <!-- / #bookbag_form -->
648 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
649 <!-- The value will be set by holdBiblioNums() in basket.js -->
650 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
652 </div> <!-- / .searchresults -->
654 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
656 [% END # / IF total %]
658 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
659 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
660 <div class="suggestion">
661 Not finding what you're looking for?
663 [% IF Koha.Preference( 'suggestion' ) == 1 %]
664 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
665 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
666 [% ELSIF loggedinusername %]
667 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
670 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
671 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
676 </div> <!-- / #userresults -->
677 </div> <!-- /.span10/12 -->
678 </div> <!-- / .row -->
679 </div> <!-- / .container-fluid -->
680 </div><!-- / .main -->
682 [% INCLUDE 'opac-bottom.inc' %]
683 [% BLOCK jsinclude %]
684 [% IF ( LibraryThingForLibrariesID ) %]
685 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
687 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
688 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
689 [% Asset.js("js/authtoresults.js") | $raw %]
690 [% Asset.js("lib/hc-sticky.js") | $raw %]
691 [% IF ( OpacHighlightedWords ) %]
692 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
694 [% IF OpenLibraryCovers || OpenLibrarySearch %]
695 [% Asset.js("js/openlibrary.js") | $raw %]
699 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
700 function holdMultiple() {
701 var checkedBiblioNums = ""; // Separated by "/"
702 var checkedCount = 0;
703 if(document.bookbag_form.biblionumber.length > 0) {
704 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
705 if (document.bookbag_form.biblionumber[i].checked) {
706 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
712 if (checkedCount > 0) {
713 holdBiblioNums(checkedBiblioNums);
715 alert( __("No item was selected") );
719 function holdBiblioNums(numList) {
720 // numList: biblio numbers separated by "/"
721 $("#hold_form_biblios").attr("value", numList);
722 $("#hold_form").submit();
724 [% END # /IF opacuserlogin && RequestOnOpac %]
726 [% IF ( TagsInputEnabled && loggedinusername ) %]
727 function tagSelected() {
728 var checkedBoxes = $(".searchresults :checkbox:checked");
729 if ($(checkedBoxes).size() == 0) {
730 alert( __("No item was selected") );
732 $("#tagsel_tag").hide();
734 $("#tagsel_form").show();
738 function tagCanceled() {
739 $("#tagsel_form").hide();
740 $("#tagsel_tag").show();
742 $("#tagsel_new").val("");
743 $("#tagsel_status, .tagstatus").empty().hide();
746 function tagAdded() {
747 var checkedBoxes = $(".searchresults :checkbox:checked");
748 if ($(checkedBoxes).size() == 0) {
749 alert( __("No item was selected") );
753 var tag = $("#tagsel_new").val();
754 if (!tag || (tag == "")) {
755 alert(MSG_NO_TAG_SPECIFIED);
760 for (var i = 0; i < $(checkedBoxes).size(); i++) {
761 var box = $(checkedBoxes).get(i);
762 bibs[i] = $(box).val();
765 KOHA.Tags.add_multitags_button(bibs, tag);
768 [% END # /IF TagsInputEnabled && loggedinusername %]
771 function enableCheckboxActions(){
772 // Enable/disable controls if checkboxes are checked
773 var checkedBoxes = $(".cb:checked");
774 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
775 if ($(checkedBoxes).size()) {
776 $(".selections").html(_("With selected titles: "));
777 $(controls).removeClass("disabled");
779 $(".selections").html(_("Select titles to: "));
780 $(controls).addClass("disabled");
784 [% IF ( OpacHighlightedWords ) %]
785 var q_array = new Array(); // holds search terms if available
787 function highlightOff() {
788 $("td").removeHighlight();
789 $(".highlight_toggle").toggle();
791 function highlightOn() {
794 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
795 q_array[x] = q_array[x].toLowerCase();
796 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
797 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
798 $(".title").highlight(q_array[x]);
799 $(".author").highlight(q_array[x]);
800 $(".results_summary").highlight(q_array[x]);
803 $(".highlight_toggle").toggle();
805 [% END # /IF OpacHighlightedWords %]
807 $(document).ready(function(){
809 $(".moretoggle").click(function(e){
811 $(this).siblings(".collapsible-facet").toggle();
812 $(this).siblings(".moretoggle").toggle();
816 [% IF ( OpacHighlightedWords ) %]
817 $('a.title').each(function() {
818 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
822 $(".cb").click(function(){
823 enableCheckboxActions();
825 enableCheckboxActions();
827 $(".br-readonly a").on("click", function(e){
831 $('.resort').change(function() {
832 $('#bookbag_form').submit();
835 $('#results_per_page').change(function() {
836 $('#bookbag_form').submit();
839 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
840 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
841 $("#addto").on("change",function(){
844 $(".addto").find("input:submit").click(function(){
849 $("#addto").on("click",function(){
857 addtoOption = $("#addto").find("option:selected");
858 addtoval = addtoOption.val();
859 if(addtoval == "addtolist"){
860 var shelfnumber = addtoOption.attr("id").replace("s","");
862 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
865 } else if(addtoval == "newlist"){
866 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
867 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
869 alert(_("You must be logged in to create or add to lists"));
872 } else if(addtoval == "morelists"){
873 [% IF ( loggedinusername ) %]
875 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
878 alert(_("You must be logged in to create or add to lists"));
882 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
887 $("#CheckAll").on("click",function(e){
889 $(".cb").prop("checked", true);
890 enableCheckboxActions();
892 $("#CheckNone").on("click",function(e){
894 $(".cb").prop("checked", false);
895 enableCheckboxActions();
898 $(".hold").on("click", function(e){
903 [% IF ( query_desc ) %]
904 [% IF ( OpacHighlightedWords ) %]
905 q_array = query_desc.split(" ");
906 // ensure that we don't have "" at the end of the array, which can
907 // break the highlighter
908 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
909 q_array = q_array.splice(0,-1);
912 $("#highlight_toggle_on" ).hide().click(function(e) {
916 $("#highlight_toggle_off").show().click(function(e) {
920 [% END # /IF OpacHighlightedWords %]
921 [% IF ( OverDriveEnabled ) %]
922 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>' );
923 $( '#numresults' ) .append( ' ' )
924 .append( $overdrive_results );
925 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
926 //as the overdrive API treats double quotes as a search term and returns extra results
927 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
928 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
929 od_querystring = od_querystring.replace(/\"/g,"'");
930 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
932 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
936 if ( data.totalItems ) {
937 $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>' );
939 $overdrive_results.remove();
942 [% END # /IF OverDriveEnabled %]
943 [% IF ( RecordedBooksEnabled ) %]
944 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>' );
945 $( '#numresults' ) .append( ' ' )
946 .append( $recordedbooks_results );
947 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
949 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
953 // data.total can be either 42 or "60+"
954 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
955 $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>' );
957 $recordedbooks_results.remove();
960 [% END # /IF RecordedBooksEnabled %]
961 [% IF ( OpenLibrarySearch ) %]
962 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>' );
963 $( '#numresults' ) .append( ' ' )
964 .append( $openlibrary_results );
965 KOHA.OpenLibrary.search( querystring, null, function( data ) {
967 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
971 if ( data.numFound > 0 ) {
972 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
974 $openlibrary_results.remove();
977 [% END # /IF OpenLibrarySearch %]
978 [% END # /IF query_desc %]
980 [% IF ( TagsInputEnabled && loggedinusername ) %]
981 $("#tagsel_tag").show().click(function(){
985 $("#tagsel_cancel").click(function(){
989 $("#tagsel_button").click(function(){
994 $(".tag_add").click(function(){
995 var thisid = $(this).attr("id");
996 thisid = thisid.replace("tag_add","");
997 $(this).addClass("hidden");
998 $("#tagform"+thisid).show();
999 $("#newtag"+thisid).focus();
1000 $("#newtag"+thisid+"_status").empty().hide();
1003 $(".cancel_tag_add").click(function(){
1004 var thisid = $(this).attr("id");
1005 thisid = thisid.replace("cancel","");
1006 $("#tagform"+thisid).hide();
1007 $("#tag_add"+thisid).removeClass("hidden");
1008 $("#newtag"+thisid).val("");
1009 $("#newtag"+thisid+"_status").empty().hide();
1012 $(".tagbutton").click(function(){
1013 var thisid = $(this).attr("title");
1014 var tag = $("#newtag"+thisid).val();
1015 if (!tag || (tag == "")) {
1016 alert(MSG_NO_TAG_SPECIFIED);
1019 KOHA.Tags.add_tag_button(thisid, tag);
1022 [% END # /IF TagsInputEnabled && loggedinusername %]
1024 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1025 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1026 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1027 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1028 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1031 [% IF ( DidYouMean ) %]
1032 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
1034 $(this).addClass("dym-loaded");
1038 $("input.newtag").on('keydown', function(e){
1039 if (e.keyCode == 13) { e.preventDefault(); }
1042 Sticky = $("#floating");
1044 stickTo: ".searchresults",
1045 stickyClass: "floating"