[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 1b1a28a710c9fab86fc11f4b6477f9e54cf469df

Evergreen Git git at git.evergreen-ils.org
Mon Sep 23 14:57:19 EDT 2013


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  1b1a28a710c9fab86fc11f4b6477f9e54cf469df (commit)
      from  de255eae610a76ce92d94b3b9785d407a8da9872 (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 1b1a28a710c9fab86fc11f4b6477f9e54cf469df
Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
Date:   Tue Sep 3 18:13:48 2013 +0300

    New advanced search filter size/layout options
    
    Allow setting the heights of the advanced search select boxes in
    config.tt2. Also provide colspan and rowspan for adjusting the layout
    of the filter boxes.
    
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
index 56fd012..0f8b43f 100644
--- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2
@@ -44,7 +44,9 @@
         END; %]
             <td valign='top'[% IF adv_chunk.js_only %] 
                 id='adv_chunk_[% adv_chunk.adv_special %]' 
-                class='hidden'[% END %]>
+                class='hidden'[% END %]
+		[% IF adv_chunk.colspan %]colspan='[% adv_chunk.colspan %]'[% END %]
+		[% IF adv_chunk.rowspan %]rowspan='[% adv_chunk.rowspan %]'[% END %]>
                 <strong>[% adv_chunk.adv_label %]</strong><br />
 [%
         IF adv_chunk.adv_special;
@@ -95,10 +97,10 @@
             END;
         ELSIF adv_chunk.adv_attr;
             INCLUDE "opac/parts/coded_value_selector.tt2"
-                attr=adv_chunk.adv_attr multiple="multiple" size="4";
+                attr=adv_chunk.adv_attr multiple="multiple" size=adv_chunk.adv_size || search.default_adv_select_height || "4";
         ELSIF adv_chunk.adv_filter;
             INCLUDE "opac/parts/filter_group_selector.tt2"
-                filter_group=adv_chunk.adv_filter multiple="multiple" size="4";
+                filter_group=adv_chunk.adv_filter multiple="multiple" size=adv_chunk.adv_size || search.default_adv_select_height || "4";
         END; %]
             </td>
 [%
diff --git a/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2 b/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
index 7d7a03a..7e6beb8 100644
--- a/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
@@ -13,6 +13,7 @@
     name = name || "fi:" _ attr_class;
     id = id || attr_class _ "_selector";
     values = values || CGI.param(name); 
+    IF size AND size < 1; size = all_values.size; END;
 -%]
 
 <select id='[% id %]' name='[% name %]'[%
diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2
index d798fb9..49e0e43 100644
--- a/Open-ILS/src/templates/opac/parts/config.tt2
+++ b/Open-ILS/src/templates/opac/parts/config.tt2
@@ -97,16 +97,20 @@ facet.default_display_count = 5;
 
 ##############################################################################
 # Define the advanced search limiters and labels.
+# Each entry is put into a table cell.
 # 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_size lets you set the height of the adv_attr or adv_filter select box.
+# if adv_size < 1, the box height is set to the number of options in it.
 # 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:
 #   lib_selector will put the search library box (with limit to available)
 #   pub_year will put the publication year box
 #   sort_selector will put the sort results selector
+# if present, colspan and rowspan will be used for the table cell.
 
 search.adv_config = [
     {adv_label => l("Item Type"), adv_attr => ["mattype", "item_type"]},
@@ -122,6 +126,9 @@ search.adv_config = [
     {adv_label => l("Sort Results"), adv_special => "sort_selector"},
 ];
 
+# Set the default height of the select boxes. Defaults to 4.
+#search.default_adv_select_height = 4;
+
 ##############################################################################
 # For each search box the default "query type" value can be specified here
 # This is the actual backend value, not the label
diff --git a/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2 b/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
index bede19e..239516d 100644
--- a/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
@@ -11,6 +11,7 @@
     id = id || group.code _ "_selector";
     class = class || '';
     values = values || CGI.param(name); 
+    IF size AND size < 1; size = group.entries.size; END;
 -%]
 
 <select id='[% id %]' class='[% class %]' name='[% name %]'[%

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

Summary of changes:
 .../src/templates/opac/parts/advanced/search.tt2   |    8 +++++---
 .../templates/opac/parts/coded_value_selector.tt2  |    1 +
 Open-ILS/src/templates/opac/parts/config.tt2       |    7 +++++++
 .../templates/opac/parts/filter_group_selector.tt2 |    1 +
 4 files changed, 14 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list