From 27b2037d72b8a1c5025a885d571b5329232ffa58 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 29 Dec 2011 00:11:25 -0500 Subject: [PATCH] TPAC: Propagate CGI params via mkurl() Fix many instances where params such as "loc" are dropped during a normal workflow, resulting in unexpected changes to the user's chosen search scope. mkurl() preserves the existing CGI params by default and passes them on to the created URL; for now we err on the side of caution (preserving all params) rather than filtering any out. Manual testing suggests this does not introduce any problems, and resolves many. Signed-off-by: Dan Scott Signed-off-by: Bill Erickson --- Open-ILS/src/templates/opac/advanced.tt2 | 12 ++++++++--- .../src/templates/opac/myopac/circ_history.tt2 | 12 ++++++----- Open-ILS/src/templates/opac/myopac/circs.tt2 | 10 ++++++--- .../src/templates/opac/myopac/hold_history.tt2 | 12 ++++++----- Open-ILS/src/templates/opac/myopac/holds.tt2 | 14 +++++++------ Open-ILS/src/templates/opac/myopac/lists.tt2 | 2 +- Open-ILS/src/templates/opac/myopac/main.tt2 | 9 +++++--- Open-ILS/src/templates/opac/parts/myopac/base.tt2 | 2 +- .../src/templates/opac/parts/myopac/main_base.tt2 | 10 ++++----- Open-ILS/src/templates/opac/parts/topnav.tt2 | 24 ++++++++++++++-------- 10 files changed, 67 insertions(+), 40 deletions(-) diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2 index 010e9238f2..17cb74f334 100644 --- a/Open-ILS/src/templates/opac/advanced.tt2 +++ b/Open-ILS/src/templates/opac/advanced.tt2 @@ -14,9 +14,15 @@ diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 index f983ad5d42..0728245676 100644 --- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2 @@ -10,7 +10,7 @@
[% l("Check Out History") %] @@ -20,10 +20,10 @@
[% l('Previously Checked Out Items') %] - limit, offset => (offset - limit)}) %]' [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %] [%# TODO: get total to prevent paging off then end of the list.. %] - limit, offset => (offset + limit)}) %]' [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %] @@ -69,10 +69,12 @@ PROCESS get_marc_attrs args=attrs; %] - [% attrs.title | html %] [% IF attrs.author %] / - [% attrs.author | html %] + [% attrs.author | html %] [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index 6b94fb614e..bf3ab0e8cd 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -9,7 +9,7 @@ [% l("Current Items Checked Out") %]
@@ -105,9 +105,13 @@ - [% attrs.title | html %] + [% attrs.title | html %] [% IF attrs.author %] / - [% attrs.author | html %] + [% attrs.author | html %] [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 index af464f503f..bc3cc6cfc0 100644 --- a/Open-ILS/src/templates/opac/myopac/hold_history.tt2 +++ b/Open-ILS/src/templates/opac/myopac/hold_history.tt2 @@ -11,7 +11,7 @@
[% l("Holds History") %] @@ -21,10 +21,10 @@
[% l("Previously Held Items") %] - [%# TODO: get total to prevent paging off then end of the list.. %] - @@ -62,12 +62,14 @@ diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index bb0e228f29..5a5be5b92d 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -10,7 +10,7 @@ [% l("Items on Hold") %]
@@ -62,11 +62,11 @@ [% l("Show") %]     [% IF CGI.param("available") %] - [% l('all') %] | + [% l('all') %] | [% l("only available") %] [% ELSE %] [% l("all") %] | - [% l("only available") %] + [% l("only available") %] [% END %]     [% l("holds") %]