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;
13 [% PROCESS "opac/parts/result/paginate.tt2" %]
14 [% ctx.results_count_header = PROCESS results_count_header;
15 ctx.results_count_header %]
17 <div id="result-bookbag-heading">
18 <div class="result-bookbag-name">[% ctx.bookbag.name | html %]</div>
19 <div class="result-bookbag-description">[% ctx.bookbag.description | html %]</div>
22 <div id="result_table_div">
23 <div class="facet_sidebar_hidden" id="facet_sidebar">
24 [%- IF ctx.is_staff %]
25 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
26 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
28 <h3 class="sr-only">[% l('Search Results facets') %]</h3>
29 [% INCLUDE 'opac/parts/result/facets.tt2' %]
30 <h3 class="sr-only">[% l('Search Results List') %]</h3>
32 <div id="result_block" class="result_block_visible">
33 <table id="result_table_table" title="[% l('Search Results') %]"
34 class="table_no_border_space table_no_cell_pad">
35 <thead class="sr-only">
37 <th>[% l('Search result number') %]</th>
38 <th>[% l('Book jacket cover art') %]</th>
39 <th>[% l('Item details and Actions') %]</th>
42 <tbody id="result_table">
43 [% FOR rec IN ctx.records;
45 attrs.marc_xml = rec.marc_xml;
46 attrs.mr_constituent_ids = [];
47 FOREACH mr_constituent_id IN rec.mr_constituent_ids;
48 attrs.mr_constituent_ids.push(mr_constituent_id);
50 PROCESS get_marc_attrs args=attrs;
52 attrs.title = attrs.title_extended;
54 # note: rec.id refers to the record identifier, regardless
55 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
57 IF rec.mr_constituent_count > 1;
58 # metarecords link to record list page
59 record_url = mkurl(ctx.opac_root _ '/results',
60 {metarecord => rec.mmr_id}, ['page']);
62 # for MR, bre_id refers to the master and in
63 # this case, only, record
64 record_url = mkurl(ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0, { badges => rec.badges.join(',') });
68 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') });
72 <tr class="result_table_row">
73 <td class="results_row_count" name="results_row_count">[%
74 result_count; result_count = result_count + 1
76 <td class='result_table_pic_header'>
77 <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
78 name='item_jacket' class='result_table_pic' width="55"
79 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
81 <td class='result_table_title_cell' name='result_table_title_cell'>
82 <div class="result_metadata">
84 <abbr class="unapi-id"
85 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
88 <abbr class="unapi-id"
89 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
92 <a class='record_title search_link' name='record_[% rec.id %]'
93 href="[% record_url %]"
94 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
95 [% attrs.title | html %]
97 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
98 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
99 ([% rec.mr_constituent_count %])
104 FOR entry IN attrs.graphic_titles;
105 FOR alt IN entry.graphic;
108 diratt = ' dir="' _ alt.dir _ '"';
111 <div class="graphic880"[% diratt %]>
112 [% alt.value | html %]
120 <a title="[% l("Perform an Author Search") %]"
121 class="record_author"
123 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
124 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
125 -%]" rel="nofollow" vocab="">[% attrs.author | html %]</a>
127 FOR entry IN attrs.graphic_authors;
128 FOR alt IN entry.graphic;
131 diratt = ' dir="' _ alt.dir _ '"';
134 <div class="graphic880"[% diratt %]>
135 [% alt.value | html %]
143 <div class='result_table_title_cell'>
144 [%- IF attrs.format_label; %]
145 [% FOR format IN attrs.all_formats %]
146 <img title="[% format.label | html %]"
147 alt="[% format.label | html %]"
148 src="[% format.icon %]" />
149 [% format.label | html %]
152 [%- UNLESS show_detail_view;
154 pubdate_clean = attrs.pubdate | html;
155 l(" ([_1])", pubdate_clean);
156 ELSIF attrs.copyright;
157 copyright_clean = attrs.copyright | html;
158 l(" ([_1])", copyright_clean);
163 [% IF rec.popularity > 0.0 %]
165 <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
170 title="[% l('Record Holdings Summary') %]"
171 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
172 [% UNLESS rec.mmr_id %]
173 [% IF args.holdings.size > 0 %]
174 <tr name='bib_cn_list' class='result_table_title_cell'>
176 <strong>[% l('Call number:') %]</strong>
178 <td>[% args.holdings.0.label | html %]</td>
183 [%- IF show_detail_view -%]
184 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
185 [% UNLESS rec.mmr_id %]
186 <!-- Do not show publication-specific information on a metarecord search results page -->
187 [% IF attrs.publisher %]
188 <tr name="results_pub_tr">
190 <strong>[% l('Publisher:') %]</strong>
192 <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 %]>
202 [% alt.value | html %]
210 [% ELSIF attrs.producer %]
211 <tr name="results_pub_tr">
213 <strong>[% l('Producer:') %]</strong>
215 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
217 [% ELSIF attrs.distributor %]
218 <tr name="results_pub_tr">
220 <strong>[% l('Distributor:') %]</strong>
222 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
224 [% ELSIF attrs.manufacturer %]
225 <tr name="results_pub_tr">
227 <strong>[% l('Manufacturer:') %]</strong>
229 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
232 [% IF attrs.isbns.size > 0 %]
233 <tr name="results_isbn_tr">
235 <strong>[% l('ISBN:') %]</strong>
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;
254 <tr name="results_issn_tr">
256 <strong><a href="[% res.target_url %]">
257 [% res.public_name | html %]</a></strong>
259 <td>[% res.target_coverage | html %]
260 [%- IF res.target_embargo != '';
262 res.target_embargo | html;
271 [% IF attrs.edition %]
272 <tr name="results_edition_tr">
274 <strong>[% l('Edition:') %]</strong>
276 <td>[% attrs.edition | html %]
278 FOR entry IN attrs.graphic_editions;
279 FOR alt IN entry.graphic;
282 diratt = ' dir="' _ alt.dir _ '"';
285 <div class="graphic880"[% diratt %]>
286 [% alt.value | html %]
295 [% IF attrs.phys_desc %]
296 <tr name="results_phys_desc_tr">
297 <td nowrap="nowrap" valign="top">
298 <strong>[% l('Phys. Desc.:') %]</strong>
301 [% args.phys_desc | html %]
305 [% FOR uri IN args.uris %]
306 <tr name='bib_uri_list' class='result_table_title_cell'>
308 <strong>[% l('Electronic resource') %]</strong>
310 <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
314 [%- IF args.holdings.size > 0;
315 FOREACH copy IN args.holdings;
316 IF copy.part_label != '';
322 <tr name='bib_cn_list' class='result_table_title_cell'>
324 <table title="[% l('Record Holdings Details') %]"
325 class='result_holdings_table'>
327 <th>[% l('Library') %]</th>
328 <th>[% l('Shelving location') %]</th>
329 <th>[% l('Call number') %]</th>
330 [%- IF has_parts == 'true'; %]
331 <th>[% l('Part') %]</th>
333 <th>[% l('Status') %]</th>
336 [% FOR copy IN args.holdings %]
339 [%- copy_info = copy;
340 INCLUDE "opac/parts/library_name_link.tt2"; %]
342 <td>[% copy.location | html %]</td>
343 <td>[% copy.label | html %]</td>
344 [%- IF has_parts == 'true'; %]
345 <td>[% copy.part_label %]</td>
347 <td>[% copy.status | html %]</td>
354 [%- has_parts = 'false';
357 [% END %] <!-- END detail_record_view -->
360 IF ebook_api.enabled == 'true';
361 INCLUDE "opac/parts/ebook_api/avail.tt2";
364 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
365 [% IF rec.user_circulated %]
366 <div class="result_item_circulated">
367 <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt="[% l('Checked Out Before') %]"/>
368 <span>[% l('I have checked this item out before') %]</span>
373 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
374 <div class="result-bookbag-item-note">
375 [% note.note | html %]
380 <div class="result_table_utils_cont">
381 <div class="result_table_utils">
382 [%- search_ou = ctx.search_ou;
383 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
384 IF ctx.place_unfillable ||
385 ( num_holdable_copies > 0
386 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
389 <div class="results_aux_utils place_hold"><a
390 href="[% mkurl(ctx.opac_root _ '/place_hold',
391 {hold_target => rec.id, hold_type => hold_type,
392 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
393 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
394 class="no-dec" rel="nofollow" vocab=""><img
395 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
396 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
400 [%- IF ebook_api.enabled == 'true' && args.ebook %]
401 <div id="[%- rec.id -%]_ebook_checkout" class="results_aux_utils result_util ebook_action hidden">
402 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
403 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
404 ['query','tag','subfield','term','_special','sort','page']) %]"
405 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
406 class="no-dec" rel="nofollow" vocab=""><img
407 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
408 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
410 <div id="[%- rec.id -%]_ebook_place_hold" class="results_aux_utils result_util ebook_action hidden">
411 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
412 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
413 ['query','tag','subfield','term','_special','sort','page']) %]"
414 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
415 class="no-dec" rel="nofollow" vocab=""><img
416 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
417 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
421 <div class="results_aux_utils result_util">
422 [% IF !ctx.is_staff %]
424 INCLUDE "opac/parts/bookbag_actions.tt2";
427 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
428 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
429 title_label = (operation == "add") ?
430 l("Add [_1] to my list", attrs.title) :
431 l("Remove [_1] from my list", attrs.title);
432 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
433 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
435 <a href="[% href %]" class="no-dec"
436 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
437 <img src="[% ctx.media_prefix %]/images/clipboard.png[% ctx.cache_key %]" alt="" />
443 [% IF ENV.OILS_CONTENT_CAFE_USER %]
444 [% ident = attrs.isbn_clean || attrs.upc %]
445 <div class="results_aux_utils result_util">
447 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
448 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
449 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
450 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
451 <img src='[% ctx.media_prefix %]/images/starz.png[% ctx.cache_key %]' alt="[% l('Ratings Icon') %]"/>
452 <span class="results_reviews">[% l('Reviews & More') %]</span>
462 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
465 <td align='center'> <!-- Chilifresh reviews link -->
466 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
471 <td colspan='5'> <!-- Chilifresh reviews panel -->
472 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
481 <div class="result_footer_nav1">
482 [% ctx.results_count_header %]
485 resultBlock = document.getElementById('result_block');
486 resultButton = document.getElementById('return_to_hits');
487 facetSidebar = document.getElementById('facet_sidebar');
488 facetButton = document.getElementById('refine_hits');
489 function getFacety() {
490 resultBlock.setAttribute('class', 'result_block_hidden');
491 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
492 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
493 facetButton.setAttribute('class', 'result_block_hidden');
494 window.location.hash = 'return_to_hits';
496 function getResulty() {
497 resultBlock.setAttribute('class', 'result_block_visible');
498 resultButton.setAttribute('class', 'result_block_hidden');
499 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
500 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
501 window.location.hash = 'refine_hits';