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;
11 # don't display a box for the search_format filter,
12 # as that's got its own widget
13 ignore_filters = ['search_format'];
16 FOR filter IN ctx.query_struct.filters;
18 IF ignore_filters.grep('^' _ fname _ '$').size;
21 trimmed_filters.push(filter);
24 ctx.query_struct.filters = trimmed_filters;
28 [% PROCESS "opac/parts/result/paginate.tt2" %]
29 [% ctx.results_count_header = PROCESS results_count_header;
30 ctx.results_count_header %]
32 <div id="result-bookbag-heading">
33 <div class="result-bookbag-name">[% ctx.bookbag.name | html %]</div>
34 <div class="result-bookbag-description">[% ctx.bookbag.description | html %]</div>
37 <div id="result_table_div">
38 <div class="facet_sidebar_hidden" id="facet_sidebar">
39 [%- IF ctx.is_staff %]
40 <h3 class="sr-only">[% l('Saved Searches') %]</h3>
41 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
43 [% IF ctx.query_struct.filters.size > 0 %]
44 [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
46 <h3 class="sr-only">[% l('Search Results filters') %]</h3>
47 <div class="facet_box_wrapper filter_box_wrapper">
48 <div class="filter_box_label">[% l('Filtered By') %]</div>
53 <h3 class="sr-only">[% l('Search Results facets') %]</h3>
54 [% INCLUDE 'opac/parts/result/facets.tt2' %]
55 <h3 class="sr-only">[% l('Search Results List') %]</h3>
57 <div id="result_block" class="result_block_visible">
58 <table id="result_table_table" title="[% l('Search Results') %]"
59 class="table_no_border_space table_no_cell_pad">
60 <thead class="sr-only">
62 <th>[% l('Search result number') %]</th>
63 <th>[% l('Book jacket cover art') %]</th>
64 <th>[% l('Item details and Actions') %]</th>
67 <tbody id="result_table">
68 [% FOR rec IN ctx.records;
70 attrs.marc_xml = rec.marc_xml;
71 attrs.mr_constituent_ids = [];
72 FOREACH mr_constituent_id IN rec.mr_constituent_ids;
73 attrs.mr_constituent_ids.push(mr_constituent_id);
75 PROCESS get_marc_attrs args=attrs;
77 attrs.title = attrs.title_extended;
79 # note: rec.id refers to the record identifier, regardless
80 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
82 IF rec.mr_constituent_count > 1;
83 # metarecords link to record list page
84 record_url = mkurl(ctx.opac_root _ '/results',
85 {metarecord => rec.mmr_id}, ['page']);
87 # for MR, bre_id refers to the master and in
88 # this case, only, record
89 record_url = mkurl(ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0, { badges => rec.badges.join(',') });
93 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') });
97 <tr class="result_table_row">
98 <td class="results_row_count" name="results_row_count">[%
99 result_count; result_count = result_count + 1
101 <td class='result_table_pic_header'>
102 <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
103 name='item_jacket' class='result_table_pic' width="55"
104 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
106 <td class='result_table_title_cell' name='result_table_title_cell'>
107 <div class="result_metadata">
109 <abbr class="unapi-id"
110 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
113 <abbr class="unapi-id"
114 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
117 <a class='record_title search_link' name='record_[% rec.id %]'
118 href="[% record_url %]"
119 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
120 [% attrs.title | html %]
122 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
123 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
124 ([% rec.mr_constituent_count %])
129 FOR entry IN attrs.graphic_titles;
130 FOR alt IN entry.graphic;
133 diratt = ' dir="' _ alt.dir _ '"';
136 <div class="graphic880"[% diratt %]>
137 [% alt.value | html %]
145 <a title="[% l("Perform an Author Search") %]"
146 class="record_author"
148 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
149 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
150 -%]" rel="nofollow" vocab="">[% attrs.author | html %]</a>
152 FOR entry IN attrs.graphic_authors;
153 FOR alt IN entry.graphic;
156 diratt = ' dir="' _ alt.dir _ '"';
159 <div class="graphic880"[% diratt %]>
160 [% alt.value | html %]
168 <div class='result_table_title_cell'>
169 [%- IF attrs.format_label; %]
170 [% FOR format IN attrs.all_formats %]
171 <img title="[% format.label | html %]"
172 alt="[% format.label | html %]"
173 src="[% format.icon %]" />
174 [% format.label | html %]
177 [%- UNLESS show_detail_view;
179 pubdate_clean = attrs.pubdate | html;
180 l(" ([_1])", pubdate_clean);
181 ELSIF attrs.copyright;
182 copyright_clean = attrs.copyright | html;
183 l(" ([_1])", copyright_clean);
188 [% IF rec.popularity > 0.0 %]
190 <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
195 title="[% l('Record Holdings Summary') %]"
196 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
197 [% UNLESS rec.mmr_id %]
198 [% IF args.holdings.size > 0 %]
199 <tr name='bib_cn_list' class='result_table_title_cell'>
201 <strong>[% l('Call number:') %]</strong>
203 <td>[% args.holdings.0.label | html %]</td>
208 [%- IF show_detail_view -%]
209 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
210 [% UNLESS rec.mmr_id %]
211 <!-- Do not show publication-specific information on a metarecord search results page -->
212 [% IF attrs.publisher %]
213 <tr name="results_pub_tr">
215 <strong>[% l('Publisher:') %]</strong>
217 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
219 FOR entry IN attrs.graphic_pubinfos;
220 FOR alt IN entry.graphic;
223 diratt = ' dir="' _ alt.dir _ '"';
226 <div class="graphic880"[% diratt %]>
227 [% alt.value | html %]
235 [% ELSIF attrs.producer %]
236 <tr name="results_pub_tr">
238 <strong>[% l('Producer:') %]</strong>
240 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
242 [% ELSIF attrs.distributor %]
243 <tr name="results_pub_tr">
245 <strong>[% l('Distributor:') %]</strong>
247 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
249 [% ELSIF attrs.manufacturer %]
250 <tr name="results_pub_tr">
252 <strong>[% l('Manufacturer:') %]</strong>
254 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
257 [% IF attrs.isbns.size > 0 %]
258 <tr name="results_isbn_tr">
260 <strong>[% l('ISBN:') %]</strong>
262 <td>[% attrs.isbns.0 | html %]</td>
265 [%- IF attrs.issns.size > 0 %]
266 <tr name="results_issn_tr">
268 <strong>[% l('ISSN:') %]</strong>
270 <td>[% attrs.issns.0 | html %]</td>
273 [%- IF openurl.enabled == 'true';
274 FOREACH issn IN args.issns;
276 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
277 FOREACH res IN res_urls;
279 <tr name="results_issn_tr">
281 <strong><a href="[% res.target_url %]">
282 [% res.public_name | html %]</a></strong>
284 <td>[% res.target_coverage | html %]
285 [%- IF res.target_embargo != '';
287 res.target_embargo | html;
296 [% IF attrs.edition %]
297 <tr name="results_edition_tr">
299 <strong>[% l('Edition:') %]</strong>
301 <td>[% attrs.edition | html %]
303 FOR entry IN attrs.graphic_editions;
304 FOR alt IN entry.graphic;
307 diratt = ' dir="' _ alt.dir _ '"';
310 <div class="graphic880"[% diratt %]>
311 [% alt.value | html %]
320 [% IF attrs.phys_desc %]
321 <tr name="results_phys_desc_tr">
322 <td nowrap="nowrap" valign="top">
323 <strong>[% l('Phys. Desc.:') %]</strong>
326 [% args.phys_desc | html %]
330 [% FOR uri IN args.uris %]
331 <tr name='bib_uri_list' class='result_table_title_cell'>
333 <strong>[% l('Electronic resource') %]</strong>
335 <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
339 [%- IF args.holdings.size > 0;
340 FOREACH copy IN args.holdings;
341 IF copy.part_label != '';
347 <tr name='bib_cn_list' class='result_table_title_cell'>
349 <table title="[% l('Record Holdings Details') %]"
350 class='result_holdings_table'>
352 <th>[% l('Library') %]</th>
353 <th>[% l('Shelving location') %]</th>
354 <th>[% l('Call number') %]</th>
355 [%- IF has_parts == 'true'; %]
356 <th>[% l('Part') %]</th>
358 <th>[% l('Status') %]</th>
361 [% FOR copy IN args.holdings %]
364 [%- copy_info = copy;
365 INCLUDE "opac/parts/library_name_link.tt2"; %]
367 <td>[% copy.location | html %]</td>
368 <td>[% copy.label | html %]</td>
369 [%- IF has_parts == 'true'; %]
370 <td>[% copy.part_label %]</td>
372 <td>[% copy.status | html %]</td>
379 [%- has_parts = 'false';
382 [% END %] <!-- END detail_record_view -->
385 IF ebook_api.enabled == 'true';
386 INCLUDE "opac/parts/ebook_api/avail.tt2";
389 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
390 [% IF rec.user_circulated %]
391 <div class="result_item_circulated">
392 <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
393 <span>[% l('I have checked this item out before') %]</span>
398 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
399 <div class="result-bookbag-item-note">
400 [% note.note | html %]
405 <div class="result_table_utils_cont">
406 <div class="result_table_utils">
407 [%- search_ou = ctx.search_ou;
408 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
409 IF ctx.place_unfillable ||
410 ( num_holdable_copies > 0
411 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
414 <div class="results_aux_utils place_hold"><a
415 href="[% mkurl(ctx.opac_root _ '/place_hold',
416 {hold_target => rec.id, hold_type => hold_type,
417 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
418 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
419 class="no-dec" rel="nofollow" vocab=""><img
420 src="[% ctx.media_prefix %]/images/green_check.png"
421 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
424 <div class="results_aux_utils result_util">
425 [% IF !ctx.is_staff %]
427 INCLUDE "opac/parts/bookbag_actions.tt2";
430 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
431 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
432 title_label = (operation == "add") ?
433 l("Add [_1] to my list", attrs.title) :
434 l("Remove [_1] from my list", attrs.title);
435 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
436 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
438 <a href="[% href %]" class="no-dec"
439 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
440 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
446 [% IF ENV.OILS_CONTENT_CAFE_USER %]
447 [% ident = attrs.isbn_clean || attrs.upc %]
448 <div class="results_aux_utils result_util">
450 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
451 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
452 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
453 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
454 <img src='[% ctx.media_prefix %]/images/starz.png' alt="[% l('Ratings Icon') %]"/>
455 <span class="results_reviews">[% l('Reviews & More') %]</span>
465 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
468 <td align='center'> <!-- Chilifresh reviews link -->
469 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
474 <td colspan='5'> <!-- Chilifresh reviews panel -->
475 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
484 <div class="result_footer_nav1">
485 [% ctx.results_count_header %]
488 resultBlock = document.getElementById('result_block');
489 resultButton = document.getElementById('return_to_hits');
490 facetSidebar = document.getElementById('facet_sidebar');
491 facetButton = document.getElementById('refine_hits');
492 function getFacety() {
493 resultBlock.setAttribute('class', 'result_block_hidden');
494 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
495 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
496 facetButton.setAttribute('class', 'result_block_hidden');
497 window.location.hash = 'return_to_hits';
499 function getResulty() {
500 resultBlock.setAttribute('class', 'result_block_visible');
501 resultButton.setAttribute('class', 'result_block_hidden');
502 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
503 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
504 window.location.hash = 'refine_hits';