[% 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; %] [% PROCESS "opac/parts/result/paginate.tt2" %] [% ctx.results_count_header = PROCESS results_count_header; ctx.results_count_header %] [% IF ctx.bookbag %]
[% l('Search result number') %] | [% l('Book jacket cover art') %] | [% l('Item details and Actions') %] | |||
---|---|---|---|---|---|
[% result_count; result_count = result_count + 1 %]. |
|
[%- 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)
)
%]
[% del_parms = ['tag','subfield','term','_special',
'sort','page'];
add_parms = {hold_target => rec.id,
hold_type => hold_type,
hold_source_page => mkurl()};
IF is_advanced;
# Do not pass "advanced params" to hold code
# Instead, pass the scrubed query in one-line form
del_parms = del_parms.merge(['query', 'bool',
'qtype', 'contains', '_adv']);
add_parms.import(
{query => ctx.naive_query_scrub(ctx.user_query)});
END; %]
[%- END -%]
[%- IF ebook_api.enabled == 'true' && args.ebook %]
[%- END -%]
[% IF !ctx.is_meta %]
[% IF !ctx.is_staff %]
[% 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 %]
[% END %]
[% END %]
[% IF ENV.OILS_CONTENT_CAFE_USER %]
[% ident = attrs.isbn_clean || attrs.upc %]
[% END %]
|
|||