[Rt-commit] rt branch, admin_ui, updated. eb31deb6f6d3b4c309b5f7354914a4f857efbf67
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Nov 27 01:38:42 EST 2009
The branch, admin_ui has been updated
via eb31deb6f6d3b4c309b5f7354914a4f857efbf67 (commit)
from b2a1eb32b730bf8517c9ea8c571466d98dfb3795 (commit)
Summary of changes:
lib/RT/View/Admin/Queues.pm | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit eb31deb6f6d3b4c309b5f7354914a4f857efbf67
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 27 14:38:09 2009 +0800
let user shoose if show disabled queues or not
diff --git a/lib/RT/View/Admin/Queues.pm b/lib/RT/View/Admin/Queues.pm
index 9a7f8e9..cc9202c 100644
--- a/lib/RT/View/Admin/Queues.pm
+++ b/lib/RT/View/Admin/Queues.pm
@@ -66,5 +66,37 @@ sub view_field_status_schema {
return $action->record->status_schema->name;
}
+template 'index.html' => page {
+ title => shift->page_title,
+} content {
+ my $self = shift;
+
+ form {
+ render_region(
+ name => $self->object_type.'-list',
+ path => $self->fragment_base_path.'/list',
+ );
+ }
+
+ my $include_disabled = get('include_disabled');
+ hyperlink(
+ label => _(
+ ( $include_disabled ? 'Exclude' : 'Include' )
+ . ' disabled queues in listing.'
+ ),
+ url => '/admin/queues',
+ $include_disabled
+ ? ()
+ : ( parameters => { include_disabled => 1, } ),
+ );
+};
+
+sub _current_collection {
+ my $self = shift;
+ my $collection = $self->SUPER::_current_collection( @_ );
+ $collection->{'find_disabled_rows'} = get('include_disabled');
+ return $collection;
+}
+
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list