diff options
Diffstat (limited to 'app/Template/task')
-rw-r--r-- | app/Template/task/changes.php | 2 | ||||
-rw-r--r-- | app/Template/task/details.php | 26 | ||||
-rw-r--r-- | app/Template/task/dropdown.php | 16 | ||||
-rw-r--r-- | app/Template/task/show.php | 4 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 2 |
5 files changed, 27 insertions, 23 deletions
diff --git a/app/Template/task/changes.php b/app/Template/task/changes.php index 2c2bf267..6aa3d49b 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>'.t('New due date: ').$this->dt->date($task['date_due']).'</li>'; + echo '<li>'.t('New due date: ').$this->dt->datetime($task['date_due']).'</li>'; } break; case 'description': diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 24099a3c..cf305743 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -22,7 +22,7 @@ </li> <?php if (! empty($task['reference'])): ?> <li> - <strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span> + <strong><?= t('Reference:') ?></strong> <span><?= $this->task->renderReference($task) ?></span> </li> <?php endif ?> <?php if (! empty($task['score'])): ?> @@ -92,12 +92,6 @@ <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> @@ -116,6 +110,18 @@ </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 ?> + <?php if ($task['date_started']): ?> + <li> + <strong><?= t('Started:') ?></strong> + <span><?= $this->dt->datetime($task['date_started']) ?></span> + </li> + <?php endif ?> <li> <strong><?= t('Created:') ?></strong> <span><?= $this->dt->datetime($task['date_creation']) ?></span> @@ -130,12 +136,6 @@ <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> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index f35abc79..5135fb77 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -1,15 +1,17 @@ <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> - <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?> - <li> - <?= $this->url->icon('play', t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </li> + <?php if ($this->projectRole->canUpdateTask($task)): ?> + <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?> + <li> + <?= $this->url->icon('play', t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> + <?php endif ?> + <li> + <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> <?php endif ?> <li> - <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </li> - <li> <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 565f0632..892d62f2 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -18,7 +18,7 @@ 'task' => $task, 'subtasks' => $subtasks, 'project' => $project, - 'editable' => true, + 'editable' => $this->user->hasProjectAccess('SubtaskController', 'edit', $project['id']), )) ?> <?php endif ?> @@ -29,7 +29,7 @@ 'links' => $internal_links, 'project' => $project, 'link_label_list' => $link_label_list, - 'editable' => true, + 'editable' => $this->user->hasProjectAccess('TaskInternalLinkController', 'edit', $project['id']), 'is_public' => false, )) ?> <?php endif ?> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 952c3298..265c6ef0 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -29,12 +29,14 @@ <h2><?= t('Actions') ?></h2> </div> <ul> + <?php if ($this->projectRole->canUpdateTask($task)): ?> <li> <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> <?= $this->modal->medium('refresh fa-rotate-90', t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> + <?php endif ?> <li> <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> |