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);
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 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);
160 title="[% l('Record Holdings Summary') %]"
161 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
162 [% UNLESS rec.mmr_id %]
163 [% IF args.holdings.size > 0 %]
164 <tr name='bib_cn_list' class='result_table_title_cell'>
166 <strong>[% l('Call number:') %]</strong>
168 <td>[% args.holdings.0.label | html %]</td>
173 [%- IF show_detail_view -%]
174 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
175 [% UNLESS rec.mmr_id %]
176 <!-- Do not show publication-specific information on a metarecord search results page -->
177 [% IF attrs.publisher %]
178 <tr name="results_pub_tr">
180 <strong>[% l('Publisher:') %]</strong>
182 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
184 FOR entry IN attrs.graphic_pubinfos;
185 FOR alt IN entry.graphic;
188 diratt = ' dir="' _ alt.dir _ '"';
191 <div class="graphic880"[% diratt %]>
192 [% alt.value | html %]
200 [% ELSIF attrs.producer %]
201 <tr name="results_pub_tr">
203 <strong>[% l('Producer:') %]</strong>
205 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
207 [% ELSIF attrs.distributor %]
208 <tr name="results_pub_tr">
210 <strong>[% l('Distributor:') %]</strong>
212 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
214 [% ELSIF attrs.manufacturer %]
215 <tr name="results_pub_tr">
217 <strong>[% l('Manufacturer:') %]</strong>
219 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
222 [% IF attrs.isbns.size > 0 %]
223 <tr name="results_isbn_tr">
225 <strong>[% l('ISBN:') %]</strong>
227 <td>[% attrs.isbns.0 | html %]</td>
230 [%- IF attrs.issns.size > 0 %]
231 <tr name="results_issn_tr">
233 <strong>[% l('ISSN:') %]</strong>
235 <td>[% attrs.issns.0 | html %]</td>
238 [%- IF openurl.enabled == 'true';
239 FOREACH issn IN args.issns;
241 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
242 FOREACH res IN res_urls;
244 <tr name="results_issn_tr">
246 <strong><a href="[% res.target_url %]">
247 [% res.public_name | html %]</a></strong>
249 <td>[% res.target_coverage | html %]
250 [%- IF res.target_embargo != '';
252 res.target_embargo | html;
261 [% IF attrs.edition %]
262 <tr name="results_edition_tr">
264 <strong>[% l('Edition:') %]</strong>
266 <td>[% attrs.edition | html %]
268 FOR entry IN attrs.graphic_editions;
269 FOR alt IN entry.graphic;
272 diratt = ' dir="' _ alt.dir _ '"';
275 <div class="graphic880"[% diratt %]>
276 [% alt.value | html %]
285 [% IF attrs.phys_desc %]
286 <tr name="results_phys_desc_tr">
287 <td nowrap="nowrap" valign="top">
288 <strong>[% l('Phys. Desc.:') %]</strong>
291 [% args.phys_desc | html %]
295 [% FOR uri IN args.uris %]
296 <tr name='bib_uri_list' class='result_table_title_cell'>
298 <strong>[% l('Electronic resource') %]</strong>
300 <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
304 [%- IF args.holdings.size > 0;
305 FOREACH copy IN args.holdings;
306 IF copy.part_label != '';
312 <tr name='bib_cn_list' class='result_table_title_cell'>
314 <table title="[% l('Record Holdings Details') %]"
315 class='result_holdings_table'>
317 <th>[% l('Library') %]</th>
318 <th>[% l('Shelving location') %]</th>
319 <th>[% l('Call number') %]</th>
320 [%- IF has_parts == 'true'; %]
321 <th>[% l('Part') %]</th>
323 <th>[% l('Status') %]</th>
326 [% FOR copy IN args.holdings %]
329 [%- copy_info = copy;
330 INCLUDE "opac/parts/library_name_link.tt2"; %]
332 <td>[% copy.location | html %]</td>
333 <td>[% copy.label | html %]</td>
334 [%- IF has_parts == 'true'; %]
335 <td>[% copy.part_label %]</td>
337 <td>[% copy.status | html %]</td>
344 [%- has_parts = 'false';
347 [% END %] <!-- END detail_record_view -->
349 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
350 [% IF rec.user_circulated %]
351 <div class="result_item_circulated">
352 <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
353 <span>[% l('I have checked this item out before') %]</span>
358 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
359 <div class="result-bookbag-item-note">
360 [% note.note | html %]
365 <div class="result_table_utils_cont">
366 <div class="result_table_utils">
367 [%- search_ou = ctx.search_ou;
368 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
369 IF ctx.place_unfillable ||
370 ( num_holdable_copies > 0
371 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
374 <div class="results_aux_utils place_hold"><a
375 href="[% mkurl(ctx.opac_root _ '/place_hold',
376 {hold_target => rec.id, hold_type => hold_type,
377 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
378 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
379 class="no-dec" rel="nofollow" vocab=""><img
380 src="[% ctx.media_prefix %]/images/green_check.png"
381 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
384 <div class="results_aux_utils result_util">
386 INCLUDE "opac/parts/bookbag_actions.tt2";
389 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
390 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
391 title_label = (operation == "add") ?
392 l("Add [_1] to my list", attrs.title) :
393 l("Remove [_1] from my list", attrs.title);
394 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
395 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
397 <a href="[% href %]" class="no-dec"
398 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
399 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
404 [% IF ENV.OILS_CONTENT_CAFE_USER %]
405 [% ident = attrs.isbn_clean || attrs.upc %]
406 <div class="results_aux_utils result_util">
408 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
409 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
410 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
411 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
412 <img src='[% ctx.media_prefix %]/images/starz.png' alt="[% l('Ratings Icon') %]"/>
413 <span class="results_reviews">[% l('Reviews & More') %]</span>
423 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
426 <td align='center'> <!-- Chilifresh reviews link -->
427 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
432 <td colspan='5'> <!-- Chilifresh reviews panel -->
433 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
442 <div class="result_footer_nav1">
443 [% ctx.results_count_header %]
446 resultBlock = document.getElementById('result_block');
447 resultButton = document.getElementById('return_to_hits');
448 facetSidebar = document.getElementById('facet_sidebar');
449 facetButton = document.getElementById('refine_hits');
450 function getFacety() {
451 resultBlock.setAttribute('class', 'result_block_hidden');
452 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
453 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
454 facetButton.setAttribute('class', 'result_block_hidden');
455 window.location.hash = 'return_to_hits';
457 function getResulty() {
458 resultBlock.setAttribute('class', 'result_block_visible');
459 resultButton.setAttribute('class', 'result_block_hidden');
460 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
461 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
462 window.location.hash = 'refine_hits';