1 [% PROCESS "opac/parts/misc_util.tt2";
5 ctx.result_start = 1 + ctx.page_size * page;
6 ctx.result_stop = ctx.page_size * (page + 1);
7 IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
9 result_count = ctx.result_start;
14 [% PROCESS "opac/parts/result/paginate.tt2" %]
15 [% ctx.results_count_header = PROCESS results_count_header;
16 ctx.results_count_header %]
20 <div class="col-xl-2 d-none d-xl-block">
21 [% INCLUDE 'opac/parts/result/facets.tt2' %]
23 <div id="result_table_div" class="border-bottom col-12 col-xl-10 px-3">
24 <div id="result_block" class="result_block_visible">
26 <div id="record_selector_block" class="mx-2 hidden">
27 <input type="checkbox" id="select_all_records"></input>
28 <label for="select_all_records">[% l('Select [_1] - [_2]', ctx.result_start, ctx.result_stop) %]</label>
29 <span id="selected_records_summary">
30 <a href="[% mkurl(ctx.opac_root _ '/mylist') %]" class="no-dec" rel="nofollow" vocab="">
31 <span id="selected_records_count">[% ctx.mylist.size %]
36 <span id="hit_selected_record_limit" class="hidden">Reached limit!</span>
37 <a id="clear_basket" href="#">[% l('Clear basket') %]</a>
41 <table id="result_table_table" title="[% l('Search Results') %]" class="table_no_border_space container-fluid">
42 <thead class="sr-only">
44 <th>[% l('Search result number') %]</th>
45 <th>[% l('Book jacket cover art') %]</th>
46 <th>[% l('Item details and Actions') %]</th>
50 <tbody id="result_table">
51 [% FOR rec IN ctx.records;
53 attrs.marc_xml = rec.marc_xml;
54 attrs.mr_constituent_ids = [];
55 FOREACH mr_constituent_id IN rec.mr_constituent_ids;
56 attrs.mr_constituent_ids.push(mr_constituent_id);
58 PROCESS get_marc_attrs args=attrs;
60 attrs.title = attrs.title_extended;
62 # note: rec.id refers to the record identifier, regardless
63 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
65 IF rec.mr_constituent_count > 1;
66 # metarecords link to record list page
67 record_url_path = ctx.opac_root _ '/results';
68 add_parms = {metarecord => rec.mmr_id};
71 # for MR, bre_id refers to the master and in
72 # this case, only, record
73 record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
74 add_parms = { badges => rec.badges.join(',') };
79 record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id;
80 add_parms = { badges => rec.badges.join(',') };
85 <tr class="result_table_row">
87 <!--Count&Checkboxes-->
89 <div class="col-lg-1">
90 <div class="results_row_count" name="results_row_count"> [% IF !ctx.is_meta; %]
91 <label for="selected_record">[% result_count; result_count = result_count + 1 %]</label>
92 <input type="checkbox" id="select-[% rec.bre_id %]" name="selected_record"
93 [% IF is_selected %] checked="checked" [% END %]
94 title="[% l('Add to Basket') %]"
95 aria-label="[% l('Add to Basket') %]"
96 class="result_record_selector" value="[% rec.bre_id %]">
105 <div class='my-auto col-lg-2 text-center' id="result[% rec.bre_id %]">
106 <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
107 name='item_jacket' class='my-2'
108 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/r/[% rec.bre_id | uri %]' style="max-height:150px;" /></a><br />
111 <div class='result_table_title_cell col-lg-9' name='result_table_title_cell'>
113 <div class="result_metadata col-md-9 col-12">
115 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'></abbr>
117 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'></abbr>
119 <a class='record_title search_link' name='record_[% rec.id %]'
120 href="[% mkurl(record_url_path, add_parms, del_parms); %]"
121 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
122 [% IF attrs.hl.title; attrs.hl.title; ELSE; attrs.title | html; END %]
126 [%- UNLESS show_detail_view;
128 pubdate_clean = attrs.pubdate | html;
129 l(" ([_1])", pubdate_clean);
130 ELSIF attrs.copyright;
131 copyright_clean = attrs.copyright | html;
132 l(" ([_1])", copyright_clean);
136 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
137 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">([% rec.mr_constituent_count %])</span>
140 [%- FOR entry IN attrs.graphic_titles;
141 FOR alt IN entry.graphic;
144 diratt = ' dir="' _ alt.dir _ '"';
146 <div class="graphic880"[% diratt %]>
147 [% alt.value | html %]
152 <a title="[% l("Perform an Author Search") %]"
153 class="record_author"
155 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
156 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
157 -%]" rel="nofollow" vocab="">[% IF attrs.hl.author; attrs.hl.author; ELSE; attrs.author | html; END %]</a>
159 FOR entry IN attrs.graphic_authors;
160 FOR alt IN entry.graphic;
163 diratt = ' dir="' _ alt.dir _ '"';
166 <div class="graphic880"[% diratt %]>
167 [% alt.value | html %]
172 <div class='result_table_title_cell'>
173 [%- IF attrs.format_label; %]
174 [% FOR format IN attrs.all_formats %]
175 <img title="[% format.label | html %]"
176 alt="[% format.label | html %]"
177 src="[% format.icon %]" />
178 [% format.label | html %]
184 [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
185 <div><span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span></div>
189 title="[% l('Record Holdings Summary') %]"
190 class="table_no_border_space table_no_border results_info_table container-fluid">
193 [%- IF show_detail_view -%]
194 [% IF args.holdings.size > 0 %]
195 <tr name='bib_cn_list' class='result_table_title_cell'>
196 <td valign='top'><strong>[% l('Call number:') %]</strong></td>
197 <td>[% args.holdings.0.label | html %]</td>
200 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
201 [% UNLESS rec.mmr_id %]
202 <!-- Do not show publication-specific information on a metarecord search results page -->
203 [% IF attrs.publisher %]
204 <tr name="results_pub_tr">
205 <td valign="top"><strong>[% l('Publisher:') %]</strong></td>
206 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
207 [%- FOR entry IN attrs.graphic_pubinfos;
208 FOR alt IN entry.graphic;
211 diratt = ' dir="' _ alt.dir _ '"';
214 <div class="graphic880"[% diratt %]>[% alt.value | html %]</div>
218 [% ELSIF attrs.producer %]
219 <tr name="results_pub_tr">
220 <td valign="top"><strong>[% l('Producer:') %]</strong></td>
221 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
223 [% ELSIF attrs.distributor %]
224 <tr name="results_pub_tr">
225 <td valign="top"><strong>[% l('Distributor:') %]</strong></td>
226 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
228 [% ELSIF attrs.manufacturer %]
229 <tr name="results_pub_tr">
230 <td valign="top"><strong>[% l('Manufacturer:') %]</strong></td>
231 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
234 [% IF attrs.isbns.size > 0 %]
235 <tr name="results_isbn_tr">
236 <td valign="top"><strong>[% l('ISBN:') %]</strong></td>
237 <td>[% attrs.isbns.0 | html %]</td>
240 [%- IF attrs.issns.size > 0 %]
241 <tr name="results_issn_tr">
243 <strong>[% l('ISSN:') %]</strong>
245 <td>[% attrs.issns.0 | html %]</td>
248 [%- IF openurl.enabled == 'true';
249 FOREACH issn IN args.issns;
251 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
252 FOREACH res IN res_urls; %]
253 <tr name="results_issn_tr">
254 <td valign="top"><strong><a href="[% res.target_url %]">[% res.public_name | html %]</a></strong>
256 <td>[% res.target_coverage | html %]
257 [%- IF res.target_embargo != '';' - ';res.target_embargo | html; END;-%]
264 [% IF attrs.edition %]
265 <tr name="results_edition_tr">
266 <td valign="top"><strong>[% l('Edition:') %]</strong></td>
267 <td>[% attrs.edition | html %]
268 [%- FOR entry IN attrs.graphic_editions;
269 FOR alt IN entry.graphic;
271 IF alt.dir; diratt = ' dir="' _ alt.dir _ '"'; END;
273 <div class="graphic880"[% diratt %]>
274 [% alt.value | html %]
280 [% IF attrs.phys_desc %]
281 <tr name="results_phys_desc_tr">
282 <td nowrap="nowrap" valign="top"><strong>[% l('Phys. Desc.:') %]</strong></td>
283 <td>[% args.phys_desc | html %]</td>
286 [% FOR uri IN args.uris %]
287 <tr name='bib_uri_list' class='result_table_title_cell row'>
288 <td valign='top'><strong>[% l('Electronic resource') %]</strong></td>
289 <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
293 [%- IF args.holdings.size > 0;
294 FOREACH copy IN args.holdings;
295 IF copy.part_label != '';
301 <tr name='bib_cn_list' class='result_table_title_cell container-fluid'>
303 <table role="presentation" title="[% l('Record Holdings Details') %]" class='container-fluid table table-hover mt-4 miniTable holdingsTable'>
306 <th>[% l('Library') %]</th>
307 <th>[% l('Shelving location') %]</th>
308 <th>[% l('Call number') %]</th>
309 [%- IF has_parts == 'true'; %]
310 <th>[% l('Part') %]</th>
312 <th>[% l('Status') %]</th>
316 [% FOR copy IN args.holdings %]
318 <td><span class="sr-only">Library </span>[%- copy_info = copy; INCLUDE "opac/parts/library_name_link.tt2"; %]</td>
319 <td><span class="sr-only">Shelving Location </span>[% copy.location | html %]</td>
320 <td><span class="sr-only">Call Number </span>[% copy.label | html %]</td>
321 [%- IF has_parts == 'true'; %]
322 <td><span class="sr-only">Part </span>[% copy.part_label %]</td>
324 <td><span class="sr-only">Status </span>[% copy.status | html %]</td>
331 [%- has_parts = 'false'; END; %]
332 [% END %] <!-- END detail_record_view -->
335 IF ebook_api.enabled == 'true';
336 INCLUDE "opac/parts/ebook_api/avail.tt2";
339 [% UNLESS rec.mmr_id;
340 PROCESS "opac/parts/result/copy_counts.tt2";
342 [% IF rec.user_circulated %]
343 <div class="result_item_circulated">
344 <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt="[% l('Checked Out Before') %]"/>
345 <span>[% l('I have checked this item out before') %]</span>
350 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
351 <div class="result-bookbag-item-note">[% note.note | html %]</div>
358 <div class="result_table_utils_cont col-md-3 d-flex">
359 <div class="result_table_utils row mx-auto d-inline-block d-md-inline-flex">
360 <div class="btn-group-vertical">
361 [%- search_ou = ctx.search_ou;
362 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
363 IF ctx.place_unfillable || (num_holdable_copies > 0 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0))
365 [% del_parms = ['tag','subfield','term','_special','sort','page'];
366 add_parms = {hold_target => rec.id, hold_type => hold_type, hold_source_page => mkurl()};
369 # Do not pass "advanced params" to hold code
370 # Instead, pass the scrubed query in one-line form
371 del_parms = del_parms.merge(['query', 'bool', 'qtype', 'contains', '_adv']);
372 add_parms.import({query => ctx.naive_query_scrub(ctx.user_query)});
377 <!--Place Hold Button -->
378 <button type="button" class="btn btn-light">
379 <a href="[% mkurl(ctx.opac_root _ '/place_hold', add_parms, del_parms) %]"
380 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
381 class="no-dec" rel="nofollow" vocab="">
382 <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt=""/>
383 <span class="result_place_hold">[% l('Place Hold') %]</span>
388 <!-- eBook Buttons -->
389 [%- IF ebook_api.enabled == 'true' && args.ebook %]
390 <button type="button" class="btn btn-light">
391 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
392 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
393 ['query','tag','subfield','term','_special','sort','page']) %]"
394 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
395 class="no-dec" rel="nofollow" vocab=""><img
396 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
397 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
399 <button type="button" class="btn btn-light">
400 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
401 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
402 ['query','tag','subfield','term','_special','sort','page']) %]"
403 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
404 class="no-dec btn btn-primary btn-sm" rel="nofollow" vocab=""><img
405 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
406 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
410 <!--Basket and My Lists Buttons -->
411 [% IF !ctx.is_meta %]
412 [% IF !ctx.is_staff %]
414 addhref = mkurl(ctx.opac_root _ '/mylist/add',
415 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
416 delhref = mkurl(ctx.opac_root _ '/mylist/delete',
417 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
419 <button type="button" class="btn btn-light">
420 <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
421 data-recid="[% rec.id %]" data-action="add"
422 class="mylist_action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
423 title="[% l("Add [_1] to basket", attrs.title) %]" rel="nofollow" vocab="">
424 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
425 [% l("Add to basket") %]
428 <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
429 data-recid="[% rec.id %]" data-action="delete"
430 class="mylist_action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
431 title="[% l("Remove [_1] from basket", attrs.title) %]" rel="nofollow" vocab="">
432 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
433 [% l("Remove from basket") %]
437 INCLUDE "opac/parts/bookbag_actions.tt2";
443 <!--Added Content - Content Cafe -->
444 [% IF ENV.OILS_CONTENT_CAFE_USER %]
445 [% ident = attrs.isbn_clean || attrs.upc %]
446 <button type="button" class="btn btn-light">
448 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
449 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
450 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
451 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
452 <img src='[% ctx.media_prefix %]/images/starz.png[% ctx.cache_key %]' alt="[% l('Ratings Icon') %]"/>
453 <span class="results_reviews">[% l('Reviews & More') %]</span>
465 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
468 <td align='center'> <!-- Chilifresh reviews link -->
469 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
474 <td colspan='5'> <!-- Chilifresh reviews panel -->
475 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
487 <div class="facet_sidebar_hidden" id="facet_sidebar">
488 [%- IF ctx.is_staff %]
489 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
490 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
492 <h3 class="sr-only">[% l('Search Results facets') %]</h3>
493 <h3 class="sr-only">[% l('Search Results List') %]</h3>
499 <div class="result_footer_nav1">
500 [% ctx.results_count_header %]
503 <div class="d-xl-none d-block">
504 [% INCLUDE 'opac/parts/result/facets.tt2' %]
507 resultBlock = document.getElementById('result_block');
508 resultButton = document.getElementById('return_to_hits');
509 facetSidebar = document.getElementById('facet_sidebar');
510 facetButton = document.getElementById('refine_hits');
511 function getFacety() {
512 resultBlock.setAttribute('class', 'result_block_hidden');
513 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
514 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
515 facetButton.setAttribute('class', 'result_block_hidden');
516 window.location.hash = 'return_to_hits';
518 function getResulty() {
519 resultBlock.setAttribute('class', 'result_block_visible');
520 resultButton.setAttribute('class', 'result_block_hidden');
521 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
522 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
523 window.location.hash = 'refine_hits';