From dd29919d7572126830f656ad7fd2de08a6052d9e Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 17 Nov 2011 16:35:20 -0500 Subject: [PATCH] Tpac: paging support for serials issues (non-MFHD) When you click "issues held," when using the opac.fully_compressed_serial_holdings org unit setting so that you get a list of individual issuances you can potentially place holds on, now there's some basic forward/back paging with a default page size of 10. Thought this was done a while ago, but I must have been crazy. Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/templates/opac/parts/config.tt2 | 5 +++++ .../src/templates/opac/parts/record/issues.tt2 | 26 +++++++++++++++++++--- Open-ILS/web/css/skin/default/opac/style.css | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index e1104720e5..db78681caa 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -57,4 +57,9 @@ reset_password = 'true'; record.summary.jacket_size = 'medium'; +############################################################################## +# number of issues to show per page for serials +# (only effective with OU setting opac.fully_compressed_serial_holdings true) +holding_limit = 10; + %] diff --git a/Open-ILS/src/templates/opac/parts/record/issues.tt2 b/Open-ILS/src/templates/opac/parts/record/issues.tt2 index f346587a80..91505fad0f 100644 --- a/Open-ILS/src/templates/opac/parts/record/issues.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/issues.tt2 @@ -1,11 +1,18 @@
[% -base_expando = ctx.full_path _ "?expand=issues"; FOREACH type IN ctx.holding_summaries.keys; NEXT UNLESS ctx.holding_summaries.$type.size; - expanded = CGI.param('expand_holding_type') == type; %] + expanded = CGI.param('expand_holding_type') == type; + expander_params = {expand => 'issues', holding_limit => holding_limit}; + IF expanded; + expander_omit = ['expand_holding_type']; + ELSE; + expander_omit = []; + expander_params.expand_holding_type = type; + END; + expander_url = mkurl('', expander_params, expander_omit); %]
- [[% expanded ? '-' : '+' %]] + [[% expanded ? '-' : '+' %]] [% ctx.holding_summaries.$type.join(", ") %] [% IF expanded %] @@ -21,6 +28,19 @@ FOREACH type IN ctx.holding_summaries.keys; [% END %]
+
+ [% IF CGI.param("holding_offset"); + prev_offset = CGI.param("holding_offset") - holding_limit; + IF prev_offset < 0; prev_offset = 0; END %] + + [% l("More recent holdings") %] + [% END %] + [% IF ctx.expanded_holdings.size == holding_limit; + next_offset = (CGI.param("holding_offset") || 0) + holding_limit %] + + [% l("Earlier holdings") %] + [% END %] +
[% END %]
[% END %] diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index e81b9d6900..186b9bc833 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -1175,3 +1175,5 @@ table.bookbag-specific { #staff-saved-search { /* wraps .saved-searches-header and .saved-searches on the record page */ border-right: 1px solid #333; } +a.holding-paging { margin: 0 2em; } +.rdetail-issue-type table { margin-left: 2em; } -- 2.11.0