summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/comments.php35
-rw-r--r--app/Template/task/description.php21
-rw-r--r--app/Template/task/details.php7
-rw-r--r--app/Template/task/public.php8
-rw-r--r--app/Template/task/show.php20
-rw-r--r--app/Template/task/sidebar.php20
6 files changed, 33 insertions, 78 deletions
diff --git a/app/Template/task/comments.php b/app/Template/task/comments.php
deleted file mode 100644
index c22e39ec..00000000
--- a/app/Template/task/comments.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php if (! empty($comments)): ?>
-<div id="comments" class="task-show-section">
- <div class="page-header">
- <h2>
- <?= t('Comments') ?>
- <span class="comment-sorting">
- <i class="fa fa-sort"></i>
- <?= $this->url->link(t('change sorting'), 'comment', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </span>
- </h2>
- </div>
-
- <?php foreach ($comments as $comment): ?>
- <?= $this->render('comment/show', array(
- 'comment' => $comment,
- 'task' => $task,
- 'project' => $project,
- 'editable' => $editable,
- 'is_public' => isset($is_public) && $is_public,
- )) ?>
- <?php endforeach ?>
-
- <?php if ($editable): ?>
- <?= $this->render('comment/create', array(
- 'skip_cancel' => true,
- 'values' => array(
- 'user_id' => $this->user->getId(),
- 'task_id' => $task['id'],
- ),
- 'errors' => array(),
- 'task' => $task,
- )) ?>
- <?php endif ?>
-</div>
-<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/description.php b/app/Template/task/description.php
index b84e9f42..9ffe8589 100644
--- a/app/Template/task/description.php
+++ b/app/Template/task/description.php
@@ -1,16 +1,9 @@
-<?php if (! empty($task['description'])): ?>
- <div id="description" class="task-show-section">
- <div class="page-header">
- <h2><?= t('Description') ?></h2>
- <ul>
- <li>
- <i class="fa fa-edit fa-fw"></i>
- <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
- </li>
- </ul>
- </div>
-
- <article class="markdown task-show-description">
+<section class="accordion-section <?= empty($task['description']) ? 'accordion-collapsed' : '' ?>">
+ <div class="accordion-title">
+ <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Description') ?></h3>
+ </div>
+ <div class="accordion-content">
+ <article class="markdown">
<?php if (! isset($is_public)): ?>
<?= $this->text->markdown(
$task['description'],
@@ -36,4 +29,4 @@
<?php endif ?>
</article>
</div>
-<?php endif ?> \ No newline at end of file
+</section> \ No newline at end of file
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index 61f6c848..a7c4ad01 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -32,6 +32,13 @@
<?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
+ <?php if ($project['is_public'] && !$editable): ?>
+ <li class="smaller">
+ <i class="fa fa-th fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?>
+ </li>
+ <?php endif ?>
+ <li class="smaller">
</ul>
</div>
<div class="task-summary-column">
diff --git a/app/Template/task/public.php b/app/Template/task/public.php
index 0052214a..723882c3 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -1,9 +1,6 @@
<section id="main" class="public-task">
-
<?= $this->render('task/details', array('task' => $task, 'project' => $project, 'editable' => false)) ?>
- <p class="pull-right"><?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
-
<?= $this->render('task/description', array(
'task' => $task,
'project' => $project,
@@ -24,12 +21,11 @@
'is_public' => true,
)) ?>
- <?= $this->render('task/comments', array(
+ <?= $this->render('comments/show', array(
'task' => $task,
'comments' => $comments,
'project' => $project,
'editable' => false,
'is_public' => true,
)) ?>
-
-</section> \ No newline at end of file
+</section>
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 5dc27ca1..98221bcf 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -7,11 +7,9 @@
)) ?>
<?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?>
-
<?= $this->render('task/description', array('task' => $task)) ?>
<?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?>
-
<?= $this->render('subtask/show', array(
'task' => $task,
'subtasks' => $subtasks,
@@ -20,23 +18,24 @@
'editable' => true,
)) ?>
-<?= $this->hook->render('template:task:show:before-tasklinks', array('task' => $task, 'project' => $project)) ?>
-
+<?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('tasklink/show', array(
'task' => $task,
- 'links' => $links,
+ 'links' => $internal_links,
'project' => $project,
'link_label_list' => $link_label_list,
'editable' => true,
'is_public' => false,
)) ?>
-<?= $this->hook->render('template:task:show:before-timetracking', array('task' => $task, 'project' => $project)) ?>
-
-<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
+<?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?>
+<?= $this->render('task_external_link/show', array(
+ 'task' => $task,
+ 'links' => $external_links,
+ 'project' => $project,
+)) ?>
<?= $this->hook->render('template:task:show:before-attachements', array('task' => $task, 'project' => $project)) ?>
-
<?= $this->render('task_file/show', array(
'task' => $task,
'files' => $files,
@@ -44,8 +43,7 @@
)) ?>
<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?>
-
-<?= $this->render('task/comments', array(
+<?= $this->render('comments/show', array(
'task' => $task,
'comments' => $comments,
'project' => $project,
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index e9af71a5..955b17c4 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -23,18 +23,6 @@
<?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
- <li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
- <i class="fa fa-tasks fa-fw"></i>
- <?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>>
- <i class="fa fa-code-fork fa-fw"></i>
- <?= $this->url->link(t('Internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('TaskExternalLink', 'show') ?>>
- <i class="fa fa-external-link fa-fw"></i>
- <?= $this->url->link(t('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
</ul>
<h2><?= t('Actions') ?></h2>
<ul>
@@ -55,6 +43,14 @@
<?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
+ <i class="fa fa-code-fork fa-fw"></i>
+ <?= $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-external-link fa-fw"></i>
+ <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
<i class="fa fa-comment-o fa-fw"></i>
<?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>