From b39eaf4328563a8965a2fabfdad52b898795d116 Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Wed, 10 Aug 2016 23:41:51 -0400 Subject: [PATCH] LP#1612274: Improve display of holds status in My Account Collapse the data contained in the Activate, Active, and Date Fulfilled columns into the status filed on the My Account holds and holds history interfaces. This change cleans up the display and removes extraneous information that the user doesn't need to see. Signed-off-by: Kathy Lussier Signed-off-by: Mike Rylander --- .../lib/OpenILS/Application/Circ/Holds.pm | 4 +++ Open-ILS/src/templates/opac/css/style.css.tt2 | 9 ++---- .../templates/opac/myopac/hold_history.tt2 | 32 +++---------------- Open-ILS/src/templates/opac/myopac/holds.tt2 | 10 ------ .../src/templates/opac/parts/hold_status.tt2 | 31 +++++++++++++++--- 5 files changed, 37 insertions(+), 49 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 65c3a6fe97..021d3bb954 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -1231,6 +1231,7 @@ Returns event on error or: 6 for 'canceled' 7 for 'suspended' 8 for 'captured, on wrong hold shelf' + 9 for 'fulfilled' END_OF_DESC } } @@ -1263,6 +1264,9 @@ sub _hold_status { if ($hold->current_shelf_lib and $hold->current_shelf_lib ne $hold->pickup_lib) { return 8; } + if ($hold->fulfillment_time) { + return 9; + } return 1 unless $hold->current_copy; return 2 unless $hold->capture_time; diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index b266730484..7f2c933151 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2079,19 +2079,14 @@ a.preflib_change { table#acct_holds_main_header td:nth-of-type(3):before { content: "[% l('Author') %]"; } table#acct_holds_main_header td:nth-of-type(4):before { content: "[% l('Format') %]"; } table#acct_holds_main_header td:nth-of-type(5):before { content: "[% l('Pickup Location') %]"; } - table#acct_holds_main_header td:nth-of-type(6):before { content: "[% l('Activate') %]"; } - table#acct_holds_main_header td:nth-of-type(7):before { content: "[% l('Cancel on') %]"; } - table#acct_holds_main_header td:nth-of-type(8):before { content: "[% l('Active') %]"; } - table#acct_holds_main_header td:nth-of-type(9):before { content: "[% l('Status') %]"; } + table#acct_holds_main_header td:nth-of-type(6):before { content: "[% l('Cancel on') %]"; } + table#acct_holds_main_header td:nth-of-type(7):before { content: "[% l('Status') %]"; } table#acct_holds_main_header td.hold_notes:before { content: "[% l('Notes') %]"; } table#acct_holds_hist_header td:nth-of-type(1):before { content: "[% l('Title') %]";} table#acct_holds_hist_header td:nth-of-type(2):before { content: "[% l('Author') %]"; } table#acct_holds_hist_header td:nth-of-type(3):before { content: "[% l('Format') %]"; } table#acct_holds_hist_header td:nth-of-type(4):before { content: "[% l('Pickup Location') %]"; } - table#acct_holds_hist_header td:nth-of-type(5):before { content: "[% l('Activate') %]"; } - table#acct_holds_hist_header td:nth-of-type(6):before { content: "[% l('Active') %]"; } - table#acct_holds_hist_header td:nth-of-type(7):before { content: "[% l('Date Fulfilled') %]"; } table#acct_holds_hist_header td:nth-of-type(8):before { content: "[% l('Status') %]"; } diff --git a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 index a142bf5a16..44178b72ae 100644 --- a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 @@ -55,14 +55,11 @@ - + + + + @@ -95,25 +92,6 @@ - - - - - @@ -224,19 +222,11 @@ - -
[% l('Title') %] - [% l('Author') %] - [% l('Format') %] - [% l('Pickup Location') %] - [% l('Activate') %] - [% l('Active') %] - [% l('Date Fulfilled') %] - [% l('Status') %] + [% l('Title') %][% l('Author') %] [% l('Format') %][% l('Pickup Location') %] [% l('Status') %]
[% ctx.get_aou(ahr.pickup_lib).name | html %] - [% IF ahr.frozen == 't' AND ahr.thaw_date; - date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT); - END %] - - [% IF ahr.fulfillment_time; - l('Fulfilled'); - ELSIF hold.hold.status == 6; - l('Canceled'); - ELSE; - l(ahr.frozen == 'f' ? 'Active' : 'Suspended'); - END %] - - [% IF ahr.fulfillment_time; - date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT); - END %] -
[% PROCESS get_hold_status hold=hold; %] diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index 6c2827576c..7fc808c8f3 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -109,9 +109,7 @@
[% 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') %]
[% ctx.get_aou(ahr.pickup_lib).name | html %] - [% 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; %] diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2 index d6e838f16b..183ead69da 100644 --- a/Open-ILS/src/templates/opac/parts/hold_status.tt2 +++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2 @@ -1,14 +1,30 @@ [% BLOCK get_hold_status %]
- [% + [% IF hold.hold.status == 4; l("Available") | html; IF ahr.shelf_expire_time; '
'; - l('Expires [_1]', + l('Expires [_1]', date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT)) | html; END; + ELSIF hold.hold.status == 6; + l("Canceled [_1]", + date.format(ctx.parse_datetime(ahr.cancel_time), DATE_FORMAT)) | html; + + ELSIF hold.hold.status == 7; + l("Suspended") | html; + IF ahr.thaw_date; + "
"; + l("Activate On [_1]", + date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT)) | html; + END; + + ELSIF hold.hold.status == 9; + l("Fulfilled [_1]", + date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT))| html; + 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); @@ -19,11 +35,16 @@ ELSIF hold.hold.status < 3; l("Waiting for copy") | html; - END + END %]
- [% l('Hold #[_1] on [quant,_2, copy, copies]', - hold.hold.queue_position, hold.hold.potential_copies) | html %] + [% # Only show the count for holds that have not been captured + IF hold.hold.status < 3 OR hold.hold.status == 7; + l('Hold #[_1] on [quant,_2, copy, copies]', + hold.hold.queue_position, hold.hold.potential_copies) | html; + END + %]
[% END %] + -- 2.43.2