LP#1442701: prune 'message_id' and 'single' CGI params from TPAC dashboard links
authorGalen Charlton <gmc@esilibrary.com>
Fri, 10 Apr 2015 16:09:26 +0000 (16:09 +0000)
committerBen Shum <bshum@biblio.org>
Tue, 14 Apr 2015 20:24:02 +0000 (16:24 -0400)
This patch fixes a bug where if one goes to the single patron
message view in TPAC, clicking on the 'Message' button in the
dashboard button bar does not return one to the list of messages, but
instead takes the user back to the single message the user was
viewing.  This patch also prunes the CGI parameter from other
links in the patron dashboard.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/topnav.tt2

index 89d57c0..aca62a8 100644 (file)
@@ -24,7 +24,7 @@
                 <span class="dash_divider">|</span>
                 <span class="dash_account_buttons">
                 <div id="dash_user_message_button_container">
-                    <a href="[% mkurl(ctx.opac_root _ '/myopac/messages') %]" class="opac-button">
+                    <a href="[% mkurl(ctx.opac_root _ '/myopac/messages', {}, ['single', 'message_id']) %]" class="opac-button">
                         [% l('Messages') %]
                     </a>
                     [% IF ctx.user_stats.messages.unread %]
@@ -34,9 +34,9 @@
                         </div>
                     [% END %]
                 </div>
-                <a href="[% mkurl(ctx.opac_root _ '/myopac/main') %]" 
+                <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, ['single', 'message_id']) %]"
                     class="opac-button">[% l('My Account') %]</a>
-                <a href="[% mkurl(ctx.opac_root _ '/myopac/lists') %]" 
+                <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {}, ['single', 'message_id']) %]"
                     class="opac-button">[% l('My Lists') %]</a>
                 <a href="[% mkurl(ctx.opac_root _ '/logout', {}, 1) %]"
                     class="opac-button" id="logout_link">[% l('Logout') %]</a>
             </div>
             <div id="dashboard">
                 <span class="dash-align">
-                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/circs', {}, ['limit','offset'])
+                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/circs', {}, ['limit','offset', 'single', 'message_id'])
                         %]"><span id="dash_checked">[% ctx.user_stats.checkouts.total_out
                         %]</span> [% l("Checked Out") %]</a>
                 </span>
                 <span class="dash_divider">|</span>
                 <span class="dash-align">
-                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/holds', {}, ['available'])
+                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/holds', {}, ['available', 'single', 'message_id'])
                         %]"><span id="dash_holds">[% ctx.user_stats.holds.total
                         %]</span> [% l("On Hold") %]</a>
                 </span>
                 <span class="dash_divider">|</span>
                 <span class="dash-align">
                     <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/holds',
-                        {available => 1}) %]"><span id="dash_pickup">[%
+                        {available => 1}, ['single', 'message_id']) %]"><span id="dash_pickup">[%
                         ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]</a>
                 </span>
                 <span class="dash_divider">|</span>
                 <span class="dash-align">
-                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/main')
+                    <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, ['single', 'message_id'])
                         %]"><span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed)
                         %]</span> [% l("Fines") %]</a>
                 </span>