[Rt-commit] rt branch, admin_ui, updated. 6aea67ab8d6e2e0c42b06326fc9b9bf08923ae5a
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Dec 22 21:09:30 EST 2009
The branch, admin_ui has been updated
via 6aea67ab8d6e2e0c42b06326fc9b9bf08923ae5a (commit)
from dbddf1e7bf90f76c449f897c7149ec7f27063b02 (commit)
Summary of changes:
lib/RT/View/Admin/Groups.pm | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 6aea67ab8d6e2e0c42b06326fc9b9bf08923ae5a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 23 10:09:09 2009 +0800
/admin/groups/(user|group)_rights views
diff --git a/lib/RT/View/Admin/Groups.pm b/lib/RT/View/Admin/Groups.pm
index 803f56c..2df2fab 100644
--- a/lib/RT/View/Admin/Groups.pm
+++ b/lib/RT/View/Admin/Groups.pm
@@ -149,16 +149,39 @@ template 'history' => page { title => _('Group History') } content {
};
template 'group_rights' => page { title => _('Group Rights for Group') }
- content {
+content {
my $self = shift;
+ show( 'rights', 'group' );
};
template 'user_rights' => page { title => _('User Rights for Group') } content {
my $self = shift;
+ show( 'rights', 'user' );
};
+private template 'rights' => sub {
+ my $self = shift;
+ my $type = shift || 'user';
+
+ my $class = 'Edit' . ucfirst($type) . 'Rights';
+ my $moniker = 'modify_' . $type . '_rights';
+
+ my $rights = new_action(
+ class => $class,
+ moniker => $moniker,
+ );
+
+ my $group = RT::Model::Group->new;
+ $group->load(get('id'));
+ $rights->object( $group );
+
+ with( name => $moniker ), form {
+ render_action($rights);
+ form_submit( label => _('Save') );
+ };
+};
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list