Integrate tooltips and code cleanup/fix bugs, see #166

This commit is contained in:
Frédéric Guillot
2014-11-24 21:32:03 -05:00
parent 5d7cff3526
commit 37c6616e50
20 changed files with 464 additions and 35 deletions

View File

@@ -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'),

View File

@@ -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
*