From ea533eeed1bff9d2a2226564f8d4e6e1549a17e8 Mon Sep 17 00:00:00 2001 From: berick Date: Thu, 7 Apr 2011 16:35:44 -0400 Subject: [PATCH] improved holds history paging --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 7 +++++-- Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 | 13 +++++++++---- 2 files changed, 14 insertions(+), 6 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 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 -- 2.11.0