[open-ils-commits] [GIT] Evergreen ILS branch rel_2_6 updated. 8101fbb7374f93d88626104d91efbe048d8e6b1f

Evergreen Git git at git.evergreen-ils.org
Wed Feb 25 15:26:24 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_6 has been updated
       via  8101fbb7374f93d88626104d91efbe048d8e6b1f (commit)
      from  bd7fdad52897c6288406a95b0f78a76def9c221c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8101fbb7374f93d88626104d91efbe048d8e6b1f
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Wed Feb 25 15:20:51 2015 -0500

    lp1373203: Allow users to escape metarecord holds (backport version)
    
    Provides a means for users to escape a metarecord hold if they accidentally
    clicked the Advanced Hold Options link. A "Go Back" link will be
    provided to allow the user to return to a title hold. If the hold starts as a
    metarecord hold, this link won't display since we don't know which bib the
    patron wants.
    
    Also fixes an issue where the hold cancel button always returned the user to
    the previous screen.
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index 8c70ca5..a4feaca 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -91,10 +91,18 @@
                     [% END %]
                     [% IF NOT metarecords.disabled %]
                         [% IF CGI.param('hold_type') == 'T' AND hdata.record.metarecord %]
+                        <!-- Grab the bre_id so that we can restore it if user accidentally clicks advanced options -->
+                            [% bre_id = hdata.target.id %]
                             <a  id='advanced_hold_link'
-                                href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
+                                href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id, bre_id => bre_id}) %]">
                                 [% l('Advanced Hold Options') %]</a>
                         [% END %]
+                        [% IF CGI.param('hold_type') == 'M' AND CGI.param('bre_id') %]
+                            <input type="hidden" name="bre_id" value="[% CGI.param('bre_id') %]" />
+                            <a id='basic_hold_link'
+                               href="[% mkurl('', {hold_target => CGI.param('bre_id'), hold_type => 'T'}) %]">
+                                [% l('Go Back') %]</a>
+                        [% END %]
                         [% IF hdata.metarecord_filters.formats.size OR # should this be size > 1
                             (hdata.metarecord_filters.langs.size && hdata.metarecord_filters.langs.size > 1);
                             PROCESS metarecord_hold_filters_selector hold_data=hdata;
@@ -163,8 +171,7 @@
             value="[% l('Submit') %]" title="[% l('Submit') %]"
             alt="[% l('Submit') %]" class="opac-button" />
         [% END # some_holds_allowed %]
-        <input type="reset" name="cancel" onclick="javascript:history.go(-1);"
-            value="[% l('Cancel') %]" id="holds_cancel" class="opac-button" />
+        <input type="reset" name="cancel" onclick="window.location='[% redirect | html %]'" value="[% l('Cancel') %]" id="holds_cancel" class="opac-button" />
     </form>
 </div>
 

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/place_hold.tt2 |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list