[Rt-commit] rt branch, admin_ui, updated. 8966abaf49cb475c00799ff3a51f785e690011d5

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Dec 15 06:55:41 EST 2009


The branch, admin_ui has been updated
       via  8966abaf49cb475c00799ff3a51f785e690011d5 (commit)
      from  439846633052b607db99ce33dccb559d08b88265 (commit)

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

- Log -----------------------------------------------------------------
commit 8966abaf49cb475c00799ff3a51f785e690011d5
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Dec 15 19:55:19 2009 +0800

    /admin/global/workflows/transitions view

diff --git a/lib/RT/View/Admin/Global/Workflows.pm b/lib/RT/View/Admin/Global/Workflows.pm
index dea3aa7..b9ea707 100644
--- a/lib/RT/View/Admin/Global/Workflows.pm
+++ b/lib/RT/View/Admin/Global/Workflows.pm
@@ -64,7 +64,7 @@ template 'localization' => page {
 }
 
 template 'interface' => page {
-    title => _('Transitions Interface'),
+    title => _('Modify Transitions Interface'),
 } content {
     my $self    = shift;
     my $name = get('name');
@@ -150,7 +150,7 @@ template 'interface' => page {
 }
 
 template 'statuses' => page {
-    title => _('Workflow Statuses'),
+    title => _('Modify Workflow Statuses'),
 } content {
     my $self    = shift;
     my $name = get('name');
@@ -168,5 +168,44 @@ template 'statuses' => page {
     };
 }
 
+template 'transitions' => page {
+    title => _('Modify Transitions'),
+} content {
+    my $self    = shift;
+    my $name = get('name');
+    my $moniker = 'modify_workflow_transitions';
+    my $action = new_action(
+        class   => 'EditWorkflowTransitions',
+        moniker => $moniker,
+    );
+    $action->name( $name );
+    my $schema = RT::Workflow->new->load( $name );
+    my $args = $action->arguments;
+    with( name => $moniker ), form {
+        table {
+            row {
+                th { _('From') };
+                th {
+                    attr { rowspan => scalar $schema->valid + 1 }
+                      outs_raw('&rarr;');
+                };
+                th { _('To (check valid transitions)') };
+            };
+            for my $from ( keys %$args ) {
+                next if $from eq 'name';
+                row {
+                    th { _($from) };
+                    cell {
+                        outs_raw( $action->form_field($from) );
+                    };
+                }
+            }
+        };
+        input { type is 'hidden'; name is 'name'; value is $name };
+        outs_raw( $action->form_field('name') );
+        form_submit( label => _('Update') );
+    };
+}
+
 1;
 

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


More information about the Rt-commit mailing list