Integrate tooltips and code cleanup/fix bugs, see #166
This commit is contained in:
@@ -32,8 +32,8 @@ class Acl extends Base
|
||||
*/
|
||||
private $user_actions = array(
|
||||
'app' => array('index', 'preview'),
|
||||
'board' => array('index', 'show', 'save', 'check', 'changeassignee', 'updateassignee', 'changecategory', 'updatecategory', 'movecolumn', 'edit', 'update', 'add', 'confirm', 'remove'),
|
||||
'project' => array('index', 'show', 'exporttasks', 'exportdaily', 'share', 'edit', 'update', 'users', 'remove', 'duplicate', 'disable', 'enable', 'activity', 'search', 'tasks', 'create', 'save'),
|
||||
'board' => array('index', 'show', 'save', 'check', 'changeassignee', 'updateassignee', 'changecategory', 'updatecategory', 'movecolumn', 'edit', 'update', 'add', 'confirm', 'remove', 'subtasks', 'togglesubtask', 'attachments', 'comments', 'description'),
|
||||
'user' => array('edit', 'forbidden', 'logout', 'show', 'external', 'unlinkgoogle', 'unlinkgithub', 'sessions', 'removesession', 'last', 'notifications', 'password'),
|
||||
'comment' => array('create', 'save', 'confirm', 'remove', 'update', 'edit', 'forbidden'),
|
||||
'file' => array('create', 'save', 'download', 'confirm', 'remove', 'open', 'image'),
|
||||
|
||||
@@ -171,6 +171,28 @@ class SubTask extends Base
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the status of subtask
|
||||
*
|
||||
* Todo -> In progress -> Done -> Todo -> etc...
|
||||
*
|
||||
* @access public
|
||||
* @param integer $subtask_id
|
||||
* @return bool
|
||||
*/
|
||||
public function toggleStatus($subtask_id)
|
||||
{
|
||||
$subtask = $this->getById($subtask_id);
|
||||
|
||||
$values = array(
|
||||
'id' => $subtask['id'],
|
||||
'status' => ($subtask['status'] + 1) % 3,
|
||||
'task_id' => $subtask['task_id'],
|
||||
);
|
||||
|
||||
return $this->update($values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user