[Rt-commit] rt branch, admin_ui, updated. f23275bfbd7943a48ba9d5502f8ca23953de03a3

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Dec 2 02:28:30 EST 2009


The branch, admin_ui has been updated
       via  f23275bfbd7943a48ba9d5502f8ca23953de03a3 (commit)
      from  2e5736976998af45be6e94a1d626cee878e1b386 (commit)

Summary of changes:
 lib/RT/View/Admin/Queues.pm |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit f23275bfbd7943a48ba9d5502f8ca23953de03a3
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Dec 2 15:28:19 2009 +0800

    add /admin/queues/people.html

diff --git a/lib/RT/View/Admin/Queues.pm b/lib/RT/View/Admin/Queues.pm
index f359805..af7d071 100644
--- a/lib/RT/View/Admin/Queues.pm
+++ b/lib/RT/View/Admin/Queues.pm
@@ -150,6 +150,36 @@ template 'group_rights.html' => page { title => _('Modify group rights') } conte
     show( 'rights', 'group' );
 };
 
+template 'people.html' => page { title => _('Modify people') } content {
+    my $self = shift;
+    my $id = get('id');
+    unless ( $id ) {
+        Jifty->log->fatal( "need queue id parameter" );
+        return;
+    }
+
+    my $queue = RT::Model::Queue->new( current_user =>
+            Jifty->web->current_user );
+    my ( $ret, $msg ) = $queue->load( $id );
+    unless ( $ret ) {
+        Jifty->log->fatal( "failed to load queue $id: $msg" );
+        return;
+    }
+
+    my $action = new_action(
+        class   => 'EditWatchers',
+        moniker => 'modify_people',
+    );
+
+    $action->object($queue);
+
+    with ( name => 'modify_people' ), form {
+        input { type is 'hidden'; name is 'id'; value is $id };
+        render_action($action);
+        form_submit( label => _('Save') );
+    };
+};
+
 sub _current_collection {
     my $self = shift; 
     my $collection = $self->SUPER::_current_collection( @_ );

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


More information about the Rt-commit mailing list