summaryrefslogtreecommitdiff
path: root/app/Template/dashboard/subtasks.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-15 18:31:47 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-15 18:31:47 -0400
commit67b836164997527b91452b19adbcb8aa3c5decf1 (patch)
treeb5876d311912e97b0592c7e208639f7b52813a75 /app/Template/dashboard/subtasks.php
parent108e867605dbc7ece4cbcbecc89a674e9c154a9b (diff)
Refactoring: added controlled middleware and changed response class
Diffstat (limited to 'app/Template/dashboard/subtasks.php')
-rw-r--r--app/Template/dashboard/subtasks.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php
new file mode 100644
index 00000000..ee6caf02
--- /dev/null
+++ b/app/Template/dashboard/subtasks.php
@@ -0,0 +1,43 @@
+<div class="page-header">
+ <h2><?= $this->url->link(t('My subtasks'), 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
+</div>
+<?php if ($paginator->isEmpty()): ?>
+ <p class="alert"><?= t('There is nothing assigned to you.') ?></p>
+<?php else: ?>
+ <table class="table-fixed table-small">
+ <tr>
+ <th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th>
+ <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
+ <th><?= $paginator->order(t('Task'), 'task_name') ?></th>
+ <th><?= $paginator->order(t('Subtask'), 'title') ?></th>
+ <th class="column-20"><?= t('Time tracking') ?></th>
+ </tr>
+ <?php foreach ($paginator->getCollection() as $subtask): ?>
+ <tr>
+ <td class="task-table color-<?= $subtask['color_id'] ?>">
+ <?= $this->render('task/dropdown', array('task' => array('id' => $subtask['task_id'], 'project_id' => $subtask['project_id']))) ?>
+ </td>
+ <td>
+ <?= $this->url->link($this->text->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
+ </td>
+ <td>
+ <?= $this->url->link($this->text->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
+ </td>
+ <td>
+ <?= $this->subtask->toggleStatus($subtask, $subtask['project_id']) ?>
+ </td>
+ <td>
+ <?php if (! empty($subtask['time_spent'])): ?>
+ <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?php endif ?>
+
+ <?php if (! empty($subtask['time_estimated'])): ?>
+ <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?php endif ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+
+ <?= $paginator ?>
+<?php endif ?>