diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-02-21 17:43:15 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-02-21 17:43:15 -0500 |
commit | 3a56d215fc9797352fc523d51a7ba8d10ba01a80 (patch) | |
tree | 9e6d84ff8186ef65b37de24a1f292ce363b71703 /app/Template/board | |
parent | b9dd69853d1398148c7cc2a68c483e01b68882f9 (diff) |
Add task menu in collapsed mode
Diffstat (limited to 'app/Template/board')
-rw-r--r-- | app/Template/board/swimlane.php | 2 | ||||
-rw-r--r-- | app/Template/board/task_menu.php | 13 | ||||
-rw-r--r-- | app/Template/board/task_private.php (renamed from app/Template/board/task.php) | 17 |
3 files changed, 16 insertions, 16 deletions
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php index 08efdd11..ec298e24 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/swimlane.php @@ -65,7 +65,7 @@ <?php endif ?> <?php foreach ($column['tasks'] as $task): ?> - <?= $this->render($not_editable ? 'board/task_public' : 'board/task', array( + <?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array( 'project' => $project, 'task' => $task, 'categories' => $categories, diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php new file mode 100644 index 00000000..e7e0f419 --- /dev/null +++ b/app/Template/board/task_menu.php @@ -0,0 +1,13 @@ +<ul class="dropdown"> + <li> + <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a> + <ul> + <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-comment-o"></i> <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li> + </ul> + </li> +</ul>
\ No newline at end of file diff --git a/app/Template/board/task.php b/app/Template/board/task_private.php index f3014dfa..efc5bacf 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task_private.php @@ -6,27 +6,14 @@ data-task-url="<?= $this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" title="<?= t('View this task') ?>"> + <?= $this->render('board/task_menu', array('task' => $task)) ?> + <div class="task-board-collapsed" style="display: none"> - <?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-id') ?> <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?> </div> <div class="task-board-expanded"> - <ul class="dropdown"> - <li> - <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a> - <ul> - <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-comment-o"></i> <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li> - </ul> - </li> - </ul> - <?php if ($task['reference']): ?> <span class="task-board-reference" title="<?= t('Reference') ?>"> (<?= $task['reference'] ?>) |