Cleanup and improvement of tasks lists

Removed duplicate code in task lists views (now using a single class
with constructor parameters). Added specific display for assigned tasks
that have missing dependencies.
This commit is contained in:
Emmanuel BENOîT 2012-02-06 17:57:56 +01:00
parent dae65c0b4b
commit 634ed8f5ee
5 changed files with 67 additions and 64 deletions
includes/t-items

View file

@ -277,7 +277,8 @@ class Ctrl_ItemTasks
{
$tasks = Loader::DAO( 'tasks' )->getTasksAt( $this->item );
return Loader::View( 'box' , 'Tasks' , Loader::View( 'tasks' , $tasks ) )
return Loader::View( 'box' , 'Tasks' , Loader::View( 'tasks_list' , $tasks , array(
'deps' , 'assigned' , 'completed' ) ) )
->addButton( BoxButton::create( 'Add task' , 'tasks/add?to=' . $this->item->id )
->setClass( 'list-add' ) );
}