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

Evergreen Git git at git.evergreen-ils.org
Thu Aug 30 00:03:27 EDT 2012


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  ba451a7784ad4bc48ddc0b88bd4292ec3847984b (commit)
      from  e04cf39c019f7db506077a3c893cf81f99b0395a (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 ba451a7784ad4bc48ddc0b88bd4292ec3847984b
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Wed Aug 1 09:31:24 2012 -0400

    Add a new "starts with" search option to the advanced search page.
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index cfe8853..d613a7e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -44,6 +44,11 @@ sub _prepare_biblio_search_basics {
         } elsif ($contains eq 'exact') {
             $query =~ s/[\^\$]//g;
             $query = '^' . $query . '$';
+        } elsif ($contains eq 'starts') {
+            $query =~ s/"//g;
+            $query =~ s/[\^\$]//g;
+            $query = '^' . $query;
+            $query = ('"' . $query . '"') if index $query, ' ';
         }
         $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0;
 
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 3647fe7..ad0243a 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
@@ -3,7 +3,8 @@
         {value => 'contains', label => l('Contains')},
         {value => 'nocontains', label => l('Does not contain')},
         {value => 'phrase', label => l('Contains phrase')},
-        {value => 'exact', label => l('Matches exactly')}
+        {value => 'exact', label => l('Matches exactly')},
+        {value => 'starts', label => l('Starts with')}
     ];
     contains = CGI.param('contains');
     queries = CGI.param('query');

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

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm |    5 +++++
 .../templates/opac/parts/advanced/global_row.tt2   |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list