From a5ea78eb3092b5367204bb90afadce63ff100294 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 23 Aug 2011 10:42:54 -0400 Subject: [PATCH] UI cleanup for batch-holds from lists * Handle hold placement override with a single form and checkboxes instead of a series individual forms * Added a cancel button on the override page Signed-off-by: Bill Erickson --- .../lib/OpenILS/WWW/EGCatLoader/Account.pm | 10 +- Open-ILS/web/css/skin/default/opac/style.css | 2 +- .../default/opac/parts/place_hold.tt2 | 14 +- .../default/opac/parts/place_hold_result.tt2 | 156 +++++++++--------- 4 files changed, 92 insertions(+), 90 deletions(-) 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 547c578974..b329daa748 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -401,6 +401,8 @@ sub load_place_hold { $ctx->{hold_type} = $cgi->param('hold_type'); $ctx->{default_pickup_lib} = $e->requestor->home_ou; # unless changed below + return $self->post_hold_redirect unless @targets; + $logger->info("Looking at hold targets: @targets"); # if the staff client provides a patron barcode, fetch the patron @@ -585,6 +587,12 @@ sub load_place_hold { # if successful, do some cleanup and return the # user to the requesting page. + return $self->post_hold_redirect; +} + +sub post_hold_redirect { + my $self = shift; + # We also clear the patron_barcode (from the staff client) # cookie at this point (otherwise it haunts the staff user # later). XXX todo make sure this is best; also see that @@ -599,8 +607,6 @@ sub load_place_hold { -expires => "-1h" ) ); - - return Apache2::Const::OK; } diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index f5354ff8bd..72a5566523 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -1024,7 +1024,7 @@ a.dash-link:hover { text-decoration: underline !important; } .results-paginator-selected { color: red; } .inactive-hold { background: #e5e5e5; } -#hold-items-list li { margin-bottom: 20px; } +#hold-items-list td { padding: 5px; margin-bottom: 20px; } .hold-items-list-title { font-size: 120%; } .hold-items-list-problem { color: red; } diff --git a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 index d9fb32cfde..f3a564cd67 100644 --- a/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/place_hold.tt2 @@ -38,16 +38,18 @@ [% END %] -