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

Evergreen Git git at git.evergreen-ils.org
Wed Jul 18 12:24:24 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  288a86cbcc562ace01e0d6300803b242b9580f2d (commit)
      from  ca5bdf3f82277c4fba2693593f5901f91560dec1 (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 288a86cbcc562ace01e0d6300803b242b9580f2d
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jul 11 23:37:11 2012 -0400

    Add Journal Title search to stock TPAC filters
    
    Academics need access to a quick and easy Journal Title search, this
    gives it to them. Due to the requirement to combine search index + bib
    level, we define a special search index that can then be acted upon
    accordingly.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

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 005cae3..0280266 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -25,6 +25,12 @@ sub _prepare_biblio_search_basics {
 
         next unless $query =~ /\S/;
 
+        # Hack for journal title
+        my $q = $qtype;
+        if ($q eq 'jtitle') {
+            $qtype = 'title';
+        }
+
         # This stuff probably will need refined or rethought to better handle
         # the weird things Real Users will surely type in.
         $contains = "" unless defined $contains; # silence warning
@@ -41,6 +47,11 @@ sub _prepare_biblio_search_basics {
         }
         $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0;
 
+        # Hack for journal title - completed!
+        if ($q eq 'jtitle') {
+            $query = "bib_level:s $query";
+        }
+
         $bool = ($bool and $bool eq 'or') ? '||' : '&&';
         $full_query = $full_query ? "($full_query $bool $query)" : $query;
     }
diff --git a/Open-ILS/src/templates/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
index 98567d4..278111b 100644
--- a/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/qtype_selector.tt2
@@ -1,6 +1,7 @@
 [%  query_types = [
     {value => "keyword", label => l("Keyword")},
     {value => "title", label => l("Title")},
+    {value => "jtitle", label => l("Journal Title")},
     {value => "author", label => l("Author")},
     {value => "subject", label => l("Subject")},
     {value => "series", label => l("Series")},

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

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm |   11 +++++++++++
 .../src/templates/opac/parts/qtype_selector.tt2    |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list