[Rt-commit] rt branch, admin_ui, updated. 97d695c2afe34a2185f0c3c6e4dd0c82c6d6a6c3
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Dec 15 01:06:59 EST 2009
The branch, admin_ui has been updated
via 97d695c2afe34a2185f0c3c6e4dd0c82c6d6a6c3 (commit)
from 5c766b23f6c3574abeea65dc59bd9ff82dd25d23 (commit)
Summary of changes:
lib/RT/View/Admin/Global/Workflows.pm | 85 +++++++++++++++++++++++++++++++++
1 files changed, 85 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 97d695c2afe34a2185f0c3c6e4dd0c82c6d6a6c3
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Dec 15 14:06:43 2009 +0800
/admin/global/workflows/interface view
diff --git a/lib/RT/View/Admin/Global/Workflows.pm b/lib/RT/View/Admin/Global/Workflows.pm
index 71b735d..78eb73a 100644
--- a/lib/RT/View/Admin/Global/Workflows.pm
+++ b/lib/RT/View/Admin/Global/Workflows.pm
@@ -63,6 +63,91 @@ template 'localization' => page {
};
}
+template 'interface' => page {
+ title => _('Transitions Interface'),
+} content {
+ my $self = shift;
+ my $name = get('name');
+ my $moniker = 'modify_workflow_interface';
+ my $action = new_action(
+ class => 'EditWorkflowInterface',
+ moniker => $moniker,
+ );
+ $action->name( $name );
+ my $args = $action->arguments;
+ with( name => $moniker ), form {
+ my (%info);
+
+ for my $arg ( keys %$args ) {
+ next unless $arg =~ /(.*)___(label|action)___(.*)/;
+ $info{$2}{$1} ||= [];
+ push @{ $info{$2}{$1} }, $3;
+ }
+
+ for my $type (qw/label action/) {
+
+ h2 {
+ _(
+ $type eq 'label'
+ ? 'Transition Labels'
+ : 'Ticket Actions on Transitions'
+ );
+ };
+
+ table {
+ row {
+ th { _('From') };
+ th { ' ' };
+ th { _('To') };
+ th { _( ucfirst $type ) };
+ };
+ for my $from ( sort keys %{ $info{$type} } ) {
+ row {
+ cell {
+ attr { rowspan => scalar @{ $info{$type}{$from} } }
+ _($from);
+ };
+ cell {
+ attr { rowspan => scalar @{ $info{$type}{$from} } }
+ outs_raw('→');
+ };
+ for my $to ( @{ $info{$type}{$from} } ) {
+ if ( $to eq $info{$type}{$from}->[0] ) {
+ cell { _($to) };
+ cell {
+ outs_raw(
+ $action->form_field(
+ $from . "___${type}___" . $to
+ )
+ );
+ };
+ }
+ else {
+ row {
+ cell { _($to) };
+ cell {
+ outs_raw(
+ $action->form_field(
+ $from . "___${type}___" . $to
+ )
+ );
+ };
+ };
+ }
+ }
+ };
+ row {
+ cell { attr { colspan => 4 } ' ' };
+ };
+ }
+ };
+ }
+
+ 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