From: berick Date: Thu, 7 Apr 2011 20:35:44 +0000 (-0400) Subject: improved holds history paging X-Git-Tag: sprint4-merge-nov22~5128^2~72^2~120^2 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea533eeed1bff9d2a2226564f8d4e6e1549a17e8;p=working%2FEvergreen.git improved holds history paging --- 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 3bd5cc4b4c..da895fa1ca 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -540,8 +540,11 @@ sub load_myopac_hold_history { my $self = shift; my $e = $self->editor; my $ctx = $self->ctx; - my $limit = $self->cgi->param('limit'); - my $offset = $self->cgi->param('offset'); + my $limit = $self->cgi->param('limit') || 15; + my $offset = $self->cgi->param('offset') || 0; + $ctx->{hold_history_limit} = $limit; + $ctx->{hold_history_offset} = $offset; + my $holds = $e->json_query({ from => ['action.usr_visible_holds', $e->requestor->id], diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 index 62429fe3a9..7375443f3a 100644 --- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 @@ -2,8 +2,8 @@ PROCESS "default/opac/parts/marc_misc.tt2"; WRAPPER "default/opac/parts/myopac/base.tt2"; myopac_page = "holds" - limit = CGI.param('limit') || 25; - offset = CGI.param('offset') || 0; + limit = ctx.hold_history_limit; + offset = ctx.hold_history_offset; %]
@@ -19,8 +19,13 @@
- - [% l("Previously Held Items") %] + [% l("Previously Held Items") %] + + + [%# TODO: get total to prevent paging off then end of the list.. %] + Export List