[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 5af2c67f0345d6222b6323fbd3f56fd80c16da57

Evergreen Git git at git.evergreen-ils.org
Thu Feb 14 14:01:01 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, rel_2_3 has been updated
       via  5af2c67f0345d6222b6323fbd3f56fd80c16da57 (commit)
       via  ddb61e9a34fd6bd4419fb401dddcba250d75cdee (commit)
      from  e23d9a755a9ce1c51ef563f776526661b7623228 (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 5af2c67f0345d6222b6323fbd3f56fd80c16da57
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 ddb61e9a34fd6bd4419fb401dddcba250d75cdee
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 1ff7f5a..534ebaa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -551,7 +551,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