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

Evergreen Git git at git.evergreen-ils.org
Thu Sep 18 20:37:13 EDT 2014


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  995b6c4ae0112ec7f4419af3ef3c230ca32f0ea3 (commit)
      from  3a01aa7f189112220004d42e69f96bce3552124a (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 995b6c4ae0112ec7f4419af3ef3c230ca32f0ea3
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Tue Aug 26 15:49:45 2014 -0400

    lp1271198 Strip browse and facet parameters from links
    
    Browse and facet parameters were sticking to links to author, subject and
    series links on record and result pages, as well as some other links where
    the search parameters were no longer necessary. This commit:
    
    1. Adds browse_search_parms and facet_search_parms to header.tt2 as new
    classes of search parameters that one may want to remove.
    
    2. Removes these parameters from the author and subject links on the
    record page. It also uses the same method for removing search parameters
    from the author link on the search results page and on the searchbar
    Browse link.
    
    3. Fixes an issue where the advanced search links were inadvertently
    stripping general search parameters.
    
    4. Adds more parameters to the general_search_parms group so that we can
    have cleaner URLs.
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2
index 57c293c..b0d6883 100644
--- a/Open-ILS/src/templates/opac/parts/header.tt2
+++ b/Open-ILS/src/templates/opac/parts/header.tt2
@@ -14,7 +14,10 @@
 
     #variables to use to remove parameters via mkurk
     expert_search_parms = ['tag','subfield','term','_special'];
-    general_search_parms = ['page','sort','query'];
+    general_search_parms = ['page','sort','query','bool','contains','pubdate'];
+    browse_search_parms = ['fi:has_browse_entry','bterm','blimit','bpivot'];
+    facet_search_parms = ['facet'];
+
 
     # -----------------------------------------------------------------------------
     # mkurl( destination_page, params_to_set, params_to_clear )
diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index c8e5678..51fbe8f 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -91,7 +91,7 @@ BLOCK build_author_links;
                 supp_term = supp_term _ ' ' _ sf;
             END;
         END;
-        url = mkurl(ctx.opac_root _ '/results', {query => qterm.replace('^\s*(.*?)\s*$', '$1'), qtype => 'author'}, stop_parms.merge(expert_search_parms, general_search_parms));
+        url = mkurl(ctx.opac_root _ '/results', {query => qterm.replace('^\s*(.*?)\s*$', '$1'), qtype => 'author'}, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms));
         author_type = (tlabel || label) | html;
         
         # schema.org changes
diff --git a/Open-ILS/src/templates/opac/parts/record/series.tt2 b/Open-ILS/src/templates/opac/parts/record/series.tt2
index 0ddc378..4be6b83 100644
--- a/Open-ILS/src/templates/opac/parts/record/series.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/series.tt2
@@ -24,7 +24,7 @@ BLOCK render_series;
                 total_term = all_terms.join(" ").replace('\s+$', '');
 
                 url = mkurl(ctx.opac_root _ '/results',
-                    { qtype=>'series', query=>total_term }, stop_parms.merge(expert_search_parms, general_search_parms)
+                    { qtype=>'series', query=>total_term }, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms)
                 );
                 series = series _ '<a href="' _ url _ '">' _ single_term _ '</a> ';
             END;
diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
index 68c421b..e074f89 100644
--- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
@@ -47,7 +47,7 @@
                 all_terms.push(subfield.textContent.replace('\-', ' ').replace('[#"^$\+,\.:;&|\[\]()]', ''));
                 total_term = all_terms.join(" ").replace('\s+$', '');
             %]
-<a href="[% mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms.merge(expert_search_parms, general_search_parms)) %]">[% single_term %]</a>
+<a href="[% mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms)) %]">[% single_term %]</a>
             [%- END;
             IF all_terms.size; "<br/>"; END;
             FOREACH link880 IN graphics;
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index ef3734b..ff9cda9 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -114,7 +114,7 @@ END;
                                                                 class="record_author"
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
-                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
+                                                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
                                                                     -%]">[% attrs.author | html %]</a>
 [%-
 FOR entry IN attrs.graphic_authors;
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index ac594ee..5eb3873 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -6,9 +6,9 @@
     [%- END %]
     <div id="search-box">
         <span class="search_catalog_lbl mobile_hide">[% l('Search the Catalog') %]</span>
-        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {}, general_search_parms.merge(expert_search_parms)) %]"
+        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {},  expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]"
             id="home_adv_search_link">[% l('Advanced Search') %]</a></span>
-        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, ['fi:has_browse_entry']) %]">[% l('Browse the Catalog') %]</a></span>
+        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, expert_search_parms.merge(general_search_parms, facet_search_parms, ['fi:has_browse_entry'])) %]">[% l('Browse the Catalog') %]</a></span>
     </div>
     <div class="searchbar">
         <span class='search_box_wrapper'>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index a3cb0e1..92ae43c 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -47,7 +47,7 @@
                     <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]">[% l('Another Search') %]</a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="[% mkurl(ctx.opac_root _ '/advanced',{}, general_search_parms.merge(expert_search_parms)) %]">[% l('Advanced Search') %]</a>
+                    <a href="[% mkurl(ctx.opac_root _ '/advanced',{}, expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]">[% l('Advanced Search') %]</a>
                 </div>
                 <div id="refine_hits" class="results_header_btns result_block_visible"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
                 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>

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

Summary of changes:
 Open-ILS/src/templates/opac/parts/header.tt2       |    5 ++++-
 .../src/templates/opac/parts/record/authors.tt2    |    2 +-
 .../src/templates/opac/parts/record/series.tt2     |    2 +-
 .../src/templates/opac/parts/record/subjects.tt2   |    2 +-
 Open-ILS/src/templates/opac/parts/result/table.tt2 |    2 +-
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |    4 ++--
 Open-ILS/src/templates/opac/results.tt2            |    2 +-
 7 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list