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

Evergreen Git git at git.evergreen-ils.org
Thu Feb 14 14:00:33 EST 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  9ae4a8e104d554332301670632a50493e2da1ff2 (commit)
       via  0c49049db5ed43f263bc960b5da06900b699f73a (commit)
      from  cf1e67373238132f159c8edffcc5236a00ef6e8a (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 9ae4a8e104d554332301670632a50493e2da1ff2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Feb 14 11:00:42 2013 -0500

    Don't sort filter group entries in the template
    
    They are now delivered sorted by 'pos', and the template sorting was
    ascii-betical anyway, which is incorrect.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

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 7d72cde..bede19e 100644
--- a/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
@@ -19,14 +19,9 @@
 [% IF none_ok %]
     <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
 [% END;
-# turn the list of objects into a list of hashes to 
-# leverage TT's array.sort('<hashkey>') behavior
-sorter = [];
-FOR o IN group.entries;
-    sorter.push({id => o.id, label => o.query.label, pos => o.pos}); 
-END;
-FOR o IN sorter.sort('pos') %]
-    <option value='[% o.id %]'[% values.grep(o.id).size ? ' selected="selected"' : '' %]>[% o.label | html %]</option>
+
+FOR o IN group.entries %]
+    <option value='[% o.id %]'[% values.grep(o.id).size ? ' selected="selected"' : '' %]>[% o.query.label | html %]</option>
 [%  END -%]
 </select>
 

commit 0c49049db5ed43f263bc960b5da06900b699f73a
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Feb 14 10:51:37 2013 -0500

    Sort search filter group entries by 'pos'
    
    We use a fleshed cstore call to grab search filter groups and their entries,
    but we don't currently sort them by their 'pos' field, which is it's purpose.
    cstore will apply order_by expressions to the applicable tables in a fleshed
    search/retrieve. This does that.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 660b20e..340f9f1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -559,7 +559,8 @@ sub load_search_filter_groups {
                     flesh_fields => {
                         asfg => ['entries'],
                         asfge => ['query']
-                    }
+                    },
+                    order_by => {asfge => 'pos'}
                 }
             ]);
             $cache{search_filter_groups}{$org_id} = $grps;

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

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm   |    3 ++-
 .../templates/opac/parts/filter_group_selector.tt2 |   11 +++--------
 2 files changed, 5 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list