From: senator Date: Tue, 15 Feb 2011 18:37:47 +0000 (-0500) Subject: "Items Ready For Pickup" works X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8d12ceb700e21f31a38264519544a113fcbaaa13;p=evergreen%2Fequinox.git "Items Ready For Pickup" works This uses the holds page of myopac with a special param. Also, tiny bit of JS just to focus the username field on the login page. Couldn't resist. --- 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 dd8985290d..fb15179d16 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -34,6 +34,7 @@ sub fetch_user_holds { my $hold_ids = shift; my $ids_only = shift; my $flesh = shift; + my $available = shift; my $limit = shift; my $offset = shift; @@ -91,6 +92,10 @@ sub fetch_user_holds { last if $first and not @ses; if(@collected) { + # If desired by the caller, filter any holds that are not available. + if ($available) { + @collected = grep { $_->{hold}->{status} == 4 } @collected; + } while(my $blob = pop(@collected)) { $blob->{marc_xml} = XML::LibXML->new->parse_string($blob->{hold}->{bre}->marc) if $flesh; push(@holds, $blob); @@ -167,10 +172,11 @@ sub load_myopac_holds { my $limit = $self->cgi->param('limit') || 0; my $offset = $self->cgi->param('offset') || 0; my $action = $self->cgi->param('action') || ''; + my $available = int($self->cgi->param('available')); $self->handle_hold_update($action) if $action; - $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $limit, $offset); + $ctx->{holds} = $self->fetch_user_holds(undef, 0, 1, $available, $limit, $offset); return Apache2::Const::OK; } diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css index 61355d6829..6902837cfa 100644 --- a/Open-ILS/web/css/skin/default/opac/semiauto.css +++ b/Open-ILS/web/css/skin/default/opac/semiauto.css @@ -85,7 +85,8 @@ .opac-auto-094 { padding: 5px 7px 0px 0px; } .opac-auto-095 { padding: 5px 7px 0px 0px; white-space: nowrap; } .opac-auto-096 { padding: 6px } -.opac-auto-097 { padding: 8px 0px 6px 0px; } +.opac-auto-097 { padding: 8px 0px 6px 0px; width: 100%; border: 0; } +.opac-auto-097b { padding: 8px 0px 6px 0px; border: 0; } .opac-auto-098 { padding-bottom: 10px; } .opac-auto-099 { padding-bottom: 12px; color: #666; } .opac-auto-100 { padding-bottom: 16px; } diff --git a/Open-ILS/web/templates/default/opac/login.tt2 b/Open-ILS/web/templates/default/opac/login.tt2 index 67e76f1156..0265f71a45 100644 --- a/Open-ILS/web/templates/default/opac/login.tt2 +++ b/Open-ILS/web/templates/default/opac/login.tt2 @@ -10,6 +10,17 @@
[% INCLUDE "default/opac/parts/login/form.tt2" %]
+
[% END %] diff --git a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 b/Open-ILS/web/templates/default/opac/myopac/circs.tt2 index 77ba056fb4..8d7fa21cc2 100644 --- a/Open-ILS/web/templates/default/opac/myopac/circs.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/circs.tt2 @@ -33,8 +33,7 @@
- +
Renew Selected Titles diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 index 6c6cafe62a..bf0932ea5e 100644 --- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 @@ -23,7 +23,12 @@
- Current Items on Hold + [% IF CGI.param("available"); + l("Items Ready for Pickup"); + ELSE; + l("Current Items on Hold"); + END + %] Export List @@ -31,8 +36,7 @@
- +
+ [% l("Show") %]     + [% IF CGI.param("available") %] + [% l('all') %] | + [% l("only available") %] + [% ELSE %] + [% l("all") %] | + [% l("only available") %] + [% END %]     + [% l("holds") %]
diff --git a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 b/Open-ILS/web/templates/default/opac/parts/login/form.tt2 index 38a6a2d0e6..c0624ae2a8 100644 --- a/Open-ILS/web/templates/default/opac/parts/login/form.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/login/form.tt2 @@ -104,7 +104,7 @@
- +