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" />
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>
42 [% FOR rec IN ctx.records;
44 attrs.marc_xml = rec.marc_xml;
45 attrs.mr_constituent_ids = [];
46 FOREACH mr_constituent_id IN rec.mr_constituent_ids;
47 attrs.mr_constituent_ids.push(mr_constituent_id);
49 PROCESS get_marc_attrs args=attrs;
51 attrs.title = attrs.title_extended;
53 # note: rec.id refers to the record identifier, regardless
54 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
56 IF rec.mr_constituent_count > 1;
57 # metarecords link to record list page
58 record_url_path = ctx.opac_root _ '/results';
59 add_parms = {metarecord => rec.mmr_id};
62 # for MR, bre_id refers to the master and in
63 # this case, only, record
64 record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
65 add_parms = { badges => rec.badges.join(',') };
70 record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id;
71 add_parms = { badges => rec.badges.join(',') };
76 <div class="row" style="border-top: 1px solid grey;">
78 <!--Count&Checkboxes-->
79 <div class="col-lg-1">
80 <div class="results_row_count"> [% IF !ctx.is_meta; %]
81 <label for="select-[% rec.bre_id %]">[% result_count; result_count = result_count + 1 %]</label>
82 <input type="checkbox" id="select-[% rec.bre_id %]"
83 [% IF is_selected %] checked="checked" [% END %]
84 title="[% l('Add to Basket') %]"
85 aria-label="[% l('Add to Basket') %]"
86 class="result_record_selector" value="[% rec.bre_id %]" />
91 <div class='col-sm-auto text-center' id="result[% rec.bre_id %]">
92 <a href="[% mkurl(record_url_path, add_parms, del_parms); %]"><img alt="[% attrs.title | html;%]"
93 id='item_jacket[% rec.bre_id %]' class='my-2'
94 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/r/[% rec.bre_id | uri %]' style="max-height:150px;" /></a><br />
97 <div class='result_table_title_cell col'>
98 <div class="row align-items-start">
99 <div class="result_metadata col-md-8 col-12">
101 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'></abbr>
103 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'></abbr>
105 <a class='record_title search_link' id='record_[% rec.id %]'
106 href="[% mkurl(record_url_path, add_parms, del_parms); %]"
107 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
108 [% IF attrs.hl.title; attrs.hl.title; ELSE; attrs.title | html; END %]
111 [%- IF attrs.format_label; %]
112 [% FOR format IN attrs.all_formats %]
113 <img alt="[% format.label | html %]"
114 src="[% format.icon %]" />
115 [% format.label | html %]
119 [%- UNLESS show_detail_view;
121 pubdate_clean = attrs.pubdate | html;
122 l(" ([_1])", pubdate_clean);
123 ELSIF attrs.copyright;
124 copyright_clean = attrs.copyright | html;
125 l(" ([_1])", copyright_clean);
129 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
130 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">([% rec.mr_constituent_count %])</span>
133 [%- FOR entry IN attrs.graphic_titles;
134 FOR alt IN entry.graphic;
137 diratt = ' dir="' _ alt.dir _ '"';
139 <div class="graphic880"[% diratt %]>
140 [% alt.value | html %]
145 [% IF attrs.author; %]
146 <a title="[% l("Perform an Author Search") %]"
147 class="record_author"
149 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
150 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
151 -%]" rel="nofollow" vocab="">[% IF attrs.hl.author; attrs.hl.author; ELSE; attrs.author | html; END %]</a>
156 FOR entry IN attrs.graphic_authors;
157 FOR alt IN entry.graphic;
160 diratt = ' dir="' _ alt.dir _ '"';
163 <div class="graphic880"[% diratt %]>
164 [% alt.value | html %]
171 [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
172 <div><span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span></div>
176 title="[% l('Record Holdings Summary') %]"
177 class="table_no_border_space table_no_border results_info_table container-fluid">
180 [%- IF show_detail_view -%]
181 [% IF args.holdings.size > 0 %]
182 <tr class='result_table_title_cell'>
183 <td valign='top'><strong>[% l('Call number:') %]</strong></td>
184 <td>[% args.holdings.0.label | html %]</td>
187 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
188 [% UNLESS rec.mmr_id %]
189 <!-- Do not show publication-specific information on a metarecord search results page -->
190 [% IF attrs.publisher %]
192 <td valign="top"><strong>[% l('Publisher:') %]</strong></td>
193 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
194 [%- FOR entry IN attrs.graphic_pubinfos;
195 FOR alt IN entry.graphic;
198 diratt = ' dir="' _ alt.dir _ '"';
201 <div class="graphic880"[% diratt %]>[% alt.value | html %]</div>
205 [% ELSIF attrs.producer %]
207 <td valign="top"><strong>[% l('Producer:') %]</strong></td>
208 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
210 [% ELSIF attrs.distributor %]
212 <td valign="top"><strong>[% l('Distributor:') %]</strong></td>
213 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
215 [% ELSIF attrs.manufacturer %]
217 <td valign="top"><strong>[% l('Manufacturer:') %]</strong></td>
218 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
221 [% IF attrs.isbns.size > 0 %]
223 <td valign="top"><strong>[% l('ISBN:') %]</strong></td>
224 <td>[% attrs.isbns.0 | html %]</td>
227 [%- IF attrs.issns.size > 0 %]
230 <strong>[% l('ISSN:') %]</strong>
232 <td>[% attrs.issns.0 | html %]</td>
235 [%- IF openurl.enabled == 'true';
236 FOREACH issn IN args.issns;
238 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
239 FOREACH res IN res_urls; %]
241 <td valign="top"><strong><a href="[% res.target_url %]">[% res.public_name | html %]</a></strong>
243 <td>[% res.target_coverage | html %]
244 [%- IF res.target_embargo != '';' - ';res.target_embargo | html; END;-%]
251 [% IF attrs.edition %]
253 <td valign="top"><strong>[% l('Edition:') %]</strong></td>
254 <td>[% attrs.edition | html %]
255 [%- FOR entry IN attrs.graphic_editions;
256 FOR alt IN entry.graphic;
258 IF alt.dir; diratt = ' dir="' _ alt.dir _ '"'; END;
260 <div class="graphic880"[% diratt %]>
261 [% alt.value | html %]
267 [% IF attrs.phys_desc %]
269 <td valign="top"><strong>[% l('Phys. Desc.:') %]</strong></td>
270 <td>[% args.phys_desc | html %]</td>
273 [% FOR uri IN args.uris %]
274 <tr class='result_table_title_cell row'>
275 <td valign='top'><strong>[% l('Electronic resource') %]</strong></td>
276 <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
280 [%- IF args.holdings.size > 0;
281 FOREACH copy IN args.holdings;
282 IF copy.part_label != '';
288 <tr class='result_table_title_cell container-fluid'>
290 <table role="presentation" title="[% l('Record Holdings Details') %]" class='container-fluid table table-hover mt-4 miniTable holdingsTable'>
293 <th>[% l('Library') %]</th>
294 <th>[% l('Shelving location') %]</th>
295 <th>[% l('Call number') %]</th>
296 [%- IF has_parts == 'true'; %]
297 <th>[% l('Part') %]</th>
299 <th>[% l('Status') %]</th>
303 [% FOR copy IN args.holdings %]
305 <td><span class="sr-only">Library </span>[%- copy_info = copy; INCLUDE "opac/parts/library_name_link.tt2"; %]</td>
306 <td><span class="sr-only">Shelving Location </span>[% copy.location | html %]</td>
307 <td><span class="sr-only">Call Number </span>[% copy.label | html %]</td>
308 [%- IF has_parts == 'true'; %]
309 <td><span class="sr-only">Part </span>[% copy.part_label %]</td>
311 <td><span class="sr-only">Status </span>[% copy.status | html %]</td>
318 [%- has_parts = 'false'; END; %]
319 [% END %] <!-- END detail_record_view -->
322 IF ebook_api.enabled == 'true';
323 INCLUDE "opac/parts/ebook_api/avail.tt2";
326 [% UNLESS rec.mmr_id;
327 PROCESS "opac/parts/result/copy_counts.tt2";
329 [% IF rec.user_circulated %]
330 <div class="result_item_circulated">
331 <i class="fas fa-book-reader" aria-hidden="true"></i>
332 <span>[% l('I have checked this item out before') %]</span>
337 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
338 <div class="result-bookbag-item-note">[% note.note | html %]</div>
345 <div class="col-md-4">
346 <div class="result_table_utils row">
347 <div class="btn-group-vertical mx-auto my-2" >
348 [%- search_ou = ctx.search_ou;
349 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
350 IF ctx.place_unfillable || (num_holdable_copies > 0 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0))
352 [% del_parms = ['tag','subfield','term','_special','sort','page'];
353 add_parms = {hold_target => rec.id, hold_type => hold_type, hold_source_page => mkurl()};
356 # Do not pass "advanced params" to hold code
357 # Instead, pass the scrubed query in one-line form
358 del_parms = del_parms.merge(['query', 'bool', 'qtype', 'contains', '_adv']);
359 add_parms.import({query => ctx.naive_query_scrub(ctx.user_query)});
364 <!--Place Hold Button -->
366 <a role="button" href="[% mkurl(ctx.opac_root _ '/place_hold', add_parms, del_parms) %]"
367 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
368 class="btn btn-action" rel="nofollow" vocab="">
369 <i class="fas fa-check" aria-hidden="true"></i>
370 <span class="result_place_hold">[% l('Place Hold') %]</span>
375 <!-- eBook Buttons -->
376 [%- IF ebook_api.enabled == 'true' && args.ebook %]
378 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
379 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
380 ['query','tag','subfield','term','_special','sort','page']) %]"
381 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
382 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>
385 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
386 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
387 ['query','tag','subfield','term','_special','sort','page']) %]"
388 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
389 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>
393 <!--Basket and My Lists Buttons -->
394 [% IF !ctx.is_meta %]
395 [% IF !ctx.is_staff %]
397 addhref = mkurl(ctx.opac_root _ '/mylist/add',
398 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
399 delhref = mkurl(ctx.opac_root _ '/mylist/delete',
400 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
403 <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
404 data-recid="[% rec.id %]" data-action="add"
405 role="button" class="mylist_action btn btn-action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
406 title="[% l("Add [_1] to basket", attrs.title) %]" rel="nofollow" vocab="">
407 <i class="fas fa-shopping-basket" aria-hidden="true"></i>
408 [% l("Add to basket") %]
411 <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
412 data-recid="[% rec.id %]" data-action="delete" role="button"
413 class="mylist_action btn btn-action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
414 title="[% l("Remove [_1] from basket", attrs.title) %]" rel="nofollow" vocab="">
415 <i class="fas fa-minus-circle" aria-hidden="true"></i>
416 [% l("Remove from basket") %]
420 INCLUDE "opac/parts/bookbag_actions.tt2";
426 <!--Added Content - Content Cafe -->
427 [% IF ENV.OILS_CONTENT_CAFE_USER %]
428 [% ident = attrs.isbn_clean || attrs.upc %]
431 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
432 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
433 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
434 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
435 <i class="fas fa-star" aria-hidden="true"></i>
436 <span class="results_reviews">[% l('Reviews & More') %]</span>
446 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
448 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
450 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
459 <div class="facet_sidebar_hidden" id="facet_sidebar">
460 [%- IF ctx.is_staff %]
461 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
462 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
464 <h3 class="sr-only">[% l('Search Results facets') %]</h3>
465 <h3 class="sr-only">[% l('Search Results List') %]</h3>
471 <div class="result_footer_nav1">
472 [% ctx.results_count_header %]
475 <div class="d-xl-none d-block">
476 [% INCLUDE 'opac/parts/result/facets.tt2' %]
479 resultBlock = document.getElementById('result_block');
480 resultButton = document.getElementById('return_to_hits');
481 facetSidebar = document.getElementById('facet_sidebar');
482 facetButton = document.getElementById('refine_hits');
483 function getFacety() {
484 resultBlock.setAttribute('class', 'result_block_hidden');
485 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
486 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
487 facetButton.setAttribute('class', 'result_block_hidden');
488 window.location.hash = 'return_to_hits';
490 function getResulty() {
491 resultBlock.setAttribute('class', 'result_block_visible');
492 resultButton.setAttribute('class', 'result_block_hidden');
493 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
494 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
495 window.location.hash = 'refine_hits';