diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-04-08 13:58:25 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-04-08 13:58:25 -0400 |
commit | d7b0cfbbe57fae9afbf9637afa7e54d3bf708747 (patch) | |
tree | ced408d01329538bd34b659018a7cd11e04aa982 /app/Template/dashboard/subtasks.php | |
parent | fe9f3ba707d1caf9348ae17e0566eabd505fbce2 (diff) |
Improve dashboard
Diffstat (limited to 'app/Template/dashboard/subtasks.php')
-rw-r--r-- | app/Template/dashboard/subtasks.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php new file mode 100644 index 00000000..ccc08c59 --- /dev/null +++ b/app/Template/dashboard/subtasks.php @@ -0,0 +1,48 @@ +<div class="page-header"> + <h2><?= $this->url->link(t('My subtasks'), 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?> (<?= $nb_subtasks ?>)</h2> +</div> +<?php if ($nb_subtasks == 0): ?> + <p class="alert"><?= t('There is nothing assigned to you.') ?></p> +<?php else: ?> + <div class="table-list"> + <div class="table-list-header"> + <div class="table-list-header-count"> + <?php if ($nb_subtasks > 1): ?> + <?= t('%d subtasks', $nb_subtasks) ?> + <?php else: ?> + <?= t('%d subtask', $nb_subtasks) ?> + <?php endif ?> + </div> + <div class="table-list-header-menu"> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Sort') ?> <i class="fa fa-caret-down"></i></strong></a> + <ul> + <li> + <?= $paginator->order(t('Task ID'), \Kanboard\Model\TaskModel::TABLE.'.id') ?> + </li> + <li> + <?= $paginator->order(t('Title'), \Kanboard\Model\TaskModel::TABLE.'.title') ?> + </li> + <li> + <?= $paginator->order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?> + </li> + </ul> + </div> + </div> + </div> + + <?php foreach ($paginator->getCollection() as $task): ?> + <div class="table-list-row color-<?= $task['color_id'] ?>"> + <?= $this->render('task_list/task_title', array( + 'task' => $task, + )) ?> + + <?= $this->render('task_list/task_subtasks', array( + 'task' => $task, + )) ?> + </div> + <?php endforeach ?> + </div> + + <?= $paginator ?> +<?php endif ?> |