<div class="clear-both"></div>
<div id='holds_main'>
- [% IF ctx.holds.size < 1 %]
+ [% IF ctx.holds.size && ctx.holds.size < 1 %]
<div class="warning_box">
<big><strong>[% l('No holds found.') %]</strong></big>
</div>
PROCESS "opac/parts/hold_status.tt2";
WRAPPER "opac/parts/myopac/base.tt2";
myopac_page = "holds";
- limit = ctx.holds_limit;
- offset = ctx.holds_offset;
- count = ctx.holds_ids.size;
+ limit = (ctx.holds_limit.defined) ? ctx.holds_limit : 0;
+ offset = (ctx.holds_offset.defined) ? ctx.holds_offset : 0;
+ count = (ctx.holds_ids.size.defined) ? ctx.holds_ids.size : 0;
%]
<h3 class="sr-only">[% l('My Holds') %]</h3>
<div id='myopac_holds_div'>
</td>
</tr>
</table>
- [% IF ctx.holds.size < 1 %]
+ [% IF ctx.holds.size && ctx.holds.size < 1 %]
<div class="warning_box">[% l('No holds found.') %]</div>
[% ELSE %]
<table id="acct_holds_main_header" title="[% l('Items on Hold') %]"
<tr><td colspan='4'>
[% IF hold.metarecord_filters.formats.size OR
- hold.metarecord_filters.langs.size > 1;
+ (hold.metarecord_filters.langs.size.defined && hold.metarecord_filters.langs.size > 1);
PROCESS metarecord_hold_filters_selector
hold_data=hold; END %]
</td></tr>
[% l('Advanced Hold Options') %]</a>
[% END %]
[% IF hdata.metarecord_filters.formats.size OR # should this be size > 1
- hdata.metarecord_filters.langs.size > 1;
+ (hdata.metarecord_filters.langs.size && hdata.metarecord_filters.langs.size > 1);
PROCESS metarecord_hold_filters_selector hold_data=hdata;
END;
END %]
-[% IF ctx.search_result_index >= 0 %]
+[% IF ctx.search_result_index.defined && ctx.search_result_index >= 0 %]
<div class="rdetail_header">
<span class="rdetail_results">
<a href='[% mkurl(ctx.opac_root _ '/results', {}, stop_parms); %]'>[% l('◄ Search Results') %]</a>
[%- search_ou = ctx.search_ou;
IF ctx.place_unfillable ||
( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0
- && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
+ && (ctx.holds_block.enabled != 'true' && !attrs.org_copy_counts.$search_ou.available)
)
%]
<div class="rdetail_aux_utils place_hold">
[% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
[% attrs.title | html %]
</a>
- [% IF rec.mr_constituent_count > 1 %]
+ [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
<span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
([% rec.mr_constituent_count %])
</span>
page = CGI.param('page');
page = page.match('^\d+$') ? page : 0; # verify page is a sane value
- page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
+ page_count = (!ctx.page_size.defined || !ctx.hit_count.defined || ctx.page_size == 0) ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
PROCESS "opac/parts/misc_util.tt2";
PROCESS get_library;