Moving tasks - buttons and empty form

This commit is contained in:
Emmanuel BENOîT 2016-01-03 09:54:47 +01:00
parent ff4a209d99
commit fd39819304
5 changed files with 76 additions and 4 deletions
includes/t-tasks

View file

@ -165,6 +165,10 @@ class Ctrl_TaskListSubtasks
Loader::View( 'tasks_list' , $this->task->subtasks , array( 'deps' , 'assigned' , 'completed' ) ) );
if ( $this->task->completed_by === null ) {
if ( !empty( $this->task->subtasks ) ) {
$box->addButton( BoxButton::create( 'Move sub-tasks' , 'tasks/move?type=s&id=' . $this->task->id )
->setClass( 'icon move' ) );
}
$box->addButton( BoxButton::create( 'Add sub-task' , 'tasks/add?parent=' . $this->task->id )
->setClass( 'list-add' ) );
}