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;
16 <h2 class="result-bookbag-name">[% ctx.bookbag.name | html %]</h2>
17 <div class="result-bookbag-description">[% ctx.bookbag.description | html %]</div>
24 [% PROCESS "opac/parts/result/paginate.tt2" %]
25 [% ctx.results_count_header = PROCESS results_count_header;
26 ctx.results_count_header %]
30 <div class="col-xl-2 d-none d-xl-block">
31 [% INCLUDE 'opac/parts/result/facets.tt2' %]
33 <div id="result_table_div" class="border-bottom col-12 col-xl-10 px-3">
34 <div id="result_block" class="result_block_visible">
36 <div id="record_selector_block" class="mx-2 hidden">
37 <input type="checkbox" id="select_all_records" />
38 <label for="select_all_records">[% l('Select [_1] - [_2]', ctx.result_start, ctx.result_stop) %]</label>
39 <span id="selected_records_summary">
40 <a href="[% mkurl(ctx.opac_root _ '/mylist') %]" class="no-dec" rel="nofollow" vocab="">
41 <span id="selected_records_count">[% ctx.mylist.size %]
46 <span id="hit_selected_record_limit" class="hidden">Reached limit!</span>
47 <a id="clear_basket" href="#">[% l('Clear basket') %]</a>
52 [% FOR rec IN ctx.records;
54 attrs.marc_xml = rec.marc_xml;
55 attrs.mr_constituent_ids = [];
56 FOREACH mr_constituent_id IN rec.mr_constituent_ids;
57 attrs.mr_constituent_ids.push(mr_constituent_id);
59 PROCESS get_marc_attrs args=attrs;
61 attrs.title = attrs.title_extended;
63 # note: rec.id refers to the record identifier, regardless
64 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
66 IF rec.mr_constituent_count > 1;
67 # metarecords link to record list page
68 record_url_path = ctx.opac_root _ '/results';
69 add_parms = {metarecord => rec.mmr_id};
72 # for MR, bre_id refers to the master and in
73 # this case, only, record
74 record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
75 add_parms = { badges => rec.badges.join(',') };
80 record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id;
81 add_parms = { badges => rec.badges.join(',') };
86 <div class="row" style="border-top: 1px solid grey;">
88 <!--Count&Checkboxes-->
89 <div class="col-lg-1">
90 <div class="results_row_count"> [% IF !ctx.is_meta; %]
91 <label for="select-[% rec.bre_id %]">[% result_count; result_count = result_count + 1 %]</label>
92 <input type="checkbox" id="select-[% rec.bre_id %]"
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 %]" />
101 <div class='col-sm-2 text-center' id="result[% rec.bre_id %]">
102 <a href="[% mkurl(record_url_path, add_parms, del_parms); %]"><img alt=""
103 id='item_jacket[% rec.bre_id %]' class='my-2 img-fluid'
104 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/r/[% rec.bre_id | uri %]' style="max-height:150px;" /></a><br />
107 <div class='result_table_title_cell col'>
108 <div class="row align-items-start">
109 <div class="result_metadata col-md-8 col-12">
111 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'></abbr>
113 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'></abbr>
115 <a class='record_title search_link' id='record_[% rec.id %]'
116 href="[% mkurl(record_url_path, add_parms, del_parms); %]"
117 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
118 [% IF attrs.hl.title; attrs.hl.title; ELSE; attrs.title | html; END %]
121 [%- IF attrs.format_label; %]
122 [% FOR format IN attrs.all_formats %]
123 <img alt="" src="[% format.icon %]" />
124 [% format.label | html %]
128 [%- UNLESS show_detail_view;
130 pubdate_clean = attrs.pubdate | html;
131 l(" ([_1])", pubdate_clean);
132 ELSIF attrs.copyright;
133 copyright_clean = attrs.copyright | html;
134 l(" ([_1])", copyright_clean);
138 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
139 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">([% rec.mr_constituent_count %])</span>
142 [%- FOR entry IN attrs.graphic_titles;
143 FOR alt IN entry.graphic;
146 diratt = ' dir="' _ alt.dir _ '"';
148 <div class="graphic880"[% diratt %]>
149 [% alt.value | html %]
154 [% IF attrs.author; %]
155 <a title="[% l("Perform an Author Search") %]"
156 class="record_author"
158 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
159 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
160 -%]" rel="nofollow" vocab="">[% IF attrs.hl.author; attrs.hl.author; ELSE; attrs.author | html; END %]</a>
165 FOR entry IN attrs.graphic_authors;
166 FOR alt IN entry.graphic;
169 diratt = ' dir="' _ alt.dir _ '"';
172 <div class="graphic880"[% diratt %]>
173 [% alt.value | html %]
178 [%- IF !show_detail_view AND args.holdings.size > 0 %]
179 <div class="result_call_number">
180 [% l('Call Number:') %] [% args.holdings.0.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 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 %]
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 %]
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 %]
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 %]
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 %]
236 <td valign="top"><strong>[% l('ISBN:') %]</strong></td>
237 <td>[% attrs.isbns.0 | html %]</td>
240 [%- IF attrs.issns.size > 0 %]
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; %]
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 %]
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 %]
282 <td valign="top"><strong>[% l('Phys. Desc.:') %]</strong></td>
283 <td>[% args.phys_desc | html %]</td>
286 [% FOR uri IN args.uris %]
287 <tr class='result_table_title_cell row'>
288 <td valign='top'><strong>[% l('Electronic resource') %]</strong></td>
289 <td><a href="[% uri.href | html %]" class="uri_link" target="_blank">[% uri.link | html %]</a>
291 [%- '- <span property="description">' _ uri.note _ '</span>' %]
293 [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
294 [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
295 [% '- <span property="description">'; link_note | html; '</span>' %]
301 [%- IF args.holdings.size > 0;
302 FOREACH copy IN args.holdings;
303 IF copy.part_label != '';
309 <tr class='result_table_title_cell container-fluid'>
311 <table role="presentation" title="[% l('Record Holdings Details') %]" class='container-fluid table table-hover mt-4 miniTable holdingsTable'>
314 <th>[% l('Location') %]</th>
315 <th>[% l('Shelving Location') %]</th>
316 <th>[% l('Call Number') %]</th>
317 [%- IF has_parts == 'true'; %]
318 <th>[% l('Part') %]</th>
320 <th>[% l('Status') %]</th>
324 [% FOR copy IN args.holdings %]
325 <tr mobile-count="#[% loop.count %]">
326 <td mobile-title="[% l('Location') %]"><span class="sr-only">Location </span>[%- copy_info = copy; INCLUDE "opac/parts/library_name_link.tt2"; %]</td>
327 <td mobile-title="[% l('Shelving Location') %]"><span class="sr-only">Shelving Location </span>[% copy.location | html %]</td>
328 <td mobile-title="[% l('Call Number') %]"><span class="sr-only">Call Number </span>[% copy.label | html %]</td>
329 [%- IF has_parts == 'true'; %]
330 <td mobile-title="[% l('Part') %]"><span class="sr-only">Part </span>[% copy.part_label %]</td>
332 <td mobile-title="[% l('Status') %]"><span class="sr-only">Status </span>[% copy.status | html %]</td>
339 [%- has_parts = 'false'; END; %]
340 [% END %] <!-- END detail_record_view -->
343 IF ebook_api.enabled == 'true';
344 INCLUDE "opac/parts/ebook_api/avail.tt2";
347 [% UNLESS rec.mmr_id;
348 PROCESS "opac/parts/result/copy_counts.tt2";
350 [% IF ctx.use_courses %]
351 [%- courseStrings = [] %]
352 [% FOREACH course IN rec.courses %]
353 [% courseString = course.name _ ' (' _ course.course_number _ ')' %]
354 [% courseStrings.push(courseString); %]
356 [% IF courseStrings.size > 0 %]
357 <span><strong>[% l('Associated Courses: ') %]</strong></span>
358 <span>[% courseStrings.join(', ') %]</span>
361 [% IF rec.user_circulated %]
362 <div class="result_item_circulated">
363 <i class="fas fa-book-reader" aria-hidden="true"></i>
364 <span>[% l('I have checked this item out before') %]</span>
369 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
370 <div class="result-bookbag-item-note">[% note.note | html %]</div>
377 <div class="col-md-4">
378 <div class="result_table_utils row">
379 <div class="btn-group-vertical mx-auto my-2" >
380 [%- search_ou = ctx.search_ou;
381 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
382 IF ctx.place_unfillable || (num_holdable_copies > 0 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0))
384 [% del_parms = ['tag','subfield','term','_special','sort','page'];
385 add_parms = {hold_target => rec.id, hold_type => hold_type, hold_source_page => mkurl()};
388 # Do not pass "advanced params" to hold code
389 # Instead, pass the scrubed query in one-line form
390 del_parms = del_parms.merge(['query', 'bool', 'qtype', 'contains', '_adv']);
391 add_parms.import({query => ctx.naive_query_scrub(ctx.user_query)});
396 <!--Place Hold Button -->
398 <a role="button" href="[% mkurl(ctx.opac_root _ '/place_hold', add_parms, del_parms) %]"
399 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
400 class="btn btn-action" rel="nofollow" vocab="">
401 <i class="fas fa-check" aria-hidden="true"></i>
402 <span class="result_place_hold">[% l('Place Hold') %]</span>
407 <!-- eBook Buttons -->
408 [%- IF ebook_api.enabled == 'true' && args.ebook %]
410 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
411 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
412 ['query','tag','subfield','term','_special','sort','page']) %]"
413 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
414 class="btn btn-action" role="button" rel="nofollow" vocab=""><i class="fas fa-atlas" aria-hidden="true"></i> <span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
417 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
418 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
419 ['query','tag','subfield','term','_special','sort','page']) %]"
420 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
421 class="btn btn-action" role="button" rel="nofollow" vocab=""><i class="fas fa-book-reader" aria-hidden="true"></i> <span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
425 <!--Basket and My Lists Buttons -->
426 [% IF !ctx.is_meta %]
427 [% IF !ctx.is_staff %]
429 addhref = mkurl(ctx.opac_root _ '/mylist/add',
430 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
431 delhref = mkurl(ctx.opac_root _ '/mylist/delete',
432 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
435 <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
436 data-recid="[% rec.id %]" data-action="add"
437 role="button" class="mylist_action btn btn-action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
438 [% SET esc_title = attrs.title | html -%]
439 title="[% l("Add [_1] to basket", esc_title) %]" rel="nofollow" vocab="">
440 <i class="fas fa-shopping-basket" aria-hidden="true"></i>
441 [% l("Add to basket") %]
444 <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
445 data-recid="[% rec.id %]" data-action="delete" role="button"
446 class="mylist_action btn btn-action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
447 title="[% l("Remove [_1] from basket", esc_title) %]" rel="nofollow" vocab="">
448 <i class="fas fa-minus-circle" aria-hidden="true"></i>
449 [% l("Remove from basket") %]
453 INCLUDE "opac/parts/bookbag_actions.tt2";
459 <!--Added Content - Content Cafe -->
460 [% IF ENV.OILS_CONTENT_CAFE_USER %]
461 [% ident = attrs.isbn_clean || attrs.upc %]
464 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
465 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
466 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
467 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
468 <i class="fas fa-star" aria-hidden="true"></i>
469 <span class="results_reviews">[% l('Reviews & More') %]</span>
479 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
481 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
483 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
492 <div class="facet_sidebar_hidden" id="facet_sidebar">
493 [%- IF ctx.is_staff %]
494 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
495 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
497 <h3 class="sr-only">[% l('Search Results Facets') %]</h3>
498 <h3 class="sr-only">[% l('Search Results List') %]</h3>
504 <div class="result_footer_nav1">
505 [% ctx.results_count_header %]
508 <div class="d-xl-none d-block">
509 [% INCLUDE 'opac/parts/result/facets.tt2' %]
512 resultBlock = document.getElementById('result_block');
513 resultButton = document.getElementById('return_to_hits');
514 facetSidebar = document.getElementById('facet_sidebar');
515 facetButton = document.getElementById('refine_hits');
516 function getFacety() {
517 resultBlock.setAttribute('class', 'result_block_hidden');
518 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
519 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
520 facetButton.setAttribute('class', 'result_block_hidden');
521 window.location.hash = 'return_to_hits';
523 function getResulty() {
524 resultBlock.setAttribute('class', 'result_block_visible');
525 resultButton.setAttribute('class', 'result_block_hidden');
526 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
527 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
528 window.location.hash = 'refine_hits';