[% PROCESS "opac/parts/misc_util.tt2"; USE ResolverResolver; ctx.result_start = 1 + ctx.page_size * page; ctx.result_stop = ctx.page_size * (page + 1); IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END; result_count = ctx.result_start; # don't display a box for the search_format filter, # as that's got its own widget ignore_filters = ['search_format']; trimmed_filters = []; FOR filter IN ctx.query_struct.filters; fname = filter.name; IF ignore_filters.grep('^' _ fname _ '$').size; NEXT; END; trimmed_filters.push(filter); END; ctx.query_struct.filters = trimmed_filters; %] [% PROCESS "opac/parts/result/paginate.tt2" %] [% ctx.results_count_header = PROCESS results_count_header; ctx.results_count_header %] [% IF ctx.bookbag %]
[% ctx.bookbag.name | html %]
[% ctx.bookbag.description | html %]
[% END %]
[%- IF ctx.is_staff %]

[% l('Saved Searches') %]

[% INCLUDE "opac/parts/staff_saved_searches.tt2" %] [%- END %] [% IF ctx.query_struct.filters.size > 0 %] [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %] [% IF stuff %]

[% l('Search Results filters') %]

[% l('Filtered By') %]
[% stuff %]
[% END %] [% END %]

[% l('Search Results facets') %]

[% INCLUDE 'opac/parts/result/facets.tt2' %]

[% l('Search Results List') %]

[% FOR rec IN ctx.records; attrs = {}; attrs.marc_xml = rec.marc_xml; attrs.mr_constituent_ids = []; FOREACH mr_constituent_id IN rec.mr_constituent_ids; attrs.mr_constituent_ids.push(mr_constituent_id); END; PROCESS get_marc_attrs args=attrs; IF show_detail_view; attrs.title = attrs.title_extended; END; # note: rec.id refers to the record identifier, regardless # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id IF rec.mmr_id; IF rec.mr_constituent_count > 1; # metarecords link to record list page record_url = mkurl(ctx.opac_root _ '/results', {metarecord => rec.mmr_id}, ['page']); ELSE; # for MR, bre_id refers to the master and in # this case, only, record record_url = mkurl(ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0, { badges => rec.badges.join(',') }); END; hold_type = 'M'; ELSE; record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') }); hold_type = 'T'; END; -%] [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %] [%- END %] [% END %]
[% l('Search result number') %] [% l('Book jacket cover art') %] [% l('Item details and Actions') %]
[% result_count; result_count = result_count + 1 %]. [% l('Book cover') %]
[%- search_ou = ctx.search_ou; num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0; IF ctx.place_unfillable || ( num_holdable_copies > 0 && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0) ) %] [%- END -%]
[% IF ctx.user; INCLUDE "opac/parts/bookbag_actions.tt2"; %] [% ELSE; operation = ctx.mylist.grep(rec.id).size ? "delete" : "add"; label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); title_label = (operation == "add") ? l("Add [_1] to my list", attrs.title) : l("Remove [_1] from my list", attrs.title); href = mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => rec.id, anchor => 'record_' _ rec.id}, 1); %] [% label %] [% END %]
[% IF ENV.OILS_CONTENT_CAFE_USER %] [% ident = attrs.isbn_clean || attrs.upc %] [% END %]