summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/analytics.php5
-rw-r--r--app/Template/task/changes.php6
-rw-r--r--app/Template/task/color_picker.php2
-rw-r--r--app/Template/task/comments.php2
-rw-r--r--app/Template/task/details.php234
-rw-r--r--app/Template/task/dropdown.php60
-rw-r--r--app/Template/task/layout.php9
-rw-r--r--app/Template/task/menu.php78
-rw-r--r--app/Template/task/public.php12
-rw-r--r--app/Template/task/recurring_info.php37
-rw-r--r--app/Template/task/remove.php4
-rw-r--r--app/Template/task/show.php40
-rw-r--r--app/Template/task/sidebar.php61
-rw-r--r--app/Template/task/time_tracking_details.php12
-rw-r--r--app/Template/task/time_tracking_summary.php6
-rw-r--r--app/Template/task/transitions.php12
16 files changed, 343 insertions, 237 deletions
diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php
index 306dd021..54eac2b7 100644
--- a/app/Template/task/analytics.php
+++ b/app/Template/task/analytics.php
@@ -1,3 +1,6 @@
+<div class="task-show-title color-<?= $task['color_id'] ?>">
+ <h2><?= $this->text->e($task['title']) ?></h2>
+</div>
<div class="page-header">
<h2><?= t('Analytics') ?></h2>
</div>
@@ -18,7 +21,7 @@
</tr>
<?php foreach ($time_spent_columns as $column): ?>
<tr>
- <td><?= $this->e($column['title']) ?></td>
+ <td><?= $this->text->e($column['title']) ?></td>
<td><?= $this->dt->duration($column['time_spent']) ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/task/changes.php b/app/Template/task/changes.php
index f288a8f4..779bdfa9 100644
--- a/app/Template/task/changes.php
+++ b/app/Template/task/changes.php
@@ -31,7 +31,7 @@
if (empty($task['date_due'])) {
echo '<li>'.t('The due date have been removed').'</li>';
} else {
- echo '<li>'.dt('New due date: %B %e, %Y', $task['date_due']).'</li>';
+ echo '<li>'.t('New due date: ').$this->dt->date($task['date_due']).'</li>';
}
break;
case 'description':
@@ -56,7 +56,7 @@
break;
case 'date_started':
if ($value != 0) {
- echo '<li>'.dt('Start date changed: %B %e, %Y', $task['date_started']).'</li>';
+ echo '<li>'.t('Start date changed: ').$this->dt->datetime($task['date_started']).'</li>';
}
break;
default:
@@ -68,7 +68,7 @@
</ul>
<?php if (! empty($changes['description'])): ?>
- <p><?= t('The description have been modified') ?></p>
+ <p><?= t('The description has been modified') ?></p>
<div class="markdown"><?= $this->text->markdown($task['description']) ?></div>
<?php endif ?>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/color_picker.php b/app/Template/task/color_picker.php
index a849b9ce..0c62fa70 100644
--- a/app/Template/task/color_picker.php
+++ b/app/Template/task/color_picker.php
@@ -3,7 +3,7 @@
<div
data-color-id="<?= $color_id ?>"
class="color-square color-<?= $color_id ?> <?= isset($values['color_id']) && $values['color_id'] === $color_id ? 'color-square-selected' : '' ?>"
- title="<?= $this->e($color_name) ?>">
+ title="<?= $this->text->e($color_name) ?>">
</div>
<?php endforeach ?>
</div>
diff --git a/app/Template/task/comments.php b/app/Template/task/comments.php
index 57fb305f..c22e39ec 100644
--- a/app/Template/task/comments.php
+++ b/app/Template/task/comments.php
@@ -28,7 +28,7 @@
'task_id' => $task['id'],
),
'errors' => array(),
- 'task' => $task
+ 'task' => $task,
)) ?>
<?php endif ?>
</div>
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index d885ca9c..61f6c848 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -1,104 +1,130 @@
-<div class="color-<?= $task['color_id'] ?> task-show-details">
- <h2><?= $this->e('#'.$task['id'].' '.$task['title']) ?></h2>
- <?php if ($task['score']): ?>
- <span class="task-score"><?= $this->e($task['score']) ?></span>
- <?php endif ?>
- <ul>
- <li>
- <strong><?= t('Priority: %d', $task['priority']) ?></strong>
- </li>
- <?php if ($task['reference']): ?>
- <li>
- <strong><?= t('Reference: %s', $task['reference']) ?></strong>
- </li>
- <?php endif ?>
- <?php if (! empty($task['swimlane_name'])): ?>
- <li>
- <?= t('Swimlane: %s', $task['swimlane_name']) ?>
- </li>
- <?php endif ?>
- <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_started']): ?>
- <li>
- <?= dt('Started on %B %e, %Y', $task['date_started']) ?>
- </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['time_estimated']): ?>
- <li>
- <?= t('Estimated time: %s hours', $task['time_estimated']) ?>
- </li>
- <?php endif ?>
- <?php if ($task['time_spent']): ?>
- <li>
- <?= t('Time spent: %s hours', $task['time_spent']) ?>
- </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><?= $this->e($task['column_title']) ?></strong>
- (<?= $this->e($task['project_name']) ?>)
- <?= dt('since %B %e, %Y at %k:%M %p', $task['date_moved']) ?>
- </li>
- <li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
- <?php if ($task['category_name']): ?>
- <li>
- <?= t('Category:') ?> <strong><?= $this->e($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>
- <?php if ($project['is_public']): ?>
- <li>
- <?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
- </li>
- <?php endif ?>
-
- <?php if ($editable && $task['recurrence_status'] != \Kanboard\Model\Task::RECURRING_STATUS_NONE): ?>
- <li>
- <strong><?= t('Recurring information') ?></strong>
- <?= $this->render('task/recurring_info', array(
- 'task' => $task,
- 'recurrence_trigger_list' => $recurrence_trigger_list,
- 'recurrence_timeframe_list' => $recurrence_timeframe_list,
- 'recurrence_basedate_list' => $recurrence_basedate_list,
- )) ?>
- </li>
- <?php endif ?>
- </ul>
-</div>
+<section id="task-summary">
+ <h2><?= $this->text->e($task['title']) ?></h2>
+ <div class="task-summary-container color-<?= $task['color_id'] ?>">
+ <div class="task-summary-column">
+ <ul class="no-bullet">
+ <li>
+ <strong><?= t('Status:') ?></strong>
+ <span>
+ <?php if ($task['is_active'] == 1): ?>
+ <?= t('open') ?>
+ <?php else: ?>
+ <?= t('closed') ?>
+ <?php endif ?>
+ </span>
+ </li>
+ <li>
+ <strong><?= t('Priority:') ?></strong> <span><?= $task['priority'] ?></span>
+ </li>
+ <?php if (! empty($task['reference'])): ?>
+ <li>
+ <strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if (! empty($task['score'])): ?>
+ <li>
+ <strong><?= t('Complexity:') ?></strong> <span><?= $this->text->e($task['score']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($project['is_public']): ?>
+ <li class="smaller">
+ <i class="fa fa-external-link fa-fw"></i>
+ <?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+ </div>
+ <div class="task-summary-column">
+ <ul class="no-bullet">
+ <?php if (! empty($task['category_name'])): ?>
+ <li>
+ <strong><?= t('Category:') ?></strong>
+ <span><?= $this->text->e($task['category_name']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if (! empty($task['swimlane_name'])): ?>
+ <li>
+ <strong><?= t('Swimlane:') ?></strong>
+ <span><?= $this->text->e($task['swimlane_name']) ?></span>
+ </li>
+ <?php endif ?>
+ <li>
+ <strong><?= t('Column:') ?></strong>
+ <span><?= $this->text->e($task['column_title']) ?></span>
+ </li>
+ <li>
+ <strong><?= t('Position:') ?></strong>
+ <span><?= $task['position'] ?></span>
+ </li>
+ </ul>
+ </div>
+ <div class="task-summary-column">
+ <ul class="no-bullet">
+ <li>
+ <strong><?= t('Assignee:') ?></strong>
+ <span>
+ <?php if ($task['assignee_username']): ?>
+ <?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('not assigned') ?>
+ <?php endif ?>
+ </span>
+ </li>
+ <?php if ($task['creator_username']): ?>
+ <li>
+ <strong><?= t('Creator:') ?></strong>
+ <span><?= $this->text->e($task['creator_name'] ?: $task['creator_username']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_due']): ?>
+ <li>
+ <strong><?= t('Due date:') ?></strong>
+ <span><?= $this->dt->date($task['date_due']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($task['time_estimated']): ?>
+ <li>
+ <strong><?= t('Time estimated:') ?></strong>
+ <span><?= t('%s hours', $task['time_estimated']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($task['time_spent']): ?>
+ <li>
+ <strong><?= t('Time spent:') ?></strong>
+ <span><?= t('%s hours', $task['time_spent']) ?></span>
+ </li>
+ <?php endif ?>
+ </ul>
+ </div>
+ <div class="task-summary-column">
+ <ul class="no-bullet">
+ <li>
+ <strong><?= t('Created:') ?></strong>
+ <span><?= $this->dt->datetime($task['date_creation']) ?></span>
+ </li>
+ <li>
+ <strong><?= t('Modified:') ?></strong>
+ <span><?= $this->dt->datetime($task['date_modification']) ?></span>
+ </li>
+ <?php if ($task['date_completed']): ?>
+ <li>
+ <strong><?= t('Completed:') ?></strong>
+ <span><?= $this->dt->datetime($task['date_completed']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_started']): ?>
+ <li>
+ <strong><?= t('Started:') ?></strong>
+ <span><?= $this->dt->datetime($task['date_started']) ?></span>
+ </li>
+ <?php endif ?>
+ <?php if ($task['date_moved']): ?>
+ <li>
+ <strong><?= t('Moved:') ?></strong>
+ <span><?= $this->dt->datetime($task['date_moved']) ?></span>
+ </li>
+ <?php endif ?>
+ </ul>
+ </div>
+ </div>
+</section>
diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php
new file mode 100644
index 00000000..3300ccf0
--- /dev/null
+++ b/app/Template/task/dropdown.php
@@ -0,0 +1,60 @@
+<div class="dropdown">
+ <a href="#" class="dropdown-menu">#<?= $task['id'] ?></a>
+ <ul>
+ <?php if (isset($task['date_started']) && empty($task['date_started'])): ?>
+ <li>
+ <i class="fa fa-play fa-fw"></i>
+ <?= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <i class="fa fa-pencil-square-o fa-fw"></i>
+ <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-align-left 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>
+ <li>
+ <i class="fa fa-plus fa-fw"></i>
+ <?= $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>
+ <li>
+ <i class="fa fa-files-o fa-fw"></i>
+ <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clipboard fa-fw"></i>
+ <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clone fa-fw"></i>
+ <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <?php if (isset($task['is_active'])): ?>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <i class="fa fa-times fa-fw"></i>
+ <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php else: ?>
+ <i class="fa fa-check-square-o fa-fw"></i>
+ <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php endif ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:task:dropdown') ?>
+ </ul>
+</div>
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
index 9fe1a716..9cbbfec9 100644
--- a/app/Template/task/layout.php
+++ b/app/Template/task/layout.php
@@ -2,6 +2,9 @@
<div class="page-header">
<ul>
<li>
+ <?= $this->render('task/menu', array('task' => $task)) ?>
+ </li>
+ <li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, $task['swimlane_id'] != 0 ? 'swimlane-'.$task['swimlane_id'] : '') ?>
</li>
@@ -17,12 +20,12 @@
<?php endif ?>
</ul>
</div>
- <section class="sidebar-container" id="task-section">
+ <section class="sidebar-container">
- <?= $this->render('task/sidebar', array('task' => $task)) ?>
+ <?= $this->render($sidebar_template, array('task' => $task)) ?>
<div class="sidebar-content">
- <?= $task_content_for_layout ?>
+ <?= $content_for_sublayout ?>
</div>
</section>
</section> \ No newline at end of file
diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php
new file mode 100644
index 00000000..cddd930a
--- /dev/null
+++ b/app/Template/task/menu.php
@@ -0,0 +1,78 @@
+<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
+<div class="dropdown">
+ <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
+ <ul>
+ <?php if (empty($task['date_started'])): ?>
+ <li>
+ <i class="fa fa-play fa-fw"></i>
+ <?= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <i class="fa fa-pencil-square-o fa-fw"></i>
+ <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-align-left 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>
+ <li>
+ <i class="fa fa-refresh fa-rotate-90 fa-fw"></i>
+ <?= $this->url->link(t('Edit recurrence'), 'TaskRecurrence', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-plus fa-fw"></i>
+ <?= $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>
+ <li>
+ <i class="fa fa-file fa-fw"></i>
+ <?= $this->url->link(t('Attach a document'), 'TaskFile', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-camera fa-fw"></i>
+ <?= $this->url->link(t('Add a screenshot'), 'TaskFile', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-files-o fa-fw"></i>
+ <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clipboard fa-fw"></i>
+ <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clone fa-fw"></i>
+ <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <i class="fa fa-times fa-fw"></i>
+ <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php else: ?>
+ <i class="fa fa-check-square-o fa-fw"></i>
+ <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php endif ?>
+ </li>
+ <?php if ($this->task->canRemove($task)): ?>
+ <li>
+ <i class="fa fa-trash-o fa-fw"></i>
+ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:task:menu') ?>
+ </ul>
+</div>
+<?php endif ?>
diff --git a/app/Template/task/public.php b/app/Template/task/public.php
index 7edf097c..0052214a 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -10,6 +10,12 @@
'is_public' => true,
)) ?>
+ <?= $this->render('subtask/show', array(
+ 'task' => $task,
+ 'subtasks' => $subtasks,
+ 'editable' => false
+ )) ?>
+
<?= $this->render('tasklink/show', array(
'task' => $task,
'links' => $links,
@@ -18,12 +24,6 @@
'is_public' => true,
)) ?>
- <?= $this->render('subtask/show', array(
- 'task' => $task,
- 'subtasks' => $subtasks,
- 'editable' => false
- )) ?>
-
<?= $this->render('task/comments', array(
'task' => $task,
'comments' => $comments,
diff --git a/app/Template/task/recurring_info.php b/app/Template/task/recurring_info.php
deleted file mode 100644
index 83ca0960..00000000
--- a/app/Template/task/recurring_info.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<ul>
- <?php if ($task['recurrence_status'] == \Kanboard\Model\Task::RECURRING_STATUS_PENDING): ?>
- <li><?= t('Recurrent task is scheduled to be generated') ?></li>
- <?php elseif ($task['recurrence_status'] == \Kanboard\Model\Task::RECURRING_STATUS_PROCESSED): ?>
- <li><?= t('Recurrent task has been generated:') ?>
- <ul>
- <li>
- <?= t('Trigger to generate recurrent task: ') ?><strong><?= $this->e($recurrence_trigger_list[$task['recurrence_trigger']]) ?></strong>
- </li>
- <li>
- <?= t('Factor to calculate new due date: ') ?><strong><?= $this->e($task['recurrence_factor']) ?></strong>
- </li>
- <li>
- <?= t('Timeframe to calculate new due date: ') ?><strong><?= $this->e($recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></strong>
- </li>
- <li>
- <?= t('Base date to calculate new due date: ') ?><strong><?= $this->e($recurrence_basedate_list[$task['recurrence_basedate']]) ?></strong>
- </li>
- </ul>
- </li>
- <?php endif ?>
-
- <?php if ($task['recurrence_parent'] || $task['recurrence_child']): ?>
- <?php if ($task['recurrence_parent']): ?>
- <li>
- <?= t('This task has been created by: ') ?>
- <?= $this->url->link('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php endif ?>
- <?php if ($task['recurrence_child']): ?>
- <li>
- <?= t('This task has created this child task: ') ?>
- <?= $this->url->link('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php endif ?>
- <?php endif ?>
-</ul> \ No newline at end of file
diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php
index 2f6edc22..eb0809b1 100644
--- a/app/Template/task/remove.php
+++ b/app/Template/task/remove.php
@@ -4,12 +4,12 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to remove this task: "%s"?', $this->e($task['title'])) ?>
+ <?= t('Do you really want to remove this task: "%s"?', $this->text->e($task['title'])) ?>
</p>
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index f6d47e53..5dc27ca1 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -1,45 +1,55 @@
+<?= $this->hook->render('template:task:show:top', array('task' => $task, 'project' => $project)) ?>
+
<?= $this->render('task/details', array(
'task' => $task,
'project' => $project,
- 'recurrence_trigger_list' => $this->task->recurrenceTriggers(),
- 'recurrence_timeframe_list' => $this->task->recurrenceTimeframes(),
- 'recurrence_basedate_list' => $this->task->recurrenceBasedates(),
'editable' => $this->user->hasProjectAccess('taskmodification', 'edit', $project['id']),
)) ?>
-<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $project['id'])): ?>
- <?= $this->render('task_modification/edit_time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
-<?php endif ?>
+<?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/description', array('task' => $task)) ?>
-<?= $this->render('tasklink/show', array(
- 'task' => $task,
- 'links' => $links,
- 'link_label_list' => $link_label_list,
- 'editable' => $this->user->hasProjectAccess('tasklink', 'edit', $project['id']),
- 'is_public' => false,
-)) ?>
+<?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('subtask/show', array(
'task' => $task,
'subtasks' => $subtasks,
'project' => $project,
'users_list' => isset($users_list) ? $users_list : array(),
- 'editable' => $this->user->hasProjectAccess('subtask', 'edit', $project['id']),
+ 'editable' => true,
+)) ?>
+
+<?= $this->hook->render('template:task:show:before-tasklinks', array('task' => $task, 'project' => $project)) ?>
+
+<?= $this->render('tasklink/show', array(
+ 'task' => $task,
+ 'links' => $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->render('file/show', array(
+<?= $this->hook->render('template:task:show:before-attachements', array('task' => $task, 'project' => $project)) ?>
+
+<?= $this->render('task_file/show', array(
'task' => $task,
'files' => $files,
'images' => $images
)) ?>
+<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?>
+
<?= $this->render('task/comments', array(
'task' => $task,
'comments' => $comments,
'project' => $project,
'editable' => $this->user->hasProjectAccess('comment', 'edit', $project['id']),
)) ?>
+
+<?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index f522c1c4..951c5095 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -1,5 +1,5 @@
<div class="sidebar">
- <h2><?= t('Information') ?></h2>
+ <h2><?= t('Task #%d', $task['id']) ?></h2>
<ul>
<li <?= $this->app->checkMenuSelection('task', 'show') ?>>
<?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
@@ -18,61 +18,16 @@
<?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
-
- <?= $this->hook->render('template:task:sidebar:information') ?>
- </ul>
- <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
- <h2><?= t('Actions') ?></h2>
- <ul>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'edit') ?>>
- <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'description') ?>>
- <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'recurrence') ?>>
- <?= $this->url->link(t('Edit recurrence'), 'taskmodification', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('subtask', 'create') ?>>
- <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('tasklink', 'create') ?>>
- <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
+ <?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
- <li <?= $this->app->checkMenuSelection('comment', 'create') ?>>
- <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>>
+ <?= $this->url->link(t('Internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
- <li <?= $this->app->checkMenuSelection('file', 'create') ?>>
- <?= $this->url->link(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <li <?= $this->app->checkMenuSelection('TaskExternalLink', 'show') ?>>
+ <?= $this->url->link(t('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
- <li <?= $this->app->checkMenuSelection('file', 'screenshot') ?>>
- <?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'duplicate') ?>>
- <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'copy') ?>>
- <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'move') ?>>
- <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskstatus') ?>>
- <?php if ($task['is_active'] == 1): ?>
- <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- <?php else: ?>
- <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- <?php endif ?>
- </li>
- <?php if ($this->task->canRemove($task)): ?>
- <li <?= $this->app->checkMenuSelection('task', 'remove') ?>>
- <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php endif ?>
- <?= $this->hook->render('template:task:sidebar:actions') ?>
+ <?= $this->hook->render('template:task:sidebar', array('task' => $task)) ?>
</ul>
- <?php endif ?>
- <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div>
- <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div>
</div>
diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php
index faa07cb8..c51b8f5a 100644
--- a/app/Template/task/time_tracking_details.php
+++ b/app/Template/task/time_tracking_details.php
@@ -1,3 +1,7 @@
+<div class="task-show-title color-<?= $task['color_id'] ?>">
+ <h2><?= $this->text->e($task['title']) ?></h2>
+</div>
+
<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
<h3><?= t('Subtask timesheet') ?></h3>
@@ -10,14 +14,14 @@
<th><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
<th class="column-20"><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
<th class="column-20"><?= $subtask_paginator->order(t('End'), 'end') ?></th>
- <th class="column-10"><?= $subtask_paginator->order(t('Time spent'), 'time_spent') ?></th>
+ <th class="column-10"><?= $subtask_paginator->order(t('Time spent'), \Kanboard\Model\SubtaskTimeTracking::TABLE.'.time_spent') ?></th>
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= t($record['subtask_title']) ?></td>
- <td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td>
- <td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td>
+ <td><?= $this->dt->datetime($record['start']) ?></td>
+ <td><?= $this->dt->datetime($record['end']) ?></td>
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/task/time_tracking_summary.php b/app/Template/task/time_tracking_summary.php
index 0210be7e..9886ccfa 100644
--- a/app/Template/task/time_tracking_summary.php
+++ b/app/Template/task/time_tracking_summary.php
@@ -5,9 +5,9 @@
</div>
<ul class="listing">
- <li><?= t('Estimate:') ?> <strong><?= $this->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
- <li><?= t('Spent:') ?> <strong><?= $this->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
- <li><?= t('Remaining:') ?> <strong><?= $this->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Estimate:') ?> <strong><?= $this->text->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Spent:') ?> <strong><?= $this->text->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
+ <li><?= t('Remaining:') ?> <strong><?= $this->text->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
</ul>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
index 2ca2387f..83040177 100644
--- a/app/Template/task/transitions.php
+++ b/app/Template/task/transitions.php
@@ -1,3 +1,7 @@
+<div class="task-show-title color-<?= $task['color_id'] ?>">
+ <h2><?= $this->text->e($task['title']) ?></h2>
+</div>
+
<div class="page-header">
<h2><?= t('Transitions') ?></h2>
</div>
@@ -15,10 +19,10 @@
</tr>
<?php foreach ($transitions as $transition): ?>
<tr>
- <td><?= dt('%B %e, %Y at %k:%M %p', $transition['date']) ?></td>
- <td><?= $this->e($transition['src_column']) ?></td>
- <td><?= $this->e($transition['dst_column']) ?></td>
- <td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= $this->dt->datetime($transition['date']) ?></td>
+ <td><?= $this->text->e($transition['src_column']) ?></td>
+ <td><?= $this->text->e($transition['dst_column']) ?></td>
+ <td><?= $this->url->link($this->text->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
<td><?= $this->dt->duration($transition['time_spent']) ?></td>
</tr>
<?php endforeach ?>