Sort subscribers by status.

agranig/1_0_subfix
Andreas Granig 12 years ago
parent cc99beed76
commit d39a073efd

@ -152,7 +152,6 @@ sub create_list :Chained('sub_list') :PathPart('create') :Args(0) {
}
}
$c->log->debug(">>>>>>>>>>>>>>>>>>>>>>>>>> subscriber NOT validated");
$c->stash(close_target => $c->uri_for());
$c->stash(create_flag => 1);
$c->stash(form => $form)
@ -182,8 +181,8 @@ sub ajax :Chained('sub_list') :PathPart('ajax') :Args(0) {
my $dispatch_to = '_ajax_resultset_' . $c->user->auth_realm;
my $resultset = $self->$dispatch_to($c);
$c->forward( "/ajax_process_resultset", [$resultset,
["id", "username", "domain_id", "status",],
["username", "domain_id", "status",]]);
["id", "username", "domain_id", "contract_id", "status",],
["username", "domain_id", "contract_id", "status",]]);
$c->detach( $c->view("JSON") );
}

@ -21,6 +21,19 @@ $(document).ready(function() {
"bInfo": true,
"iDisplayLength": 5,
"sAjaxSource": "[% helper.ajax_uri %]",
[% IF helper.column_sort -%]
"aaSorting": [
[%
FOR f IN helper.column_fields;
IF helper.column_sort == f;
-%]
[ [% loop.index %], "asc" ],
[%
END;
END;
-%]
],
[% END -%]
"aoColumns": [
[% FOREACH f IN helper.column_fields -%]
{ "mData": "[% f %]" },

@ -3,8 +3,9 @@
helper.name = 'Subscriber';
helper.data = subscribers;
helper.messages = messages;
helper.column_titles = [ '#', 'Username', 'Domain #', 'Status' ];
helper.column_fields = [ 'id', 'username', 'domain_id', 'status' ];
helper.column_titles = [ '#', 'Username', 'Domain #', 'Contract #', 'Status' ];
helper.column_fields = [ 'id', 'username', 'domain_id', 'contract_id', 'status' ];
helper.column_sort = 'status';
helper.close_target = close_target;
helper.create_flag = create_flag;

Loading…
Cancel
Save