[Rt-commit] rt branch, admin_ui, updated. 9c48a2593ab0d6c04a6d7f6abf965d79b7982c99
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Dec 7 00:28:26 EST 2009
The branch, admin_ui has been updated
via 9c48a2593ab0d6c04a6d7f6abf965d79b7982c99 (commit)
from 4ffc2b7a10af2d74dae44c73c1afd9a53a904c24 (commit)
Summary of changes:
lib/RT/View/Admin/Groups.pm | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit 9c48a2593ab0d6c04a6d7f6abf965d79b7982c99
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 7 13:28:18 2009 +0800
add edit link to /admin/groups
diff --git a/lib/RT/View/Admin/Groups.pm b/lib/RT/View/Admin/Groups.pm
index f8580b7..e88e9b0 100644
--- a/lib/RT/View/Admin/Groups.pm
+++ b/lib/RT/View/Admin/Groups.pm
@@ -64,24 +64,22 @@ sub _current_collection {
return $c;
}
-=head2 view_field_name
+private template view_item_controls => sub {
-Display each group's name as a hyperlink to the modify page
-
-=cut
-
-sub view_field_name {
my $self = shift;
- my %args = @_;
+ my $record = shift;
- $self->view_via_callback(%args, callback => sub {
- my %args = @_;
+ if ( $record->current_user_can('update') ) {
hyperlink(
- label => $args{current_value},
- url => "/Admin/Groups/Modify.html?id=$args{id}",
+ label => _("Edit"),
+ class => "editlink",
+ onclick => {
+ popout => $self->fragment_for('update'),
+ args => { id => $record->id },
+ },
);
- });
-}
+ }
+};
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list