[Rt-commit] rt branch, admin_ui, updated. 4e2f89ce2861c33dfcdc79ccd05eb5e339788792
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 2 21:26:25 EST 2009
The branch, admin_ui has been updated
via 4e2f89ce2861c33dfcdc79ccd05eb5e339788792 (commit)
from 3083b5b2724cd09bb015582f5960f855fae18a27 (commit)
Summary of changes:
lib/RT/Action/EditUserRights.pm | 11 +++++++----
lib/RT/Action/EditWatchers.pm | 6 +++++-
2 files changed, 12 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 4e2f89ce2861c33dfcdc79ccd05eb5e339788792
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Dec 3 10:26:14 2009 +0800
render user with RT::View::Form::Field::SelectUser
diff --git a/lib/RT/Action/EditUserRights.pm b/lib/RT/Action/EditUserRights.pm
index 6f3d53d..454b40f 100644
--- a/lib/RT/Action/EditUserRights.pm
+++ b/lib/RT/Action/EditUserRights.pm
@@ -4,6 +4,7 @@ use warnings;
package RT::Action::EditUserRights;
use base qw/RT::Action::EditRights/;
+use RT::View::Form::Field::SelectUser;
use Scalar::Defer;
sub arguments {
@@ -23,13 +24,15 @@ sub arguments {
my $name = 'rights_' . $group->principal_id;
$args->{$name} = {
- default_value => defer {
- $self->default_value($group->principal_id) },
+ default_value => defer {
+ $self->default_value( $group->principal_id );
+ },
available_values => defer { $self->available_values },
render_as => 'Checkboxes',
multiple => 1,
- label => $user->member->object->real_name ||
- $user->member->object->name,
+ label => RT::View::Form::Field::SelectUser->_render_user(
+ $user->member->object
+ ),
};
}
return $args;
diff --git a/lib/RT/Action/EditWatchers.pm b/lib/RT/Action/EditWatchers.pm
index 62b4a49..58eb033 100644
--- a/lib/RT/Action/EditWatchers.pm
+++ b/lib/RT/Action/EditWatchers.pm
@@ -138,7 +138,11 @@ sub available_values {
my @users;
while ( my $user = $users->next ) {
push @users,
- { display => $user->name, value => $user->principal_id };
+ {
+ display =>
+ RT::View::Form::Field::SelectUser->_render_user($user),
+ value => $user->principal_id
+ };
}
return \@users;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list