[Rt-commit] rt branch, admin_ui, updated. f238541faa944be16c49b2fbf92c9ab9745f80dd
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jan 19 02:41:32 EST 2010
The branch, admin_ui has been updated
via f238541faa944be16c49b2fbf92c9ab9745f80dd (commit)
from 7ad889fef61decc4e163c28e0a9d3c25bb756bcb (commit)
Summary of changes:
lib/RT/View/CRUD.pm | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit f238541faa944be16c49b2fbf92c9ab9745f80dd
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jan 19 15:40:59 2010 +0800
customize new_item_controls to trans more args to list
diff --git a/lib/RT/View/CRUD.pm b/lib/RT/View/CRUD.pm
index 810644c..7f978fe 100644
--- a/lib/RT/View/CRUD.pm
+++ b/lib/RT/View/CRUD.pm
@@ -394,5 +394,36 @@ content {
};
};
+private template 'new_item_controls' => sub {
+ my $self = shift;
+ my $create = shift;
+ my ($object_type) = ( $self->object_type );
+
+ outs(
+ Jifty->web->form->submit(
+ label => _('Create'),
+ onclick => [
+ { submit => $create },
+ { refresh_self => 1 },
+ {
+ delete =>
+ Jifty->web->qualified_parent_region('no_items_found')
+ },
+ {
+ element => Jifty->web->current_region->parent->get_element(
+ 'div.crud-list'),
+ append => $self->fragment_for('view'),
+ args => {
+ object_type => $object_type,
+ id => { result_of => $create, name => 'id' },
+ custom_field => get('custom_field'),
+ queue => get('queue'),
+ },
+ },
+ ]
+ )
+ );
+};
+
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list