[open-ils-commits] [GIT] Evergreen ILS branch master updated. f3bed157bc524e5c88e07407fc56b1bfb8998406

Evergreen Git git at git.evergreen-ils.org
Fri Sep 30 12:33:18 EDT 2011


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, master has been updated
       via  f3bed157bc524e5c88e07407fc56b1bfb8998406 (commit)
      from  d34fa398b8d875524808a8005aa19fe65e107822 (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 f3bed157bc524e5c88e07407fc56b1bfb8998406
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Sep 30 12:19:35 2011 -0400

    TPac: propagate searches to advanced search page
    
    The link that takes users to the advanced searc page now propagates
    any existing (well, all) search URL params.  The change required some
    minor augmentation to the code that builds the advanced search form.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
index 1598b69..66ecea4 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
@@ -9,6 +9,19 @@
     queries = CGI.param('query');
     bools = CGI.param('bool') || ['and' x 3];
     qtypes = CGI.param('qtype') || ['keyword' x 3];
+
+    IF !qtypes.0; # not an array
+        qtypes = [qtypes];
+        bools = [bools];
+        queries = [queries];
+    END;
+
+    WHILE qtypes.size < 3;
+        qtypes.push('keyword');
+        bools.push('and');
+        queries.push('');
+    END;
+
     FOR qtype IN qtypes;
         c = contains.shift;
         b = bools.shift;
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index 1f1f0a8..79213d2 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -7,7 +7,7 @@
         <tr>
             <td colspan="3">
                 <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
-                <a href="[% ctx.opac_root %]/advanced"
+                <a href="[% mkurl(ctx.opac_root _ '/advanced') %]"
                     id="home_adv_search_link"><span
                     class="adv_search_font">[% l('Advanced Search') %]</span></a>
             </td>

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

Summary of changes:
 .../templates/opac/parts/advanced/global_row.tt2   |   13 +++++++++++++
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |    2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list