Enhancements to Task

This commit is contained in:
Deon George
2013-05-02 19:52:19 +10:00
parent 04ebda2aaa
commit e73ff93a70
8 changed files with 162 additions and 122 deletions

View File

@@ -9,19 +9,21 @@
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Admin_Task extends Controller_TemplateDefault_Admin {
class Controller_Admin_Task extends Controller_Task {
protected $auth_required = TRUE;
protected $secure_actions = array(
'listlog'=>TRUE,
'log'=>TRUE,
);
/**
* Show a list of tasks run
*/
public function action_listlog() {
Block::add(array(
'title'=>_('Task Log'),
'body'=>Table::display(
ORM::factory('Task_Log')->order_by('id','DESC')->find_all(),
public function action_log() {
Block::factory()
->title(_('Task Log'))
->body(Table::display(
ORM::factory('Task_Log')->find_all(),
25,
array(
'id'=>array('label'=>'ID','url'=>URL::link('admin','task/view/')),
@@ -32,8 +34,7 @@ class Controller_Admin_Task extends Controller_TemplateDefault_Admin {
),
array(
'page'=>TRUE,
)),
));
)));
}
}
?>

View File

@@ -0,0 +1,15 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Admin TASK management
*
* @package Task
* @category Controllers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Task extends Controller_TemplateDefault {
protected $auth_required = FALSE;
}
?>