From: Kathy Lussier Date: Thu, 11 Aug 2016 17:24:00 +0000 (-0400) Subject: LP#1612274: Add distinct classes for hold statuses X-Git-Tag: sprint4-merge-nov22~127 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=504076521062d6b52842e137e79877b1abf8f2a5;p=working%2FEvergreen.git LP#1612274: Add distinct classes for hold statuses With more data in the My Account hold status field, libraries may want to style some statuses or dates differently so that they pop out to the user. Each hold status and date now has its own class for more flexible styling. The available status also now has a green, bold font and the suspended status has a red, bold font. Signed-off-by: Kathy Lussier Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 7f2c933151..443e87e806 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -832,6 +832,16 @@ div.result_table_utils_cont { } +.myopac-hold-available { + color: [% css_colors.text_greatnews %]; + font-weight: bold; +} + +.myopac-hold-suspended { + color: [% css_colors.text_badnews %]; + font-weight: bold; +} + #myopac_prefs_div .data_grid { border-collapse:collapse; } diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2 index 183ead69da..fe5f2714b3 100644 --- a/Open-ILS/src/templates/opac/parts/hold_status.tt2 +++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2 @@ -1,50 +1,62 @@ [% BLOCK get_hold_status %]
- [% - IF hold.hold.status == 4; - l("Available") | html; - IF ahr.shelf_expire_time; - '
'; - 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; + [% IF hold.hold.status == 4 %] + [% l("Available") %] + [% IF ahr.shelf_expire_time %] +
+ [% l("Expires") %] + + [% date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT) %] + + [% END %] + + + [% ELSIF hold.hold.status == 6 %] + [% l("Canceled") %] + + [% date.format(ctx.parse_datetime(ahr.cancel_time), DATE_FORMAT) %] + + + [% ELSIF hold.hold.status == 7 %] + [% l("Suspended") %] + [% IF ahr.thaw_date %] +
+ [% l("Activate On") %] + + [% END %] + + [% ELSIF hold.hold.status == 9 %] + [% l("Fulfilled") %] + + [% date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT) %] + + + + [% 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) | html; + SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400) %] + [% l("Estimated wait:") %] + + [% l("[quant,_1,day,days]", hwait) | html %] + - ELSIF hold.hold.status == 3 OR hold.hold.status == 8; - l("In Transit") | html; + [% ELSIF hold.hold.status == 3 OR hold.hold.status == 8 %] + [% l("In Transit") %] - ELSIF hold.hold.status < 3; - l("Waiting for copy") | html; - END - %] + [% ELSIF hold.hold.status < 3 %] + [% l("Waiting for copy") %] + [% END %]
[% # 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 - %] + 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 %]