diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-08 23:19:40 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-08 23:19:40 +0200 |
commit | e383c069f1aeba49ea9905f77a51bf663e614b0e (patch) | |
tree | 8164aa9e1fad104997e53c6e261bec991631dbbb /app/Templates/task_show.php | |
parent | 8c6df9ef0cea757d25cbbcc6fa7cee86d8739627 (diff) |
Add public view for tasks
Diffstat (limited to 'app/Templates/task_show.php')
-rw-r--r-- | app/Templates/task_show.php | 95 |
1 files changed, 4 insertions, 91 deletions
diff --git a/app/Templates/task_show.php b/app/Templates/task_show.php index a152bf07..ece4c57c 100644 --- a/app/Templates/task_show.php +++ b/app/Templates/task_show.php @@ -1,75 +1,9 @@ -<div class="task-<?= $task['color_id'] ?> task-show-details"> - <h2><?= Helper\escape($task['title']) ?></h2> - <?php if ($task['score']): ?> - <span class="task-score"><?= Helper\escape($task['score']) ?></span> - <?php endif ?> - <ul> - <li> - <?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?> - </li> - <?php if ($task['date_modification']): ?> - <li> - <?= dt('Last modified on %B %e, %Y at %k:%M %p', $task['date_modification']) ?> - </li> - <?php endif ?> - <?php if ($task['date_completed']): ?> - <li> - <?= dt('Completed on %B %e, %Y at %k:%M %p', $task['date_completed']) ?> - </li> - <?php endif ?> - <?php if ($task['date_due']): ?> - <li> - <strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong> - </li> - <?php endif ?> - <?php if ($task['creator_username']): ?> - <li> - <?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?> - </li> - <?php endif ?> - <li> - <strong> - <?php if ($task['assignee_username']): ?> - <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?> - <?php else: ?> - <?= t('There is nobody assigned') ?> - <?php endif ?> - </strong> - </li> - <li> - <?= t('Column on the board:') ?> - <strong><?= Helper\escape($task['column_title']) ?></strong> - (<?= Helper\escape($task['project_name']) ?>) - </li> - <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li> - <?php if ($task['category_name']): ?> - <li> - <?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong> - </li> - <?php endif ?> - <li> - <?php if ($task['is_active'] == 1): ?> - <?= t('Status is open') ?> - <?php else: ?> - <?= t('Status is closed') ?> - <?php endif ?> - </li> - </ul> -</div> - -<?php if (! empty($task['description'])): ?> -<div id="description" class="task-show-section"> - <div class="page-header"> - <h2><?= t('Description') ?></h2> - </div> +<?= Helper\template('task_details', array('task' => $task, 'project' => $project)) ?> - <article class="markdown task-show-description"> - <?= Helper\parse($task['description']) ?: t('There is no description.') ?> - </article> -</div> -<?php endif ?> +<?= Helper\template('task_show_description', array('task' => $task)) ?> +<?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks)) ?> <?php if (! empty($files)): ?> <div id="attachments" class="task-show-section"> @@ -77,25 +11,4 @@ </div> <?php endif ?> - -<?php if (! empty($subtasks)): ?> -<div id="subtasks" class="task-show-section"> - <?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks)) ?> -</div> -<?php endif ?> - - -<?php if (! empty($comments)): ?> -<div id="comments" class="task-show-section"> - <div class="page-header"> - <h2><?= t('Comments') ?></h2> - </div> - - <?php foreach ($comments as $comment): ?> - <?= Helper\template('comment_show', array( - 'comment' => $comment, - 'task' => $task, - )) ?> - <?php endforeach ?> -</div> -<?php endif ?> +<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments)) ?> |