[open-ils-commits] [GIT] Evergreen ILS branch master updated. 83d70f918cb7f143e55778dd25dc8ac56d970674

Evergreen Git git at git.evergreen-ils.org
Fri Oct 28 10:30:28 EDT 2011


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  83d70f918cb7f143e55778dd25dc8ac56d970674 (commit)
      from  8081334e304d2fdcdd6126c60eceeebeb650495c (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 83d70f918cb7f143e55778dd25dc8ac56d970674
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Oct 27 13:03:26 2011 -0400

    TPac; sort coded value maps by label alphabetically
    
    Affects languages, formats, and audience.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

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 33469fe..0016b7a 100644
--- a/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
+++ b/Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
@@ -20,8 +20,14 @@
     size ? (' size="' _ size _ '"') : ''; %]>
 [% IF none_ok %]
     <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
-[% END %]
-[% FOR o IN all_values %]
+[% END;
+# turn the list of objects into a list of hashes to 
+# leverage TT's array.sort('<hashkey>') behavior
+sorter = [];
+FOR o IN all_values; 
+    sorter.push({code => o.code, value  => o.value}); 
+END;
+FOR o IN sorter.sort('value') %]
     <option value='[% o.code | uri %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value | html %]</option>
 [%  END -%]
 </select>

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

Summary of changes:
 .../templates/opac/parts/coded_value_selector.tt2  |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list