From 2ba7db8388d7fb3db4d4103985a773e1f91bc83a Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 27 Mar 2013 15:09:51 -0400 Subject: [PATCH] removing hold/circ history view for patrons until we can review policy concerns Conflicts: Open-ILS/src/templates/opac/myopac/holds.tt2 Conflicts: Open-ILS/src/templates/opac/myopac/circs.tt2 Open-ILS/src/templates/opac/myopac/holds.tt2 --- Open-ILS/src/templates/opac/myopac/circs.tt2 | 2 + Open-ILS/src/templates/opac/myopac/holds.tt2 | 226 ++++++++++++++------------- 2 files changed, 121 insertions(+), 107 deletions(-) diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index 4715925ed4..f75e74808e 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -10,9 +10,11 @@
[% l("Current Items Checked Out") %]
+
diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index 7fc808c8f3..1454679a2f 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -15,37 +15,39 @@ +
- [% 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 %] limit,offset => (offset - limit)}) %]' - [% IF offset <= 0 %] class='invisible' [% END %]>[% l('Previous') %] - [% IF offset > 0 || count > limit; + [% if offset <= 0 %] class='invisible' [% end %]>[% l('previous') %] + [% 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 %] limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %] - [%- END; + [%- end; curpage = curpage + 1; - END; - END %] + end; + end %] limit, offset => (offset + limit)}) %]' - [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %] + [% if count <= limit + offset %] class='invisible' [% end %] >[% l('next') %]
@@ -53,207 +55,217 @@
+ title="[% l('actions for items on hold') %]">
- + [% l('Holds Help') %] - [% 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; %] - [% IF CGI.param("available") -%] - [% l('Show all holds') %] | - [% l("Show only available holds") %] - [% ELSE -%] - [% l("Show all holds") %] | - [% l("Show only available holds") %] - [% END -%] + [% if cgi.param("available") -%] + [% l('show all holds') %] | + [% l("show only available holds") %] + [% else -%] + [% l("show all holds") %] | + [% l("show only available holds") %] + [% end -%]
- [% IF ctx.holds.size && ctx.holds.size < 1 %] -
[% l('No holds found.') %]
- [% ELSE %] - [% l('no holds found.') %] + [% else %] +
- - - - - - - - + + + + + + + + + - [%# 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 %] + + - [% END %] + [% end %]
- + + [% sort_head("sort_title", l('Title')) %][% sort_head("author", l('Author')) %][% sort_head("format", l('Format')) %][% l('Pickup Location') %][% l('Cancel if not filled by') %][% l('Status') %][% l('Notes') %][% sort_head("sort_title", l('title')) %][% sort_head("author", l('author')) %][% sort_head("format", l('format')) %][% l('pickup location') %][% l('activate') %][% l('cancel if not filled by') %][% l('active') %][% l('status') %][% l('notes') %]
+ [% html_text_attr('title', l('select hold [_1]', attrs.title)) %]/>
- [% 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; %] - [%- title.substr(0,hold.ATTRS.nonfiling_characters) | html %] - [%- title.substr(hold.ATTRS.nonfiling_characters) | html %] + name="[% l('catalog record') %]"> + [%- title.substr(0,hold.attrs.nonfiling_characters) | html %] + [%- title.substr(hold.attrs.nonfiling_characters) | html %]
[% hold.ATTRS.author | html %] + ) %]">[% hold.attrs.author | html %]
[% - 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 %] [% format.label | html %] - [% END %] + [% end %]
[% ctx.get_aou(ahr.pickup_lib).name | html %] - [% IF ahr.expire_time; - date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT); - END %] + [% if ahr.frozen == 't' and ahr.thaw_date; + date.format(ctx.parse_datetime(ahr.thaw_date), date_format); + end %] + + [% if ahr.expire_time; + date.format(ctx.parse_datetime(ahr.expire_time), date_format); + end %] + + [% l(ahr.frozen == 'f' ? 'active' : 'suspended') %]
- [% PROCESS get_hold_status hold=hold; %] + [% process get_hold_status hold=hold; %]
- [%- FOREACH pubnote IN ahr.notes; - IF pubnote.pub == 't'; + [%- foreach pubnote in ahr.notes; + if pubnote.pub == 't'; %]
[% pubnote.title | html %]
[% pubnote.body | html %]
- [%- END; END; %] + [%- end; end; %]
- [% l('Edit') %] + [% html_text_attr('title', l('edit hold for item [_1]', attrs.title)) %]> + [% l('edit') %]
- [% END %] + [% end %]
-- 2.11.0