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_path = ctx.opac_root _ '/results';
60 add_parms = {metarecord => rec.mmr_id};
63 # for MR, bre_id refers to the master and in
64 # this case, only, record
65 record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
66 add_parms = { badges => rec.badges.join(',') };
71 record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id;
72 add_parms = { badges => rec.badges.join(',') };
78 # Do not pass "advanced params" to result detail code.
79 # Instead, pass the scrubed query in one-line form
80 del_parms = del_parms.merge(['query', 'bool',
81 'qtype', 'contains', '_adv']);
83 {query => ctx.naive_query_scrub(ctx.user_query)} );
86 <tr class="result_table_row">
87 <td class="results_row_count" name="results_row_count">[%
88 result_count; result_count = result_count + 1
90 <td class='result_table_pic_header'>
91 <a href="[% mkurl(record_url_path, add_parms, del_parms); %]">
92 <img alt="[% l('Book cover') %]"
93 name='item_jacket' class='result_table_pic' width="55"
94 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
96 <td class='result_table_title_cell' name='result_table_title_cell'>
97 <div class="result_metadata">
99 <abbr class="unapi-id"
100 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
103 <abbr class="unapi-id"
104 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
107 <a class='record_title search_link' name='record_[% rec.id %]'
108 href="[% mkurl(record_url_path, add_parms, del_parms); %]"
109 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
110 [% attrs.title | html %]
112 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
113 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
114 ([% rec.mr_constituent_count %])
119 FOR entry IN attrs.graphic_titles;
120 FOR alt IN entry.graphic;
123 diratt = ' dir="' _ alt.dir _ '"';
126 <div class="graphic880"[% diratt %]>
127 [% alt.value | html %]
135 <a title="[% l("Perform an Author Search") %]"
136 class="record_author"
138 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
139 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
140 -%]" rel="nofollow" vocab="">[% attrs.author | html %]</a>
142 FOR entry IN attrs.graphic_authors;
143 FOR alt IN entry.graphic;
146 diratt = ' dir="' _ alt.dir _ '"';
149 <div class="graphic880"[% diratt %]>
150 [% alt.value | html %]
158 <div class='result_table_title_cell'>
159 [%- IF attrs.format_label; %]
160 [% FOR format IN attrs.all_formats %]
161 <img title="[% format.label | html %]"
162 alt="[% format.label | html %]"
163 src="[% format.icon %]" />
164 [% format.label | html %]
167 [%- UNLESS show_detail_view;
169 pubdate_clean = attrs.pubdate | html;
170 l(" ([_1])", pubdate_clean);
171 ELSIF attrs.copyright;
172 copyright_clean = attrs.copyright | html;
173 l(" ([_1])", copyright_clean);
178 [% IF rec.popularity > 0.0 %]
180 <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
185 title="[% l('Record Holdings Summary') %]"
186 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
187 [% UNLESS rec.mmr_id OR show_detail_view %]
188 [% IF args.holdings.size > 0 %]
189 <tr name='bib_cn_list' class='result_table_title_cell'>
191 <strong>[% l('Call number:') %]</strong>
193 <td>[% args.holdings.0.label | html %]</td>
198 [%- IF show_detail_view -%]
199 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
200 [% UNLESS rec.mmr_id %]
201 <!-- Do not show publication-specific information on a metarecord search results page -->
202 [% IF attrs.publisher %]
203 <tr name="results_pub_tr">
205 <strong>[% l('Publisher:') %]</strong>
207 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
209 FOR entry IN attrs.graphic_pubinfos;
210 FOR alt IN entry.graphic;
213 diratt = ' dir="' _ alt.dir _ '"';
216 <div class="graphic880"[% diratt %]>
217 [% alt.value | html %]
225 [% ELSIF attrs.producer %]
226 <tr name="results_pub_tr">
228 <strong>[% l('Producer:') %]</strong>
230 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
232 [% ELSIF attrs.distributor %]
233 <tr name="results_pub_tr">
235 <strong>[% l('Distributor:') %]</strong>
237 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
239 [% ELSIF attrs.manufacturer %]
240 <tr name="results_pub_tr">
242 <strong>[% l('Manufacturer:') %]</strong>
244 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
247 [% IF attrs.isbns.size > 0 %]
248 <tr name="results_isbn_tr">
250 <strong>[% l('ISBN:') %]</strong>
252 <td>[% attrs.isbns.0 | html %]</td>
255 [%- IF attrs.issns.size > 0 %]
256 <tr name="results_issn_tr">
258 <strong>[% l('ISSN:') %]</strong>
260 <td>[% attrs.issns.0 | html %]</td>
263 [%- IF openurl.enabled == 'true';
264 FOREACH issn IN args.issns;
266 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
267 FOREACH res IN res_urls;
269 <tr name="results_issn_tr">
271 <strong><a href="[% res.target_url %]">
272 [% res.public_name | html %]</a></strong>
274 <td>[% res.target_coverage | html %]
275 [%- IF res.target_embargo != '';
277 res.target_embargo | html;
286 [% IF attrs.edition %]
287 <tr name="results_edition_tr">
289 <strong>[% l('Edition:') %]</strong>
291 <td>[% attrs.edition | html %]
293 FOR entry IN attrs.graphic_editions;
294 FOR alt IN entry.graphic;
297 diratt = ' dir="' _ alt.dir _ '"';
300 <div class="graphic880"[% diratt %]>
301 [% alt.value | html %]
310 [% IF attrs.phys_desc %]
311 <tr name="results_phys_desc_tr">
312 <td nowrap="nowrap" valign="top">
313 <strong>[% l('Phys. Desc.:') %]</strong>
316 [% args.phys_desc | html %]
320 [% FOR uri IN args.uris %]
321 <tr name='bib_uri_list' class='result_table_title_cell'>
323 <strong>[% l('Electronic resource') %]</strong>
325 <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
329 [%- IF args.holdings.size > 0;
330 FOREACH copy IN args.holdings;
331 IF copy.part_label != '';
337 <tr name='bib_cn_list' class='result_table_title_cell'>
339 <table title="[% l('Record Holdings Details') %]"
340 class='result_holdings_table'>
342 <th>[% l('Library') %]</th>
343 <th>[% l('Shelving location') %]</th>
344 <th>[% l('Call number') %]</th>
345 [%- IF has_parts == 'true'; %]
346 <th>[% l('Part') %]</th>
348 <th>[% l('Status') %]</th>
351 [% FOR copy IN args.holdings %]
354 [%- copy_info = copy;
355 INCLUDE "opac/parts/library_name_link.tt2"; %]
357 <td>[% copy.location | html %]</td>
358 <td>[% copy.label | html %]</td>
359 [%- IF has_parts == 'true'; %]
360 <td>[% copy.part_label %]</td>
362 <td>[% copy.status | html %]</td>
369 [%- has_parts = 'false';
372 [% END %] <!-- END detail_record_view -->
375 IF ebook_api.enabled == 'true';
376 INCLUDE "opac/parts/ebook_api/avail.tt2";
379 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
380 [% IF rec.user_circulated %]
381 <div class="result_item_circulated">
382 <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt="[% l('Checked Out Before') %]"/>
383 <span>[% l('I have checked this item out before') %]</span>
388 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
389 <div class="result-bookbag-item-note">
390 [% note.note | html %]
395 <div class="result_table_utils_cont">
396 <div class="result_table_utils">
397 [%- search_ou = ctx.search_ou;
398 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
399 IF ctx.place_unfillable ||
400 ( num_holdable_copies > 0
401 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
405 [% del_parms = ['tag','subfield','term','_special',
407 add_parms = {hold_target => rec.id,
408 hold_type => hold_type,
409 hold_source_page => mkurl()};
412 # Do not pass "advanced params" to hold code
413 # Instead, pass the scrubed query in one-line form
414 del_parms = del_parms.merge(['query', 'bool',
415 'qtype', 'contains', '_adv']);
417 {query => ctx.naive_query_scrub(ctx.user_query)});
420 <div class="results_aux_utils place_hold"><a
421 href="[% mkurl(ctx.opac_root _ '/place_hold',
422 add_parms, del_parms) %]"
423 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
424 class="no-dec" rel="nofollow" vocab=""><img
425 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
426 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
430 [%- IF ebook_api.enabled == 'true' && args.ebook %]
431 <div id="[%- rec.id -%]_ebook_checkout" class="results_aux_utils result_util ebook_action hidden">
432 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
433 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
434 ['query','tag','subfield','term','_special','sort','page']) %]"
435 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
436 class="no-dec" rel="nofollow" vocab=""><img
437 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
438 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
440 <div id="[%- rec.id -%]_ebook_place_hold" class="results_aux_utils result_util ebook_action hidden">
441 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
442 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
443 ['query','tag','subfield','term','_special','sort','page']) %]"
444 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
445 class="no-dec" rel="nofollow" vocab=""><img
446 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
447 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
451 [% IF !ctx.is_meta %]
452 <div class="results_aux_utils result_util">
453 [% IF !ctx.is_staff %]
455 INCLUDE "opac/parts/bookbag_actions.tt2";
458 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
459 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
460 title_label = (operation == "add") ?
461 l("Add [_1] to my list", attrs.title) :
462 l("Remove [_1] from my list", attrs.title);
463 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
464 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
466 <a href="[% href %]" class="no-dec"
467 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
468 <img src="[% ctx.media_prefix %]/images/clipboard.png[% ctx.cache_key %]" alt="" />
475 [% IF ENV.OILS_CONTENT_CAFE_USER %]
476 [% ident = attrs.isbn_clean || attrs.upc %]
477 <div class="results_aux_utils result_util">
479 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
480 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
481 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
482 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
483 <img src='[% ctx.media_prefix %]/images/starz.png[% ctx.cache_key %]' alt="[% l('Ratings Icon') %]"/>
484 <span class="results_reviews">[% l('Reviews & More') %]</span>
494 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
497 <td align='center'> <!-- Chilifresh reviews link -->
498 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
503 <td colspan='5'> <!-- Chilifresh reviews panel -->
504 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
513 <div class="result_footer_nav1">
514 [% ctx.results_count_header %]
517 resultBlock = document.getElementById('result_block');
518 resultButton = document.getElementById('return_to_hits');
519 facetSidebar = document.getElementById('facet_sidebar');
520 facetButton = document.getElementById('refine_hits');
521 function getFacety() {
522 resultBlock.setAttribute('class', 'result_block_hidden');
523 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
524 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
525 facetButton.setAttribute('class', 'result_block_hidden');
526 window.location.hash = 'return_to_hits';
528 function getResulty() {
529 resultBlock.setAttribute('class', 'result_block_visible');
530 resultButton.setAttribute('class', 'result_block_hidden');
531 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
532 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
533 window.location.hash = 'refine_hits';