]> git.evergreen-ils.org Git - working/Evergreen.git/commit
TPAC: Preserve loc, query, qtype, and sort params
authorDan Scott <dan@coffeecode.net>
Fri, 6 Jan 2012 03:51:00 +0000 (22:51 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 18 Jan 2012 21:54:15 +0000 (16:54 -0500)
commita23bc8b1e3d884c275f28b158953b2d748952430
treedbbfe1b8cbb2c150a1e1143cb550d0de932018ec
parent27b2037d72b8a1c5025a885d571b5329232ffa58
TPAC: Preserve loc, query, qtype, and sort params

In some cases, mkurl() is not enough to preserve our desired CGI params
- such as when redirects are triggered from within a Perl module, or
forms are submitted. Accordingly, the following changes address these
cases where the chosen location / query / query type was being dropped:

* Switching between account preferences
* Creating / deleting / sharing / editing bookbags
* Moving items from temporary list to bookbags
* Adding notes to items in a bookbag
* Placing holds

The primary mechanism for forms is the "preserve_params.tt2" block that
can accept a "params" list of the CGI params that you want to preserve,
but which defaults to location/query/qtype/sort. Similarly, we add the
same preservation steps to the OpenILS::WWW::EGCatLoader::Account module
for most actions.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/myopac/lists.tt2
Open-ILS/src/templates/opac/parts/anon_list.tt2
Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
Open-ILS/src/templates/opac/parts/preserve_params.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/src/templates/opac/results.tt2