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

Evergreen Git git at git.evergreen-ils.org
Wed Aug 15 22:57:35 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  1985c8c0f648de38af415d0e0f5794d989b8171f (commit)
      from  a2268b95f4125b1e5102a7feaac79e9f402af59e (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 1985c8c0f648de38af415d0e0f5794d989b8171f
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Fri Aug 3 11:34:05 2012 -0400

    Expose ability to use filter groups in TPac
    
    Via config options for basic and advanced search.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 4328086a..5af1d2e 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -87,6 +87,9 @@
         ELSIF adv_chunk.adv_attr;
             INCLUDE "opac/parts/coded_value_selector.tt2"
                 attr=adv_chunk.adv_attr multiple="multiple" size="4";
+        ELSIF adv_chunk.adv_filter;
+            INCLUDE "opac/parts/filter_group_selector.tt2"
+                filter_group=adv_chunk.adv_filter multiple="multiple" size="4";
         END; %]
             </td>
 [%
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index f23ef4d..2985f1f 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -83,6 +83,7 @@ facet.display = [
 # adv_label is the (translated) label for the limiter
 # adv_attr is an array of possible limiters, the first one that has any
 #   values will be used
+# adv_filter is the same as adv_attr, but for search filter groups
 # adv_break will end the current row. If specified with a label/attr it
 #   will do so *after* that limiter.
 # adv_special will drop in a special entry:
@@ -111,4 +112,19 @@ search.adv_config = [
 
 search.default_qtypes = ['keyword','title','author'];
 
+##############################################################################
+# Basic Search Box definition
+# This allows selection of what, exactly, basic search uses for a selection
+# box. Previously it was hardcoded to use an attr box of mattype or item_type.
+#
+# type can be "attr" or "filter"
+# group is the attr or filter entries you want to check for
+# none_label is the label for the default nothing selected entry.
+
+search.basic_config = {
+    type => 'attr',
+    group => ['mattype','item_type'],
+    none_label => l("All Formats"),
+};
+
 %]
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index d20d36b..b75752f 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -10,8 +10,13 @@
             class="adv_search_font">[% l('Advanced Search') %]</span></a>
     </div>
     <div class="searchbar">[%- l('Search ');
-        INCLUDE "opac/parts/coded_value_selector.tt2"
-            attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats');
+        IF search.basic_config.type == 'attr';
+            INCLUDE "opac/parts/coded_value_selector.tt2"
+                attr=search.basic_config.group none_ok=1 none_label=search.basic_config.none_label;
+        ELSIF search.basic_config.type == 'filter';
+            INCLUDE "opac/parts/filter_group_selector.tt2"
+                filter_group=search.basic_config.group none_ok=1 none_label=search.basic_config.none_label;
+        END;
             l(' for ');
         %]
         <span class='search_box_wrapper'>

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

Summary of changes:
 .../src/templates/opac/parts/advanced/search.tt2   |    3 +++
 Open-ILS/src/templates/opac/parts/config.tt2       |   16 ++++++++++++++++
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |    9 +++++++--
 3 files changed, 26 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list