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">
450 [% IF ( OPACXSLTResultsDisplay ) %]
451 [% SEARCH_RESULT.XSLTResultsRecord | $raw %]
453 [% IF ( BiblioDefaultViewmarc ) %]
454 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
456 [% IF ( BiblioDefaultViewisbd ) %]
457 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
459 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title">
463 [% INCLUDE 'biblio-title.inc' biblio=SEARCH_RESULT %]
465 [% IF ( SEARCH_RESULT.author ) %]
466 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>
471 <span class="results_summary publisher">
472 <span class="label">Publication:</span>
473 [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %]
474 [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %]
475 [% IF ( SEARCH_RESULT.publicationyear ) %]
476 [% SEARCH_RESULT.publicationyear | html %]
478 [% IF ( SEARCH_RESULT.copyrightdate ) %]
479 [% SEARCH_RESULT.copyrightdate | html %]
482 [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %]
483 [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %]
484 [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %][% END %]
485 [% IF ( SEARCH_RESULT.timestamp ) %] <em>(modified on [% SEARCH_RESULT.timestamp | html %])</em>[% END %]
488 [% IF ( SEARCH_RESULT.summary ) %]
489 <span class="result_summary">
490 [% SEARCH_RESULT.summary | html %]
494 [% IF ( SEARCH_RESULT.copyrightdate ) %]
495 <span class="results_summary date">
496 <span class="label">Date:</span>
497 [% SEARCH_RESULT.copyrightdate | html %]
501 <span class="results_summary">
502 <span class="label">Availability:</span>
503 [% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
504 <span class="available"><strong>Items available:</strong>
505 [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
506 [% IF available_items_loo.this_branch %]
507 <span class="highlight-row-results">
512 [% IF ( singleBranchMode ) %]
513 <span class="shelvingloc">[% available_items_loo.location | html %]</span>
515 [% available_items_loo.branchname | html %]
518 [% IF ( OPACItemsResultsDisplay ) %]
519 [% UNLESS ( singleBranchMode ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
520 [% 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 %]
522 ([% available_items_loo.count | html %]),
524 [% END # / FOREACH available_items_loo %]
527 [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %]
528 [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
529 <span id="alternateholdings">[% ALTERNATEHOLDING.holding | html %]</span>,
532 <span class="unavailable">No items available:</span>
534 [% END # / IF SEARCH_RESULT.available_items_loop.size %]
536 <span class="unavailable">
537 [% IF ( SEARCH_RESULT.onloancount ) %] Checked out ([% SEARCH_RESULT.onloancount | html %]), [% END %]
538 [% IF ( SEARCH_RESULT.withdrawncount ) %] Withdrawn ([% SEARCH_RESULT.withdrawncount | html %]), [% END %]
539 [% UNLESS ( SEARCH_RESULT.hidelostitems ) %][% IF ( SEARCH_RESULT.itemlostcount ) %] Lost ([% SEARCH_RESULT.itemlostcount | html %]),[% END %][% END %]
540 [% IF ( SEARCH_RESULT.damagedcount ) %] Damaged ([% SEARCH_RESULT.damagedcount | html %]),[% END %]
541 [% IF ( SEARCH_RESULT.orderedcount ) %] On order ([% SEARCH_RESULT.orderedcount | html %]),[% END %]
542 [% IF ( SEARCH_RESULT.onholdcount ) %] On hold ([% SEARCH_RESULT.onholdcount | html %]),[% END %]
543 [% IF ( SEARCH_RESULT.intransitcount ) %] In transit ([% SEARCH_RESULT.intransitcount | html %]),[% END %]
545 </span> <!-- / .results_summary -->
546 [% END # / IF OPACXSLTResultsDisplay %]
548 [% IF ( SEARCH_RESULT.score_avg ) %]
549 <div class="results_summary">
550 [% FOREACH i IN [ 1 2 3 4 5 ] %]
551 [% IF ( SEARCH_RESULT.score_int >= i ) %]
552 <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>
554 <div class="star-rating rater-[% i | html %] star star-rating-applied star-rating-readonly"><a title="[% i | html %]">[% i | html %]</a></div>
557 <span id="babeltheque-rating_total_[% SEARCH_RESULT.biblionumber | html %]"> [% SEARCH_RESULT.score_avg | html %] / 5 (on [% SEARCH_RESULT.num_scores | html %] rates)</span>
559 [% IF ( SEARCH_RESULT.num_critics ) %]
560 <span class="social_data">[% SEARCH_RESULT.num_critics | html %] Internet user critics</span>
562 [% IF ( SEARCH_RESULT.num_critics_pro ) %]
563 <span class="social_data">[% SEARCH_RESULT.num_critics_pro | html %] Professional critics</span>
565 [% IF ( SEARCH_RESULT.num_videos ) %]
566 <span class="social_data">[% SEARCH_RESULT.num_videos | html %] Video extracts</span>
568 [% IF ( SEARCH_RESULT.num_quotations ) %]
569 <span class="social_data">[% SEARCH_RESULT.num_quotations | html %] Quotations</span>
571 </div> <!-- / .results_summary -->
572 [% END # / IF SEARCH_RESULT.score_avg %]
574 [% IF ( LibraryThingForLibrariesID ) %]
575 <div class="ltfl_reviews"></div>
578 [% IF ( TagsShowEnabled && SEARCH_RESULT.TagLoop.size ) %]
579 <div class="results_summary tags">
580 <span class="label">Tags:</span>
582 [% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]
584 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
585 <span class="weight">([% TagLoo.weight_total | html %])</span>
592 [% IF Koha.Preference('virtualshelves') AND SEARCH_RESULT.shelves.count %]
593 <div class="results_summary shelves">
594 <span class="label">Lists:</span>
596 [% FOREACH shelf IN SEARCH_RESULT.shelves %]
598 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]">[% shelf.shelfname | html %]</a>
599 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
606 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]
607 <span class="results_summary">
608 <span class="label">Match:</span>
609 [% SEARCH_RESULT.searchhighlightblob | html %]
613 [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
615 [% IF ( OpacStarRatings == 'all' ) %]
616 <div class="results_summary ratings">
617 [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
618 [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
619 <div class="br-wrapper br-theme-fontawesome-stars">
620 <div class="br-widget br-readonly">
621 [% FOREACH i IN [ 1 2 3 4 5 ] %]
622 [% IF rating_avg_int == i %]
623 <a href="#" class="br-selected br-current"></a>
624 [% ELSIF rating_avg_int > i %]
625 <a href="#" class="br-selected"></a>
633 [% IF SEARCH_RESULT.ratings.count > 0 %]
634 <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]"> ([% SEARCH_RESULT.ratings.count | html %] votes)</span>
638 </div> <!-- / .results_summary -->
639 [% END # / IF OpacStarRatings %]
641 [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
647 [% END # / FOREACH SEARCH_RESULT %]
649 </form> <!-- / #bookbag_form -->
651 <form id="hold_form" name="hold_form" method="get" action="/cgi-bin/koha/opac-reserve.pl">
652 <legend class="sr-only">Pages</legend>
653 <!-- The value will be set by holdBiblioNums() in basket.js -->
654 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value=""/>
656 </div> <!-- / .searchresults -->
658 <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
660 [% END # / IF total %]
662 [%# Display "Not finding what you're looking for" for suggestion or ILL %]
663 [% IF Koha.Preference( 'suggestion' ) == 1 && ( Koha.Preference( 'AnonSuggestions' ) == 1 || loggedinusername ) || ( Koha.Preference( 'ILLModule' ) == 1 && loggedinusername ) %]
664 <div class="suggestion">
665 Not finding what you're looking for?
667 [% IF Koha.Preference( 'suggestion' ) == 1 %]
668 [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
669 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
670 [% ELSIF loggedinusername %]
671 <li>Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></li>
674 [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %]
675 <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>
680 </div> <!-- / #userresults -->
681 </div> <!-- /.span10/12 -->
682 </div> <!-- / .row -->
683 </div> <!-- / .container-fluid -->
684 </div><!-- / .main -->
686 [% INCLUDE 'opac-bottom.inc' %]
687 [% BLOCK jsinclude %]
688 [% IF ( LibraryThingForLibrariesID ) %]
689 <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script>
691 [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
692 [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
693 [% Asset.js("js/authtoresults.js") | $raw %]
694 [% Asset.js("lib/hc-sticky.js") | $raw %]
695 [% IF ( OpacHighlightedWords ) %]
696 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
698 [% IF OpenLibraryCovers || OpenLibrarySearch %]
699 [% Asset.js("js/openlibrary.js") | $raw %]
703 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
704 function holdMultiple() {
705 var checkedBiblioNums = ""; // Separated by "/"
706 var checkedCount = 0;
707 if(document.bookbag_form.biblionumber.length > 0) {
708 for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
709 if (document.bookbag_form.biblionumber[i].checked) {
710 checkedBiblioNums += (document.bookbag_form.biblionumber[i].value + "/");
716 if (checkedCount > 0) {
717 holdBiblioNums(checkedBiblioNums);
719 alert( __("No item was selected") );
723 function holdBiblioNums(numList) {
724 // numList: biblio numbers separated by "/"
725 $("#hold_form_biblios").attr("value", numList);
726 $("#hold_form").submit();
728 [% END # /IF opacuserlogin && RequestOnOpac %]
730 [% IF ( TagsInputEnabled && loggedinusername ) %]
731 function tagSelected() {
732 var checkedBoxes = $(".searchresults :checkbox:checked");
733 if ($(checkedBoxes).size() == 0) {
734 alert( __("No item was selected") );
736 $("#tagsel_tag").hide();
738 $("#tagsel_form").show();
742 function tagCanceled() {
743 $("#tagsel_form").hide();
744 $("#tagsel_tag").show();
746 $("#tagsel_new").val("");
747 $("#tagsel_status, .tagstatus").empty().hide();
750 function tagAdded() {
751 var checkedBoxes = $(".searchresults :checkbox:checked");
752 if ($(checkedBoxes).size() == 0) {
753 alert( __("No item was selected") );
757 var tag = $("#tagsel_new").val();
758 if (!tag || (tag == "")) {
759 alert(MSG_NO_TAG_SPECIFIED);
764 for (var i = 0; i < $(checkedBoxes).size(); i++) {
765 var box = $(checkedBoxes).get(i);
766 bibs[i] = $(box).val();
769 KOHA.Tags.add_multitags_button(bibs, tag);
772 [% END # /IF TagsInputEnabled && loggedinusername %]
775 function enableCheckboxActions(){
776 // Enable/disable controls if checkboxes are checked
777 var checkedBoxes = $(".cb:checked");
778 var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
779 if ($(checkedBoxes).size()) {
780 $(".selections").html(_("With selected titles: "));
781 $(controls).removeClass("disabled");
783 $(".selections").html(_("Select titles to: "));
784 $(controls).addClass("disabled");
788 [% IF ( OpacHighlightedWords ) %]
789 var q_array = new Array(); // holds search terms if available
791 function highlightOff() {
792 $("td").removeHighlight();
793 $(".highlight_toggle").toggle();
795 function highlightOn() {
798 q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
799 q_array[x] = q_array[x].toLowerCase();
800 var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|');
801 if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
802 $(".title").highlight(q_array[x]);
803 $(".author").highlight(q_array[x]);
804 $(".results_summary").highlight(q_array[x]);
807 $(".highlight_toggle").toggle();
809 [% END # /IF OpacHighlightedWords %]
811 $(document).ready(function(){
813 $(".moretoggle").click(function(e){
815 $(this).siblings(".collapsible-facet").toggle();
816 $(this).siblings(".moretoggle").toggle();
820 [% IF ( OpacHighlightedWords ) %]
821 $('a.title').each(function() {
822 $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
826 $(".cb").click(function(){
827 enableCheckboxActions();
829 enableCheckboxActions();
831 $(".br-readonly a").on("click", function(e){
835 $('.resort').change(function() {
836 $('#bookbag_form').submit();
839 $('#results_per_page').change(function() {
840 $('#bookbag_form').submit();
843 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
844 [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
845 $("#addto").on("change",function(){
848 $(".addto").find("input:submit").click(function(){
853 $("#addto").on("click",function(){
861 addtoOption = $("#addto").find("option:selected");
862 addtoval = addtoOption.val();
863 if(addtoval == "addtolist"){
864 var shelfnumber = addtoOption.attr("id").replace("s","");
866 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
869 } else if(addtoval == "newlist"){
870 [% IF ( loggedinusername ) %]if (vShelfAdd()) {
871 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
873 alert(_("You must be logged in to create or add to lists"));
876 } else if(addtoval == "morelists"){
877 [% IF ( loggedinusername ) %]
879 Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
882 alert(_("You must be logged in to create or add to lists"));
886 if(addtoval == "addtocart" || $("#addto").attr("class") == "addtocart"){
891 $("#CheckAll").on("click",function(e){
893 $(".cb").prop("checked", true);
894 enableCheckboxActions();
896 $("#CheckNone").on("click",function(e){
898 $(".cb").prop("checked", false);
899 enableCheckboxActions();
902 $(".hold").on("click", function(e){
907 [% IF ( query_desc ) %]
908 [% IF ( OpacHighlightedWords ) %]
909 q_array = query_desc.split(" ");
910 // ensure that we don't have "" at the end of the array, which can
911 // break the highlighter
912 while (q_array.length > 0 && q_array[q_array.length-1] == "") {
913 q_array = q_array.splice(0,-1);
916 $("#highlight_toggle_on" ).hide().click(function(e) {
920 $("#highlight_toggle_off").show().click(function(e) {
924 [% END # /IF OpacHighlightedWords %]
925 [% IF ( OverDriveEnabled ) %]
926 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>' );
927 $( '#numresults' ) .after( $overdrive_results );
928 //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
929 //as the overdrive API treats double quotes as a search term and returns extra results
930 od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
931 od_querystring = new DOMParser().parseFromString( od_querystring, 'text/html').body.innerText;
932 od_querystring = od_querystring.replace(/\"/g,"'");
933 KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", od_querystring, 1, 0, function( data ) {
935 $overdrive_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OverDrive') );
939 if ( data.totalItems ) {
940 $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>' );
942 $overdrive_results.remove();
945 [% END # /IF OverDriveEnabled %]
946 [% IF ( RecordedBooksEnabled ) %]
947 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>' );
948 $( '#numresults' ) .after( $recordedbooks_results );
949 KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
951 $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error);
955 // data.total can be either 42 or "60+"
956 if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) {
957 $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>' );
959 $recordedbooks_results.remove();
962 [% END # /IF RecordedBooksEnabled %]
963 [% IF ( OpenLibrarySearch ) %]
964 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>' );
965 $( '#numresults' ) .after( $openlibrary_results );
966 KOHA.OpenLibrary.search( querystring, null, function( data ) {
968 $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
972 if ( data.numFound > 0 ) {
973 $openlibrary_results.html( '<a href="' + KOHA.OpenLibrary.searchUrl(querystring) + '" target="openlibrary">' + MSG_RESULTS_FOUND_IN_COLLECTION.format(data.numFound, 'OpenLibrary') + '</a>' );
975 $openlibrary_results.remove();
978 [% END # /IF OpenLibrarySearch %]
979 [% END # /IF query_desc %]
981 [% IF ( TagsInputEnabled && loggedinusername ) %]
982 $("#tagsel_tag").show().click(function(){
986 $("#tagsel_cancel").click(function(){
990 $("#tagsel_button").click(function(){
995 $(".tag_add").click(function(){
996 var thisid = $(this).attr("id");
997 thisid = thisid.replace("tag_add","");
998 $(this).addClass("hidden");
999 $("#tagform"+thisid).show();
1000 $("#newtag"+thisid).focus();
1001 $("#newtag"+thisid+"_status").empty().hide();
1004 $(".cancel_tag_add").click(function(){
1005 var thisid = $(this).attr("id");
1006 thisid = thisid.replace("cancel","");
1007 $("#tagform"+thisid).hide();
1008 $("#tag_add"+thisid).removeClass("hidden");
1009 $("#newtag"+thisid).val("");
1010 $("#newtag"+thisid+"_status").empty().hide();
1013 $(".tagbutton").click(function(){
1014 var thisid = $(this).attr("title");
1015 var tag = $("#newtag"+thisid).val();
1016 if (!tag || (tag == "")) {
1017 alert(MSG_NO_TAG_SPECIFIED);
1020 KOHA.Tags.add_tag_button(thisid, tag);
1023 [% END # /IF TagsInputEnabled && loggedinusername %]
1025 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1026 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1027 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1028 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1029 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1032 [% IF ( DidYouMean ) %]
1033 $("#didyoumean").load("/cgi-bin/koha/svc/suggestion?render=stub&q=[% querystring |uri %]",
1035 $(this).addClass("dym-loaded");
1039 $("input.newtag").on('keydown', function(e){
1040 if (e.keyCode == 13) { e.preventDefault(); }
1043 Sticky = $("#floating");
1045 stickTo: ".searchresults",
1046 stickyClass: "floating"