<div class="align selected">
<a href='#'>[% l("Items on Hold") %]</a>
</div>
+ <!--
<div class="align">
<a href='[% mkurl('hold_history', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("Holds History") %]</a>
</div>
+ -->
</div>
<div class="header_middle">
<span id="acct_holds_header" style="float:left;">
- [% IF CGI.param("available");
- l("Items Ready for Pickup");
- ELSE;
- l("Current Items on Hold");
- END
+ [% if cgi.param("available");
+ l("items ready for pickup");
+ else;
+ l("current items on hold");
+ end
%]
</span>
<span class='float-left' style='padding-left: 10px;'>
<a href='[% mkurl('holds', {limit => limit,offset => (offset - limit)}) %]'
- [% IF offset <= 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
- [% IF offset > 0 || count > limit;
+ [% if offset <= 0 %] class='invisible' [% end %]><span class="nav_arrow_fix">◄</span>[% l('previous') %]</a>
+ [% if offset > 0 || count > limit;
curpage = 0;
- WHILE curpage * limit < count;
- IF curpage * limit == offset;
+ while curpage * limit < count;
+ if curpage * limit == offset;
%]
[% curpage + 1 %]
- [%- ELSE %]
+ [%- else %]
<a href='[% mkurl('holds', {limit => limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %]</a>
- [%- END;
+ [%- end;
curpage = curpage + 1;
- END;
- END %]
+ end;
+ end %]
<a href='[% mkurl('holds', {limit => limit, offset => (offset + limit)}) %]'
- [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
+ [% if count <= limit + offset %] class='invisible' [% end %] >[% l('next') %]<span class="nav_arrow_fix">►</span></a>
</span>
</div>
<div id='holds_main'>
<form method="post">
<table class="table_no_border_space table_no_cell_pad opac-auto-097"
- title="[% l('Actions for Items on Hold') %]">
+ title="[% l('actions for items on hold') %]">
<tr>
<td>
<select name="action" id="acct_holds_actions"
- title="[% l('Select your action for the selected holds') %]">
+ title="[% l('select your action for the selected holds') %]">
<option id='myopac_holds_actions_none' value=''>
- -- [% l("Actions for selected holds") %] --
+ -- [% l("actions for selected holds") %] --
</option>
- <option value='suspend'>[% l("Suspend") %]</option>
- <option value='activate'>[% l("Activate") %]</option>
- <!-- XXX maybe later <option value='thaw_date'>[% l("Set Active Date") %]</option> -->
- <option value='cancel'>[% l("Cancel") %]</option>
+ <option value='suspend'>[% l("suspend") %]</option>
+ <option value='activate'>[% l("activate") %]</option>
+ <!-- xxx maybe later <option value='thaw_date'>[% l("set active date") %]</option> -->
+ <option value='cancel'>[% l("cancel") %]</option>
</select>
</td>
<td style="padding-left:9px;">
- <input type="submit" value="[% l('Go') %]"
- title="[% l('Go') %]" class="opac-button" />
+ <input type="submit" value="[% l('go') %]"
+ title="[% l('go') %]" class="opac-button" />
</td>
<td style="padding-left:5px;">
<a href="#"><img
- alt="[% l('Holds Help') %]"
- title="[% l('Actions for selected holds') %]"
+ alt="[% l('holds help') %]"
+ title="[% l('actions for selected holds') %]"
src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
</td>
<td style="padding-left:5px;" class='error'>
- [% IF ctx.hold_suspend_post_capture;
- l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.');
- END;
+ [% if ctx.hold_suspend_post_capture;
+ l('one or more holds could not be suspended because the item is at (or en route to) the pickup library.');
+ end;
%]
</td>
<td align="right">
- [% IF CGI.param("available") -%]
- <a href="[% mkurl('holds', {}, ['limit','offset','available']) %]">[% l('Show all holds') %]</a> |
- <strong>[% l("Show only available holds") %]</strong>
- [% ELSE -%]
- <strong>[% l("Show all holds") %]</strong> |
- <a href="[% mkurl('holds',{available => 1},['limit','offset']) %]">[% l("Show only available holds") %]</a>
- [% END -%]
+ [% if cgi.param("available") -%]
+ <a href="[% mkurl('holds', {}, ['limit','offset','available']) %]">[% l('show all holds') %]</a> |
+ <strong>[% l("show only available holds") %]</strong>
+ [% else -%]
+ <strong>[% l("show all holds") %]</strong> |
+ <a href="[% mkurl('holds',{available => 1},['limit','offset']) %]">[% l("show only available holds") %]</a>
+ [% end -%]
</td>
</tr>
</table>
- [% 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') %]"
+ [% 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') %]"
class="table_no_border_space table_no_cell_pad">
<thead>
<tr>
<th align="center">
- <input type="checkbox" title="[% l('Select All Holds') %]"
- onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
+ <input type="checkbox" title="[% l('select all holds') %]"
+ onclick="var inputs=document.getelementsbytagname('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
</th>
- <th>[% sort_head("sort_title", l('Title')) %]</th>
- <th>[% sort_head("author", l('Author')) %]</th>
- <th>[% sort_head("format", l('Format')) %]</th>
- <th>[% l('Pickup Location') %]</th>
- <th>[% l('Activate') %]</th>
- <th>[% l('Cancel if not filled by') %]</th>
- <th>[% l('Active') %]</th>
- <th>[% l('Status') %]</th>
- <th>[% l('Notes') %]</th>
+ <th>[% sort_head("sort_title", l('title')) %]</th>
+ <th>[% sort_head("author", l('author')) %]</th>
+ <th>[% sort_head("format", l('format')) %]</th>
+ <th>[% l('pickup location') %]</th>
+ <th>[% l('activate') %]</th>
+ <th>[% l('cancel if not filled by') %]</th>
+ <th>[% l('active') %]</th>
+ <th>[% l('status') %]</th>
+ <th>[% l('notes') %]</th>
</tr>
</thead>
<tbody id="holds_temp_parent">
- [%# Copy the ctx.holds into a local array, then add a SORT field
- that contains the value to sort on. Since we need the item attrs,
- invoke it and save the result in ATTRS.
+ [%# copy the ctx.holds into a local array, then add a sort field
+ that contains the value to sort on. since we need the item attrs,
+ invoke it and save the result in attrs.
%]
[%
hold_items = ctx.holds;
- sort_field = CGI.param('sort');
+ sort_field = cgi.param('sort');
- FOR hold IN hold_items;
- hold.ATTRS = {marc_xml => hold.marc_xml};
- PROCESS get_marc_attrs args=hold.ATTRS;
+ for hold in hold_items;
+ hold.attrs = {marc_xml => hold.marc_xml};
+ process get_marc_attrs args=hold.attrs;
- SWITCH sort_field;
+ switch sort_field;
- CASE "sort_title";
- hold.SORTING = hold.ATTRS.sort_title;
+ case "sort_title";
+ hold.sorting = hold.attrs.sort_title;
- CASE "author";
- hold.SORTING = hold.ATTRS.author;
+ case "author";
+ hold.sorting = hold.attrs.author;
- CASE "format";
- hold.SORTING = hold.ATTRS.format_label;
+ case "format";
+ hold.sorting = hold.attrs.format_label;
- CASE;
+ case;
sort_field = "";
- END; # SWITCH
- END; #FOR hold
+ end; # switch
+ end; #for hold
- IF (sort_field != "sort_title");
+ if (sort_field != "sort_title");
deemphasize_class = "";
- ELSE;
+ else;
deemphasize_class = " class=\"sort_deemphasize\"";
- END;
+ end;
- # Apply sorting to hold_items
- IF (sort_field != "");
- hold_items = hold_items.sort("SORTING");
- IF (CGI.param("sort_type") == "desc");
+ # apply sorting to hold_items
+ if (sort_field != "");
+ hold_items = hold_items.sort("sorting");
+ if (cgi.param("sort_type") == "desc");
hold_items = hold_items.reverse;
- END;
+ end;
- # Shorten the hold_items list per offset/limit/count
+ # shorten the hold_items list per offset/limit/count
hi = offset + limit - 1;
hi = hi > hold_items.max ? hold_items.max : hi;
hold_items = hold_items.slice(offset, hi);
- END;
+ end;
- # hold_items list is now sorted. Traverse and dump the information.
+ # hold_items list is now sorted. traverse and dump the information.
- FOR hold IN hold_items;
+ for hold in hold_items;
ahr = hold.hold.hold %]
<tr name="acct_holds_temp"
class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
<td align="center" style="text-align:center;">
<input type="checkbox" name="hold_id" value="[% ahr.id %]"
- [% html_text_attr('title', l('Select hold [_1]', attrs.title)) %]/>
+ [% html_text_attr('title', l('select hold [_1]', attrs.title)) %]/>
</td>
<td>
<div>
- [% title = hold.ATTRS.title;
- IF ahr.hold_type == 'P';
+ [% title = hold.attrs.title;
+ if ahr.hold_type == 'p';
title = l('[_1] ([_2])', title, hold.hold.part.label);
- END; %]
+ end; %]
<a href="[% mkurl(ctx.opac_root _ '/record/' _
hold.hold.bre_id, {}, 1) %]"
- name="[% l('Catalog record') %]"><span[%- deemphasize_class -%]>
- [%- title.substr(0,hold.ATTRS.nonfiling_characters) | html %]</span>
- [%- title.substr(hold.ATTRS.nonfiling_characters) | html %]</a>
+ name="[% l('catalog record') %]"><span[%- deemphasize_class -%]>
+ [%- title.substr(0,hold.attrs.nonfiling_characters) | html %]</span>
+ [%- title.substr(hold.attrs.nonfiling_characters) | html %]</a>
</div>
</td>
<td>
<div>
<a href="[% mkurl(ctx.opac_root _ '/results',
- {qtype => 'author', query => hold.ATTRS.author.replace('[,\.:;]', '')},
+ {qtype => 'author', query => hold.attrs.author.replace('[,\.:;]', '')},
1
- ) %]">[% hold.ATTRS.author | html %]</a>
+ ) %]">[% hold.attrs.author | html %]</a>
</div>
</td>
<td>
<div class="format_icon">
[%
- formats = hold.ATTRS.all_formats;
- IF ahr.hold_type == 'M';
+ formats = hold.attrs.all_formats;
+ if ahr.hold_type == 'm';
# only show selected formats for metarecords
formats = [];
- FOR ccvm IN hold.metarecord_selected_filters.icons;
- NEXT IF ccvm.opac_visible == 'f';
+ for ccvm in hold.metarecord_selected_filters.icons;
+ next if ccvm.opac_visible == 'f';
format = {};
format.label = ccvm.search_label || ccvm.value;
- format.icon = PROCESS get_ccvm_icon ccvm=ccvm;
+ format.icon = process get_ccvm_icon ccvm=ccvm;
formats.push(format);
- END;
- END;
- FOR format IN formats
+ end;
+ end;
+ for format in formats
%]
<img title="[% format.label | html %]"
alt="[% format.label | html %]" src="[% format.icon %]" />
- [% END %]
+ [% end %]
</div>
</td>
<td>
[% ctx.get_aou(ahr.pickup_lib).name | html %]
</td>
<td>
- [% IF ahr.frozen == 't' AND ahr.thaw_date;
- date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
- END %]
+ [% if ahr.frozen == 't' and ahr.thaw_date;
+ date.format(ctx.parse_datetime(ahr.thaw_date), date_format);
+ end %]
</td>
<td>
- [% IF ahr.expire_time;
- date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
- END %]
+ [% if ahr.expire_time;
+ date.format(ctx.parse_datetime(ahr.expire_time), date_format);
+ end %]
</td>
<td>
- [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
+ [% l(ahr.frozen == 'f' ? 'active' : 'suspended') %]
</td>
<td>
<div name="acct_holds_status">
- [% PROCESS get_hold_status hold=hold; %]
+ [% process get_hold_status hold=hold; %]
</div>
</td>
<td class="hold_notes">
- [%- FOREACH pubnote IN ahr.notes;
- IF pubnote.pub == 't';
+ [%- foreach pubnote in ahr.notes;
+ if pubnote.pub == 't';
%]
<div class="hold_note">
<span class="hold_note_title">[% pubnote.title | html %]</span>
<br />
<span class="hold_note_body">[% pubnote.body | html %]</span>
</div>
- [%- END; END; %]
+ [%- end; end; %]
</td>
<td class="opac-auto-161">
<a href="[% mkurl(ctx.opac_root _ '/myopac/holds/edit', {id => ahr.id}) %]"
- [% html_text_attr('title', l('Edit hold for item [_1]', attrs.title)) %]>
- [% l('Edit') %]
+ [% html_text_attr('title', l('edit hold for item [_1]', attrs.title)) %]>
+ [% l('edit') %]
</a>
</td>
</tr>
- [% END %]
+ [% end %]
</tbody>
</table>
- [% END %]
+ [% end %]
</form>
</div>
</div>