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;
46 IF CGI.param('detail_record_view')
47 OR (show_more_details.default == 'true'
48 OR show_more_details.default == 'hide');
49 attrs.title = attrs.title_extended;
51 # note: rec.id refers to the record identifier, regardless
52 # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
54 IF rec.mr_constituent_count > 1;
55 # metarecords link to record list page
56 record_url = mkurl(ctx.opac_root _ '/results',
57 {metarecord => rec.mmr_id}, ['page']);
59 # for MR, bre_id refers to the master and in
60 # this case, only, record
61 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id);
65 record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id);
69 <tr class="result_table_row">
70 <td class="results_row_count" name="results_row_count">[%
71 result_count; result_count = result_count + 1
73 <td class='result_table_pic_header'>
74 <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
75 name='item_jacket' class='result_table_pic' width="55"
76 src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
78 <td class='result_table_title_cell' name='result_table_title_cell'>
79 <div class="result_metadata">
81 <abbr class="unapi-id"
82 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
85 <abbr class="unapi-id"
86 title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
89 <a class='record_title search_link' name='record_[% rec.id %]'
90 href="[% record_url %]"
91 [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
92 [% attrs.title | html %]
94 [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
95 <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
96 ([% rec.mr_constituent_count %])
101 FOR entry IN attrs.graphic_titles;
102 FOR alt IN entry.graphic;
105 diratt = ' dir="' _ alt.dir _ '"';
108 <div class="graphic880"[% diratt %]>
109 [% alt.value | html %]
117 <a title="[% l("Perform an Author Search") %]"
118 class="record_author"
120 authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
121 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
122 -%]" rel="nofollow" vocab="">[% attrs.author | html %]</a>
124 FOR entry IN attrs.graphic_authors;
125 FOR alt IN entry.graphic;
128 diratt = ' dir="' _ alt.dir _ '"';
131 <div class="graphic880"[% diratt %]>
132 [% alt.value | html %]
140 <div class='result_table_title_cell'>
141 [%- IF attrs.format_label; %]
142 [% FOR format IN attrs.all_formats %]
143 <img title="[% format.label | html %]"
144 alt="[% format.label | html %]"
145 src="[% format.icon %]" />
146 [% format.label | html %]
149 [%- UNLESS CGI.param('detail_record_view')
150 OR (show_more_details.default == 'true'
151 OR show_more_details.default == 'hide');
153 pubdate_clean = attrs.pubdate | html;
154 l(" ([_1])", pubdate_clean);
155 ELSIF attrs.copyright;
156 copyright_clean = attrs.copyright | html;
157 l(" ([_1])", copyright_clean);
164 title="[% l('Record Holdings Summary') %]"
165 class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
166 [% UNLESS rec.mmr_id %]
167 [% IF args.holdings.size > 0 %]
168 <tr name='bib_cn_list' class='result_table_title_cell'>
170 <strong>[% l('Call number:') %]</strong>
172 <td>[% args.holdings.0.label | html %]</td>
177 [%- IF CGI.param('detail_record_view')
178 OR (show_more_details.default == 'true'
179 OR show_more_details.default == 'hide');
181 <!-- These fields are visible when viewing the results page in 'detailed' mode -->
182 [% UNLESS rec.mmr_id %]
183 <!-- Do not show publication-specific information on a metarecord search results page -->
184 [% IF attrs.publisher %]
185 <tr name="results_pub_tr">
187 <strong>[% l('Publisher:') %]</strong>
189 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
191 FOR entry IN attrs.graphic_pubinfos;
192 FOR alt IN entry.graphic;
195 diratt = ' dir="' _ alt.dir _ '"';
198 <div class="graphic880"[% diratt %]>
199 [% alt.value | html %]
207 [% ELSIF attrs.producer %]
208 <tr name="results_pub_tr">
210 <strong>[% l('Producer:') %]</strong>
212 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
214 [% ELSIF attrs.distributor %]
215 <tr name="results_pub_tr">
217 <strong>[% l('Distributor:') %]</strong>
219 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
221 [% ELSIF attrs.manufacturer %]
222 <tr name="results_pub_tr">
224 <strong>[% l('Manufacturer:') %]</strong>
226 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
229 [% IF attrs.isbns.size > 0 %]
230 <tr name="results_isbn_tr">
232 <strong>[% l('ISBN:') %]</strong>
234 <td>[% attrs.isbns.0 | html %]</td>
237 [%- IF attrs.issns.size > 0 %]
238 <tr name="results_issn_tr">
240 <strong>[% l('ISSN:') %]</strong>
242 <td>[% attrs.issns.0 | html %]</td>
245 [%- IF openurl.enabled == 'true';
246 FOREACH issn IN args.issns;
248 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
249 FOREACH res IN res_urls;
251 <tr name="results_issn_tr">
253 <strong><a href="[% res.target_url %]">
254 [% res.public_name | html %]</a></strong>
256 <td>[% res.target_coverage | html %]
257 [%- IF res.target_embargo != '';
259 res.target_embargo | html;
268 [% IF attrs.edition %]
269 <tr name="results_edition_tr">
271 <strong>[% l('Edition:') %]</strong>
273 <td>[% attrs.edition | html %]
275 FOR entry IN attrs.graphic_editions;
276 FOR alt IN entry.graphic;
279 diratt = ' dir="' _ alt.dir _ '"';
282 <div class="graphic880"[% diratt %]>
283 [% alt.value | html %]
292 [% IF attrs.phys_desc %]
293 <tr name="results_phys_desc_tr">
294 <td nowrap="nowrap" valign="top">
295 <strong>[% l('Phys. Desc.:') %]</strong>
298 [% args.phys_desc | html %]
302 [% FOR uri IN args.uris %]
303 <tr name='bib_uri_list' class='result_table_title_cell'>
305 <strong>[% l('Electronic resource') %]</strong>
307 <td><a href="[% uri.href %]" class="uri_link">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
311 [%- IF args.holdings.size > 0;
312 FOREACH copy IN args.holdings;
313 IF copy.part_label != '';
319 <tr name='bib_cn_list' class='result_table_title_cell'>
321 <table title="[% l('Record Holdings Details') %]"
322 class='result_holdings_table'>
324 <th>[% l('Library') %]</th>
325 <th>[% l('Shelving location') %]</th>
326 <th>[% l('Call number') %]</th>
327 [%- IF has_parts == 'true'; %]
328 <th>[% l('Part') %]</th>
330 <th>[% l('Status') %]</th>
333 [% FOR copy IN args.holdings %]
336 [%- copy_info = copy;
337 INCLUDE "opac/parts/library_name_link.tt2"; %]
339 <td>[% copy.location | html %]</td>
340 <td>[% copy.label | html %]</td>
341 [%- IF has_parts == 'true'; %]
342 <td>[% copy.part_label %]</td>
344 <td>[% copy.status | html %]</td>
351 [%- has_parts = 'false';
354 [% END %] <!-- END detail_record_view -->
356 [% PROCESS "opac/parts/result/copy_counts.tt2" %]
357 [% IF rec.user_circulated %]
358 <div class="result_item_circulated">
359 <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
360 <span>[% l('I have checked this item out before') %]</span>
365 FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
366 <div class="result-bookbag-item-note">
367 [% note.note | html %]
372 <div class="result_table_utils_cont">
373 <div class="result_table_utils">
374 [%- search_ou = ctx.search_ou;
375 num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
376 IF ctx.place_unfillable ||
377 ( num_holdable_copies > 0
378 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
381 <div class="results_aux_utils place_hold"><a
382 href="[% mkurl(ctx.opac_root _ '/place_hold',
383 {hold_target => rec.id, hold_type => hold_type,
384 hold_source_page => mkurl()}, ['query','tag','subfield','term','_special','sort','page']) %]"
385 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
386 class="no-dec" rel="nofollow" vocab=""><img
387 src="[% ctx.media_prefix %]/images/green_check.png"
388 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
391 <div class="results_aux_utils result_util">
393 INCLUDE "opac/parts/bookbag_actions.tt2";
396 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
397 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
398 title_label = (operation == "add") ?
399 l("Add [_1] to my list", attrs.title) :
400 l("Remove [_1] from my list", attrs.title);
401 href = mkurl(ctx.opac_root _ '/mylist/' _ operation,
402 {record => rec.id, anchor => 'record_' _ rec.id}, 1);
404 <a href="[% href %]" class="no-dec"
405 [% html_text_attr('title', title_label) %] rel="nofollow" vocab="">
406 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
411 [% IF ENV.OILS_CONTENT_CAFE_USER %]
412 [% ident = attrs.isbn_clean || attrs.upc %]
413 <div class="results_aux_utils result_util">
415 [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
416 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%-
417 ENV.OILS_CONTENT_CAFE_USER %]&Password=[%-
418 ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" rel="nofollow" vocab="">
419 <img src='[% ctx.media_prefix %]/images/starz.png' alt="[% l('Ratings Icon') %]"/>
420 <span class="results_reviews">[% l('Reviews & More') %]</span>
430 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
433 <td align='center'> <!-- Chilifresh reviews link -->
434 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
439 <td colspan='5'> <!-- Chilifresh reviews panel -->
440 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
449 <div class="result_footer_nav1">
450 [% ctx.results_count_header %]
453 resultBlock = document.getElementById('result_block');
454 resultButton = document.getElementById('return_to_hits');
455 facetSidebar = document.getElementById('facet_sidebar');
456 facetButton = document.getElementById('refine_hits');
457 function getFacety() {
458 resultBlock.setAttribute('class', 'result_block_hidden');
459 resultButton.setAttribute('class', 'results_header_btns result_block_visible');
460 facetSidebar.setAttribute('class', 'facet_sidebar_visible');
461 facetButton.setAttribute('class', 'result_block_hidden');
462 window.location.hash = 'return_to_hits';
464 function getResulty() {
465 resultBlock.setAttribute('class', 'result_block_visible');
466 resultButton.setAttribute('class', 'result_block_hidden');
467 facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
468 facetButton.setAttribute('class', 'results_header_btns result_block_visible');
469 window.location.hash = 'refine_hits';