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 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
25 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
26 <h3 class="sr-only">[% l('Search Results facets') %]</h3>
27 [% INCLUDE 'opac/parts/result/facets.tt2' %]
28 <h3 class="sr-only">[% l('Search Results List') %]</h3>
30 <div id="result_block" class="result_block_visible">
31 <table id="result_table_table" title="[% l('Search Results') %]"
32 class="table_no_border_space table_no_cell_pad">
33 <thead class="sr-only">
35 <th>[% l('Search result number') %]</th>
36 <th>[% l('Book jacket cover art') %]</th>
37 <th>[% l('Item details and Actions') %]</th>
40 <tbody id="result_table">
41 [% FOR rec IN ctx.records;
42 attrs = {marc_xml => rec.marc_xml};
43 PROCESS get_marc_attrs args=attrs;
44 IF CGI.param('detail_record_view')
45 OR (show_more_details.default == 'true'
46 OR show_more_details.default == 'hide');
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);
63 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id);
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 CGI.param('detail_record_view')
148 OR (show_more_details.default == 'true'
149 OR show_more_details.default == 'hide');
151 pubdate_clean = attrs.pubdate | html;
152 l(" ([_1])", pubdate_clean);
153 ELSIF attrs.copyright;
154 copyright_clean = attrs.copyright | html;
155 l(" ([_1])", copyright_clean);
162 title="[% l('Record Holdings Summary') %]"
163 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
164 [% IF args.holdings.size > 0 %]
165 <tr name='bib_cn_list' class='result_table_title_cell'>
167 <strong>[% l('Call number:') %]</strong>
169 <td>[% args.holdings.0.label | html %]</td>
173 [%- IF CGI.param('detail_record_view')
174 OR (show_more_details.default == 'true'
175 OR show_more_details.default == 'hide');
177 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
179 [% IF attrs.publisher %]
180 <tr name="results_pub_tr">
182 <strong>[% l('Publisher:') %]</strong>
184 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
186 FOR entry IN attrs.graphic_pubinfos;
187 FOR alt IN entry.graphic;
190 diratt = ' dir="' _ alt.dir _ '"';
193 <div class="graphic880"[% diratt %]>
194 [% alt.value | html %]
202 [% ELSIF attrs.producer %]
203 <tr name="results_pub_tr">
205 <strong>[% l('Producer:') %]</strong>
207 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
209 [% ELSIF attrs.distributor %]
210 <tr name="results_pub_tr">
212 <strong>[% l('Distributor:') %]</strong>
214 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
216 [% ELSIF attrs.manufacturer %]
217 <tr name="results_pub_tr">
219 <strong>[% l('Manufacturer:') %]</strong>
221 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
224 [% IF attrs.isbns.size > 0 %]
225 <tr name="results_isbn_tr">
227 <strong>[% l('ISBN:') %]</strong>
229 <td>[% attrs.isbns.0 | html %]</td>
232 [%- IF attrs.issns.size > 0 %]
233 <tr name="results_issn_tr">
235 <strong>[% l('ISSN:') %]</strong>
237 <td>[% attrs.issns.0 | html %]</td>
240 [%- IF openurl.enabled == 'true';
241 FOREACH issn IN args.issns;
243 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
244 FOREACH res IN res_urls;
246 <tr name="results_issn_tr">
248 <strong><a href="[% res.target_url %]">
249 [% res.public_name | html %]</a></strong>
251 <td>[% res.target_coverage | html %]
252 [%- IF res.target_embargo != '';
254 res.target_embargo | html;
263 [% IF attrs.edition %]
264 <tr name="results_edition_tr">
266 <strong>[% l('Edition:') %]</strong>
268 <td>[% attrs.edition | html %]
270 FOR entry IN attrs.graphic_editions;
271 FOR alt IN entry.graphic;
274 diratt = ' dir="' _ alt.dir _ '"';
277 <div class="graphic880"[% diratt %]>
278 [% alt.value | html %]
287 [% IF attrs.phys_desc %]
288 <tr name="results_phys_desc_tr">
289 <td nowrap="nowrap" valign="top">
290 <strong>[% l('Phys. Desc.:') %]</strong>
293 [% args.phys_desc | html %]
297 [% FOR uri IN args.uris %]
298 <tr name='bib_uri_list' class='result_table_title_cell'>
300 <strong>[% l('Electronic resource') %]</strong>
302 <td><a href="[% uri.href %]">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
305 [%- IF args.holdings.size > 0;
306 FOREACH copy IN args.holdings;
307 IF copy.part_label != '';
313 <tr name='bib_cn_list' class='result_table_title_cell'>
315 <table title="[% l('Record Holdings Details') %]"
316 class='result_holdings_table'>
318 <th>[% l('Library') %]</th>
319 <th>[% l('Shelving location') %]</th>
320 <th>[% l('Call number') %]</th>
321 [%- IF has_parts == 'true'; %]
322 <th>[% l('Part') %]</th>
324 <th>[% l('Status') %]</th>
327 [% FOR copy IN args.holdings %]
330 [%- copy_info = copy;
331 INCLUDE "opac/parts/library_name_link.tt2"; %]
333 <td>[% copy.location | html %]</td>
334 <td>[% copy.label | html %]</td>
335 [%- IF has_parts == 'true'; %]
336 <td>[% copy.part_label %]</td>
338 <td>[% copy.status | html %]</td>
345 [%- has_parts = 'false';
348 [% END %] <!-- END detail_record_view -->
350 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
351 [% IF rec.user_circulated %]
352 <div class="result_item_circulated">
353 <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
354 <span>[% l('I have checked this item out before') %]</span>
359 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
360 <div class="result-bookbag-item-note">
361 [% note.note | html %]
366 <div class="result_table_utils_cont">
367 <div class="result_table_utils">
368 [%- search_ou = ctx.search_ou;
369 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
370 IF ctx.place_unfillable ||
371 ( num_holdable_copies > 0
372 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
375 <div class="results_aux_utils place_hold"><a
376 href="[% mkurl(ctx.opac_root _ '/place_hold',
377 {hold_target => rec.id, hold_type => hold_type,
378 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
379 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
380 class="no-dec" rel="nofollow" vocab=""><img
381 src="[% ctx.media_prefix %]/images/green_check.png"
382 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
385 <div class="results_aux_utils result_util">
387 INCLUDE "opac/parts/bookbag_actions.tt2";
390 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
391 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
392 title_label = (operation == "add") ?
393 l("Add [_1] to my list", attrs.title) :
394 l("Remove [_1] from my list", attrs.title);
395 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
396 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
398 <a href="[% href %]" class="no-dec"
399 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
400 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
405 [% IF ENV.OILS_CONTENT_CAFE_USER %]
406 [% ident = attrs.isbn_clean || attrs.upc %]
407 <div class="results_aux_utils result_util">
409 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
410 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
411 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
412 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
413 <img src='[% ctx.media_prefix %]/images/starz.png' alt="[% l('Ratings Icon') %]"/>
414 <span class="results_reviews">[% l('Reviews & More') %]</span>
424 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
427 <td align='center'> <!-- Chilifresh reviews link -->
428 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
433 <td colspan='5'> <!-- Chilifresh reviews panel -->
434 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
443 <div class="result_footer_nav1">
444 [% ctx.results_count_header %]
447 resultBlock = document.getElementById('result_block');
448 resultButton = document.getElementById('return_to_hits');
449 facetSidebar = document.getElementById('facet_sidebar');
450 facetButton = document.getElementById('refine_hits');
451 function getFacety() {
452 resultBlock.setAttribute('class', 'result_block_hidden');
453 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
454 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
455 facetButton.setAttribute('class', 'result_block_hidden');
456 window.location.hash = 'return_to_hits';
458 function getResulty() {
459 resultBlock.setAttribute('class', 'result_block_visible');
460 resultButton.setAttribute('class', 'result_block_hidden');
461 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
462 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
463 window.location.hash = 'refine_hits';