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;
44 attrs = {marc_xml => rec.marc_xml};
45 PROCESS get_marc_attrs args=attrs;
47 attrs.title = attrs.title_extended;
49 # note: rec.id refers to the record identifier, regardless
50 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
52 IF rec.mr_constituent_count > 1;
53 # metarecords link to record list page
54 record_url = mkurl(ctx.opac_root _ '/results',
55 {metarecord => rec.mmr_id}, ['page']);
57 # for MR, bre_id refers to the master and in
58 # this case, only, record
59 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') });
63 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') });
67 <tr class="result_table_row">
68 <td class="results_row_count" name="results_row_count">[%
69 result_count; result_count = result_count + 1
71 <td class='result_table_pic_header'>
72 <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
73 name='item_jacket' class='result_table_pic' width="55"
74 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
76 <td class='result_table_title_cell' name='result_table_title_cell'>
77 <div class="result_metadata">
79 <abbr class="unapi-id"
80 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
83 <abbr class="unapi-id"
84 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
87 <a class='record_title search_link' name='record_[% rec.id %]'
88 href="[% record_url %]"
89 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
90 [% attrs.title | html %]
92 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
93 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
94 ([% rec.mr_constituent_count %])
99 FOR entry IN attrs.graphic_titles;
100 FOR alt IN entry.graphic;
103 diratt = ' dir="' _ alt.dir _ '"';
106 <div class="graphic880"[% diratt %]>
107 [% alt.value | html %]
115 <a title="[% l("Perform an Author Search") %]"
116 class="record_author"
118 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
119 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
120 -%]" rel="nofollow" vocab="">[% attrs.author | html %]</a>
122 FOR entry IN attrs.graphic_authors;
123 FOR alt IN entry.graphic;
126 diratt = ' dir="' _ alt.dir _ '"';
129 <div class="graphic880"[% diratt %]>
130 [% alt.value | html %]
138 <div class='result_table_title_cell'>
139 [%- IF attrs.format_label; %]
140 [% FOR format IN attrs.all_formats %]
141 <img title="[% format.label | html %]"
142 alt="[% format.label | html %]"
143 src="[% format.icon %]" />
144 [% format.label | html %]
147 [%- UNLESS show_detail_view;
149 pubdate_clean = attrs.pubdate | html;
150 l(" ([_1])", pubdate_clean);
151 ELSIF attrs.copyright;
152 copyright_clean = attrs.copyright | html;
153 l(" ([_1])", copyright_clean);
158 [% IF rec.popularity > 0.0 %]
160 <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
165 title="[% l('Record Holdings Summary') %]"
166 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
167 [% UNLESS rec.mmr_id %]
168 [% IF args.holdings.size > 0 %]
169 <tr name='bib_cn_list' class='result_table_title_cell'>
171 <strong>[% l('Call number:') %]</strong>
173 <td>[% args.holdings.0.label | html %]</td>
178 [%- IF show_detail_view -%]
179 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
180 [% UNLESS rec.mmr_id %]
181 <!-- Do not show publication-specific information on a metarecord search results page -->
182 [% IF attrs.publisher %]
183 <tr name="results_pub_tr">
185 <strong>[% l('Publisher:') %]</strong>
187 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
189 FOR entry IN attrs.graphic_pubinfos;
190 FOR alt IN entry.graphic;
193 diratt = ' dir="' _ alt.dir _ '"';
196 <div class="graphic880"[% diratt %]>
197 [% alt.value | html %]
205 [% ELSIF attrs.producer %]
206 <tr name="results_pub_tr">
208 <strong>[% l('Producer:') %]</strong>
210 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
212 [% ELSIF attrs.distributor %]
213 <tr name="results_pub_tr">
215 <strong>[% l('Distributor:') %]</strong>
217 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
219 [% ELSIF attrs.manufacturer %]
220 <tr name="results_pub_tr">
222 <strong>[% l('Manufacturer:') %]</strong>
224 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
227 [% IF attrs.isbns.size > 0 %]
228 <tr name="results_isbn_tr">
230 <strong>[% l('ISBN:') %]</strong>
232 <td>[% attrs.isbns.0 | html %]</td>
235 [%- IF attrs.issns.size > 0 %]
236 <tr name="results_issn_tr">
238 <strong>[% l('ISSN:') %]</strong>
240 <td>[% attrs.issns.0 | html %]</td>
243 [%- IF openurl.enabled == 'true';
244 FOREACH issn IN args.issns;
246 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
247 FOREACH res IN res_urls;
249 <tr name="results_issn_tr">
251 <strong><a href="[% res.target_url %]">
252 [% res.public_name | html %]</a></strong>
254 <td>[% res.target_coverage | html %]
255 [%- IF res.target_embargo != '';
257 res.target_embargo | html;
266 [% IF attrs.edition %]
267 <tr name="results_edition_tr">
269 <strong>[% l('Edition:') %]</strong>
271 <td>[% attrs.edition | html %]
273 FOR entry IN attrs.graphic_editions;
274 FOR alt IN entry.graphic;
277 diratt = ' dir="' _ alt.dir _ '"';
280 <div class="graphic880"[% diratt %]>
281 [% alt.value | html %]
290 [% IF attrs.phys_desc %]
291 <tr name="results_phys_desc_tr">
292 <td nowrap="nowrap" valign="top">
293 <strong>[% l('Phys. Desc.:') %]</strong>
296 [% args.phys_desc | html %]
300 [% FOR uri IN args.uris %]
301 <tr name='bib_uri_list' class='result_table_title_cell'>
303 <strong>[% l('Electronic resource') %]</strong>
305 <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
309 [%- IF args.holdings.size > 0;
310 FOREACH copy IN args.holdings;
311 IF copy.part_label != '';
317 <tr name='bib_cn_list' class='result_table_title_cell'>
319 <table title="[% l('Record Holdings Details') %]"
320 class='result_holdings_table'>
322 <th>[% l('Library') %]</th>
323 <th>[% l('Shelving location') %]</th>
324 <th>[% l('Call number') %]</th>
325 [%- IF has_parts == 'true'; %]
326 <th>[% l('Part') %]</th>
328 <th>[% l('Status') %]</th>
331 [% FOR copy IN args.holdings %]
334 [%- copy_info = copy;
335 INCLUDE "opac/parts/library_name_link.tt2"; %]
337 <td>[% copy.location | html %]</td>
338 <td>[% copy.label | html %]</td>
339 [%- IF has_parts == 'true'; %]
340 <td>[% copy.part_label %]</td>
342 <td>[% copy.status | html %]</td>
349 [%- has_parts = 'false';
352 [% END %] <!-- END detail_record_view -->
354 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
355 [% IF rec.user_circulated %]
356 <div class="result_item_circulated">
357 <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
358 <span>[% l('I have checked this item out before') %]</span>
363 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
364 <div class="result-bookbag-item-note">
365 [% note.note | html %]
370 <div class="result_table_utils_cont">
371 <div class="result_table_utils">
372 [%- search_ou = ctx.search_ou;
373 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
374 IF ctx.place_unfillable ||
375 ( num_holdable_copies > 0
376 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
379 <div class="results_aux_utils place_hold"><a
380 href="[% mkurl(ctx.opac_root _ '/place_hold',
381 {hold_target => rec.id, hold_type => hold_type,
382 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
383 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
384 class="no-dec" rel="nofollow" vocab=""><img
385 src="[% ctx.media_prefix %]/images/green_check.png"
386 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
389 <div class="results_aux_utils result_util">
391 INCLUDE "opac/parts/bookbag_actions.tt2";
394 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
395 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
396 title_label = (operation == "add") ?
397 l("Add [_1] to my list", attrs.title) :
398 l("Remove [_1] from my list", attrs.title);
399 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
400 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
402 <a href="[% href %]" class="no-dec"
403 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
404 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
409 [% IF ENV.OILS_CONTENT_CAFE_USER %]
410 [% ident = attrs.isbn_clean || attrs.upc %]
411 <div class="results_aux_utils result_util">
413 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
414 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
415 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
416 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
417 <img src='[% ctx.media_prefix %]/images/starz.png' alt="[% l('Ratings Icon') %]"/>
418 <span class="results_reviews">[% l('Reviews & More') %]</span>
428 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
431 <td align='center'> <!-- Chilifresh reviews link -->
432 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
437 <td colspan='5'> <!-- Chilifresh reviews panel -->
438 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
447 <div class="result_footer_nav1">
448 [% ctx.results_count_header %]
451 resultBlock = document.getElementById('result_block');
452 resultButton = document.getElementById('return_to_hits');
453 facetSidebar = document.getElementById('facet_sidebar');
454 facetButton = document.getElementById('refine_hits');
455 function getFacety() {
456 resultBlock.setAttribute('class', 'result_block_hidden');
457 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
458 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
459 facetButton.setAttribute('class', 'result_block_hidden');
460 window.location.hash = 'return_to_hits';
462 function getResulty() {
463 resultBlock.setAttribute('class', 'result_block_visible');
464 resultButton.setAttribute('class', 'result_block_hidden');
465 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
466 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
467 window.location.hash = 'refine_hits';