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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Dec 16 00:03:22 EST 2009


The branch, admin_ui has been updated
       via  ca458f446938bc6ec22399377737123dc3664941 (commit)
      from  f3d116f0d581c675c8e3d63ebe4467150a9f8f83 (commit)

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

- Log -----------------------------------------------------------------
commit ca458f446938bc6ec22399377737123dc3664941
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Dec 16 13:02:59 2009 +0800

    /admin/global/workflows/index.html view

diff --git a/lib/RT/View/Admin/Global/Workflows.pm b/lib/RT/View/Admin/Global/Workflows.pm
index b9ea707..137dd86 100644
--- a/lib/RT/View/Admin/Global/Workflows.pm
+++ b/lib/RT/View/Admin/Global/Workflows.pm
@@ -207,5 +207,45 @@ template 'transitions' => page {
     };
 }
 
+
+template 'index.html' => page {
+    title => _('Modify System Workflows'),
+} content {
+    my @list = RT::Workflow->new->list;
+    table {
+        row { th { _('Schema') };
+            th { _('Statuses') };
+            th { _('Queues') };
+        };
+
+        for my $schema ( @list ) {
+            my $obj = RT::Workflow->load( $schema );
+            row {
+                cell {
+                    a {
+                        attr {  href => RT->config->get('web_path')
+                              . '/admin/global/workflows/summary?name='
+                              . $schema } $schema;
+                    }
+                };
+                cell { join ', ', map _($_), $obj->valid };
+                cell { join ', ', map $_->name,
+                    @{$obj->queues->items_array_ref } };
+            }
+        };
+    };
+
+    my $moniker = 'create_workflow';
+    my $action = new_action(
+        class   => 'CreateWorkflow',
+        moniker => $moniker,
+    );
+    my $args = $action->arguments;
+    with( name => $moniker ), form {
+        render_action($action);
+        form_submit( label => _('Create') );
+    };
+}
+
 1;
 

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


More information about the Rt-commit mailing list