[Rt-commit] r19362 - in rt/3.8/trunk: share/html/Admin/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Tue Apr 28 16:37:10 EDT 2009
Author: sartak
Date: Tue Apr 28 16:37:08 2009
New Revision: 19362
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Admin/Elements/SelectNewGroupMembers
Log:
r82574 at onn: sartak | 2009-04-28 16:36:45 -0400
Sort users in the add-members-to-group select box by how they'll be rendered
Modified: rt/3.8/trunk/share/html/Admin/Elements/SelectNewGroupMembers
==============================================================================
--- rt/3.8/trunk/share/html/Admin/Elements/SelectNewGroupMembers (original)
+++ rt/3.8/trunk/share/html/Admin/Elements/SelectNewGroupMembers Tue Apr 28 16:37:08 2009
@@ -49,9 +49,15 @@
<b><&|/l&>Users</&></b>
<br />
<select multiple="multiple" name="<% $Name %>Users" size="10">
-% while ( my $user = $users->Next ) {
+<%perl>
+my @users = sort { lc($a->[0]) cmp lc($b->[0]) }
+ map { [$m->scomp("/Elements/ShowUser", User => $_), $_] }
+ @{ $users->ItemsArrayRef };
+</%perl>
+% for (@users) {
+% my ($rendered, $user) = @$_;
% next if $SkipUsers->{ $user->id };
-<option value="User-<% $user->id %>"><& /Elements/ShowUser, User => $user &></option>
+<option value="User-<% $user->id %>"><% $rendered |n%></option>
% }
</select>
<br />
More information about the Rt-commit
mailing list