From: berick Date: Tue, 29 Mar 2011 14:29:27 +0000 (-0400) Subject: implemented holds history template w/ links to/from active holds page; TODO: verify... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9454a2da7ea7e74217a7e61c26891db4c996a2ba;p=evergreen%2Fequinox.git implemented holds history template w/ links to/from active holds page; TODO: verify history call is returning the holds we want it to.. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 99223c1e1c..3ad5525a0c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -408,6 +408,7 @@ sub load_myopac_circ_history { return Apache2::Const::OK; } +# TODO: action.usr_visible_holds does not return cancelled holds. Should it? sub load_myopac_hold_history { my $self = shift; my $e = $self->editor; diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 new file mode 100644 index 0000000000..e2151e2287 --- /dev/null +++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 @@ -0,0 +1,123 @@ +[% PROCESS "default/opac/parts/header.tt2"; + PROCESS "default/opac/parts/marc_misc.tt2"; + WRAPPER "default/opac/parts/base.tt2" + + "default/opac/parts/myopac/base.tt2"; + myopac_page = "holds" + limit = CGI.param('limit') || 25; + offset = CGI.param('offset') || 0; +%] + +
+ +
+
+ +
+
+ +
+
+
+ +
+ + [% l("Previously Held Items") %] + + + Export List + +
+
+ +
+ [% IF ctx.holds.size < 1 %] +
+ [% l('No holds found.') %] +
+ [% ELSE %] + + + + + + + + + + + + + + + [% FOR hold IN ctx.holds; + attrs = {marc_xml => hold.marc_xml}; + PROCESS get_marc_attrs args=attrs; + ahr = hold.hold.hold %] + + + + + + + + + + + + + [% END %] + +
[% l('Title') %][% l('Author') %] [% l('Format') %][% l('Pickup Location') %] [% l('Active On') %][% l('Active') %][% l('Date Fulfilled') %][% l('Status') %]
+ + + + +
+ [% IF attrs.format_icon %] + [% attrs.format %] + [% ELSE; + attrs.format; + END %] +
+
+ [% ctx.find_aou(ahr.pickup_lib).name %] + + [% IF ahr.frozen == 't' AND ahr.thaw_date; + date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT); + END %] + + [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %] + + [% IF ahr.fulfillment_time; + date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT); + END %] + +
+ [% + IF hold.hold.status == 4; + l("Available"); + IF ahr.shelf_expire_time; + l('
Expires [_1]', + date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT)); + END; + ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0; + # estimated wait is delivered as seconds. + SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400); + l("Estimated wait: [quant,_1,day,days]", hwait); + ELSIF hold.hold.status == 3; + l("In Transit"); + ELSIF hold.hold.status < 3; + l("Waiting for copy"); + END; + %] +
+
+ [% END %] +
+[% END %] diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 index cd4ce31f98..f0691de67c 100644 --- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 @@ -4,23 +4,17 @@ "default/opac/parts/myopac/base.tt2"; myopac_page = "holds" %]
-
-
- -
-