看板初始化提交
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'tags' => $tags,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
)) ?>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Analytics') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<ul>
|
||||
<li><?= t('Lead time: ').'<strong>'.$this->dt->duration($lead_time) ?></strong></li>
|
||||
<li><?= t('Cycle time: ').'<strong>'.$this->dt->duration($cycle_time) ?></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><?= t('Time spent in each column') ?></h3>
|
||||
|
||||
<?= $this->app->component('chart-task-time-column', array(
|
||||
'metrics' => $time_spent_columns,
|
||||
'label' => t('Time spent'),
|
||||
)) ?>
|
||||
|
||||
<table class="table-striped">
|
||||
<tr>
|
||||
<th><?= t('Column') ?></th>
|
||||
<th><?= t('Time spent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($time_spent_columns as $column): ?>
|
||||
<tr>
|
||||
<td><?= $this->text->e($column['title']) ?></td>
|
||||
<td><?= $this->dt->duration($column['time_spent']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<ul>
|
||||
<li><?= t('The lead time is the duration between the task creation and the completion.') ?></li>
|
||||
<li><?= t('The cycle time is the duration between the start date and the completion.') ?></li>
|
||||
<li><?= t('If the task is not closed the current time is used instead of the completion date.') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php if (! empty($changes)): ?>
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
foreach ($changes as $field => $value) {
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
echo '<li>'.t('New title: %s', $task['title']).'</li>';
|
||||
break;
|
||||
case 'owner_id':
|
||||
if (empty($task['owner_id'])) {
|
||||
echo '<li>'.t('The task is not assigned anymore').'</li>';
|
||||
} else {
|
||||
echo '<li>'.t('New assignee: %s', $task['assignee_name'] ?: $task['assignee_username']).'</li>';
|
||||
}
|
||||
break;
|
||||
case 'category_id':
|
||||
if (empty($task['category_id'])) {
|
||||
echo '<li>'.t('There is no category now').'</li>';
|
||||
} else {
|
||||
echo '<li>'.t('New category: %s', $task['category_name']).'</li>';
|
||||
}
|
||||
break;
|
||||
case 'color_id':
|
||||
echo '<li>'.t('New color: %s', $this->text->in($task['color_id'], $this->task->getColors())).'</li>';
|
||||
break;
|
||||
case 'score':
|
||||
echo '<li>'.t('New complexity: %d', $task['score']).'</li>';
|
||||
break;
|
||||
case 'date_due':
|
||||
if (empty($task['date_due'])) {
|
||||
echo '<li>'.t('The due date has been removed').'</li>';
|
||||
} else {
|
||||
echo '<li>'.t('New due date: ').$this->dt->datetime($task['date_due']).'</li>';
|
||||
}
|
||||
break;
|
||||
case 'description':
|
||||
if (empty($task['description'])) {
|
||||
echo '<li>'.t('There is no description anymore').'</li>';
|
||||
}
|
||||
break;
|
||||
case 'recurrence_status':
|
||||
case 'recurrence_trigger':
|
||||
case 'recurrence_factor':
|
||||
case 'recurrence_timeframe':
|
||||
case 'recurrence_basedate':
|
||||
case 'recurrence_parent':
|
||||
case 'recurrence_child':
|
||||
echo '<li>'.t('Recurrence settings has been modified').'</li>';
|
||||
break;
|
||||
case 'time_spent':
|
||||
echo '<li>'.t('Time spent changed: %sh', $task['time_spent']).'</li>';
|
||||
break;
|
||||
case 'time_estimated':
|
||||
echo '<li>'.t('Time estimated changed: %sh', $task['time_estimated']).'</li>';
|
||||
break;
|
||||
case 'date_started':
|
||||
if ($value != 0) {
|
||||
echo '<li>'.t('Start date changed: ').$this->dt->datetime($task['date_started']).'</li>';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
echo '<li>'.t('The field "%s" has been updated', $field).'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php if (! empty($changes['description'])): ?>
|
||||
<p><strong><?= t('The description has been modified:') ?></strong></p>
|
||||
<?php if (isset($public)): ?>
|
||||
<div class="markdown"><?= $this->text->markdown($task['description'], true) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="markdown"><?= $this->text->markdown($task['description']) ?></div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<details class="accordion-section" <?= empty($task['description']) ? '' : 'open' ?>>
|
||||
<summary class="accordion-title"><?= t('Description') ?></summary>
|
||||
<div class="accordion-content">
|
||||
<article class="markdown">
|
||||
<?= $this->text->markdown($task['description'], isset($is_public) && $is_public) ?>
|
||||
</article>
|
||||
</div>
|
||||
</details>
|
||||
@@ -0,0 +1,173 @@
|
||||
<section id="task-summary">
|
||||
<h2><?= $this->text->e($task['title']) ?></h2>
|
||||
|
||||
<?= $this->hook->render('template:task:details:top', array('task' => $task)) ?>
|
||||
|
||||
<div class="task-summary-container color-<?= $task['color_id'] ?>">
|
||||
<div class="task-summary-columns">
|
||||
<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->task->renderReference($task) ?></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>
|
||||
<small>
|
||||
<?= $this->url->icon('external-link', t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
|
||||
</small>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if ($project['is_public'] && !$editable): ?>
|
||||
<li>
|
||||
<small>
|
||||
<?= $this->url->icon('th', t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?>
|
||||
</small>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:details:first-column', array('task' => $task)) ?>
|
||||
</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>
|
||||
|
||||
<?= $this->hook->render('template:task:details:second-column', array('task' => $task)) ?>
|
||||
</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>
|
||||
<?php if ($editable && $task['owner_id'] != $this->user->getId()): ?>
|
||||
- <span><?= $this->url->link(t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span>
|
||||
<?php endif ?>
|
||||
</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['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 ?>
|
||||
|
||||
<?= $this->hook->render('template:task:details:third-column', array('task' => $task)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-summary-column">
|
||||
<ul class="no-bullet">
|
||||
<?php if ($task['date_due']): ?>
|
||||
<li>
|
||||
<strong><?= t('Due date:') ?></strong>
|
||||
<span><?= $this->dt->datetime($task['date_due']) ?></span>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<strong><?= t('Started:') ?></strong>
|
||||
<?php if ($task['date_started']): ?>
|
||||
<span><?= $this->dt->datetime($task['date_started']) ?></span>
|
||||
<?php elseif ($editable): ?>
|
||||
<span><?= $this->url->link(t('Start now'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<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_moved']): ?>
|
||||
<li>
|
||||
<strong><?= t('Moved:') ?></strong>
|
||||
<span><?= $this->dt->datetime($task['date_moved']) ?></span>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:details:fourth-column', array('task' => $task)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (! empty($tags)): ?>
|
||||
<div class="task-tags">
|
||||
<ul>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<li class="task-tag <?= $tag['color_id'] ? "color-{$tag['color_id']}" : '' ?>"><?= $this->text->e($tag['name']) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($task['external_uri']) && ! empty($task['external_provider'])): ?>
|
||||
<?= $this->app->component('external-task-view', array(
|
||||
'url' => $this->url->href('ExternalTaskViewController', 'show', array('task_id' => $task['id'])),
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:details:bottom', array('task' => $task)) ?>
|
||||
</section>
|
||||
@@ -0,0 +1,80 @@
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong>#<?= $task['id'] ?> <i class="fa fa-caret-down"></i></strong></a>
|
||||
<ul>
|
||||
<?= $this->hook->render('template:task:dropdown:before-actions', array('task' => $task)) ?>
|
||||
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<?php if ($this->projectRole->canChangeAssignee($task) && array_key_exists('owner_id', $task) && $task['owner_id'] != $this->user->getId()): ?>
|
||||
<li>
|
||||
<?= $this->url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>
|
||||
<li>
|
||||
<?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-basic-actions', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-add-links', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-add-comment', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-add-attachments', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-duplicate-task', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:dropdown:after-send-mail', array('task' => $task)) ?>
|
||||
|
||||
<?php if ($this->projectRole->canRemoveTask($task)): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if (isset($task['is_active']) && $this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?>
|
||||
<li>
|
||||
<?php if ($task['is_active'] == 1): ?>
|
||||
<?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'])) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'])) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:dropdown', array('task' => $task)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<section id="main">
|
||||
<?= $this->projectHeader->render($project, 'TaskListController', 'show') ?>
|
||||
<?= $this->hook->render('template:task:layout:top', array('task' => $task)) ?>
|
||||
<section
|
||||
class="sidebar-container" id="task-view"
|
||||
data-edit-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>"
|
||||
data-subtask-url="<?= $this->url->href('SubtaskController', 'create', array('task_id' => $task['id'])) ?>"
|
||||
data-internal-link-url="<?= $this->url->href('TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>"
|
||||
data-comment-url="<?= $this->url->href('CommentController', 'create', array('task_id' => $task['id'])) ?>">
|
||||
|
||||
<?= $this->render($sidebar_template, array('task' => $task)) ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<?= $content_for_sublayout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -0,0 +1,36 @@
|
||||
<section id="main" class="public-task">
|
||||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'tags' => $tags,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task/description', array(
|
||||
'task' => $task,
|
||||
'project' => $project,
|
||||
'is_public' => true,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('subtask/show', array(
|
||||
'task' => $task,
|
||||
'subtasks' => $subtasks,
|
||||
'editable' => false
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_internal_link/show', array(
|
||||
'task' => $task,
|
||||
'links' => $links,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
'is_public' => true,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_comments/show', array(
|
||||
'task' => $task,
|
||||
'comments' => $comments,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
'is_public' => true,
|
||||
)) ?>
|
||||
</section>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?= $this->hook->render('template:task:show:top', array('task' => $task, 'project' => $project)) ?>
|
||||
|
||||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'tags' => $tags,
|
||||
'project' => $project,
|
||||
'editable' => $this->user->hasProjectAccess('TaskModificationController', 'edit', $project['id']),
|
||||
)) ?>
|
||||
|
||||
<?= $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,
|
||||
'project' => $project,
|
||||
'editable' => $this->user->hasProjectAccess('SubtaskController', 'edit', $project['id']),
|
||||
)) ?>
|
||||
|
||||
<?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
|
||||
<?= $this->render('task_internal_link/show', array(
|
||||
'task' => $task,
|
||||
'links' => $internal_links,
|
||||
'project' => $project,
|
||||
'link_label_list' => $link_label_list,
|
||||
'editable' => $this->user->hasProjectAccess('TaskInternalLinkController', 'edit', $project['id']),
|
||||
'is_public' => false,
|
||||
)) ?>
|
||||
|
||||
<?= $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-attachments', 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/show', array(
|
||||
'task' => $task,
|
||||
'comments' => $comments,
|
||||
'project' => $project,
|
||||
'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']),
|
||||
)) ?>
|
||||
|
||||
<?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?>
|
||||
@@ -0,0 +1,109 @@
|
||||
<div class="sidebar sidebar-icons">
|
||||
<div class="sidebar-title">
|
||||
<h2><?= t('Task #%d', $task['id']) ?></h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li <?= $this->app->checkMenuSelection('TaskViewController', 'show') ?>>
|
||||
<?= $this->url->icon('newspaper-o', t('Summary'), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('ActivityController', 'task') ?>>
|
||||
<?= $this->url->icon('dashboard', t('Activity stream'), 'ActivityController', 'task', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('TaskViewController', 'transitions') ?>>
|
||||
<?= $this->url->icon('arrows-h', t('Transitions'), 'TaskViewController', 'transitions', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('TaskViewController', 'analytics') ?>>
|
||||
<?= $this->url->icon('bar-chart', t('Analytics'), 'TaskViewController', 'analytics', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
|
||||
<li <?= $this->app->checkMenuSelection('TaskViewController', 'timetracking') ?>>
|
||||
<?= $this->url->icon('clock-o', t('Time tracking'), 'TaskViewController', 'timetracking', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:information', array('task' => $task)) ?>
|
||||
</ul>
|
||||
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<div class="sidebar-title">
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
</div>
|
||||
<ul>
|
||||
<?= $this->hook->render('template:task:sidebar:before-actions', array('task' => $task)) ?>
|
||||
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<li>
|
||||
<?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('refresh fa-rotate-90', t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-basic-actions', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-add-links', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-add-comment', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskFileController', 'screenshot', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-add-attachments', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-duplicate-task', array('task' => $task)) ?>
|
||||
|
||||
<li>
|
||||
<?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?= $this->hook->render('template:task:sidebar:after-send-mail', array('task' => $task)) ?>
|
||||
|
||||
<?php if ($task['is_active'] == 1 && $this->projectRole->isSortableColumn($task['project_id'], $task['column_id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->small('arrows', t('Move position'), 'TaskMovePositionController', 'show', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?>
|
||||
<?php if ($task['is_active'] == 1): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->projectRole->canRemoveTask($task)): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'redirect' => 'board')) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:actions', array('task' => $task)) ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'tags' => $tags,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
|
||||
|
||||
<h3><?= t('Subtask timesheet') ?></h3>
|
||||
<?php if ($subtask_paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('There is nothing to show.') ?></p>
|
||||
<?php else: ?>
|
||||
<table class="table-fixed table-scrolling">
|
||||
<tr>
|
||||
<th class="column-15"><?= $subtask_paginator->order(t('User'), 'username') ?></th>
|
||||
<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'), \Kanboard\Model\SubtaskTimeTrackingModel::TABLE.'.time_spent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
|
||||
<tr>
|
||||
<td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'UserViewController', 'show', array('user_id' => $record['user_id'])) ?></td>
|
||||
<td><?= t($record['subtask_title']) ?></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 ?>
|
||||
</table>
|
||||
|
||||
<?= $subtask_paginator ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Time tracking') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<ul>
|
||||
<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>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'tags' => $tags,
|
||||
'project' => $project,
|
||||
'editable' => false,
|
||||
)) ?>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Transitions') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($transitions)): ?>
|
||||
<p class="alert"><?= t('There is nothing to show.') ?></p>
|
||||
<?php else: ?>
|
||||
<table class="table-striped table-scrolling">
|
||||
<tr>
|
||||
<th><?= t('Date') ?></th>
|
||||
<th><?= t('Source column') ?></th>
|
||||
<th><?= t('Destination column') ?></th>
|
||||
<th><?= t('Executer') ?></th>
|
||||
<th><?= t('Time spent in the column') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($transitions as $transition): ?>
|
||||
<tr>
|
||||
<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']), 'UserViewController', 'show', array('user_id' => $transition['user_id'])) ?></td>
|
||||
<td><?= $this->dt->duration($transition['time_spent']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user