diff options
Diffstat (limited to 'app/Template/task')
-rw-r--r-- | app/Template/task/analytics.php | 12 | ||||
-rw-r--r-- | app/Template/task/color_picker.php | 11 | ||||
-rw-r--r-- | app/Template/task/details.php | 262 | ||||
-rw-r--r-- | app/Template/task/dropdown.php | 12 | ||||
-rw-r--r-- | app/Template/task/layout.php | 1 | ||||
-rw-r--r-- | app/Template/task/public.php | 7 | ||||
-rw-r--r-- | app/Template/task/show.php | 87 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 12 | ||||
-rw-r--r-- | app/Template/task/time_tracking_details.php | 11 | ||||
-rw-r--r-- | app/Template/task/transitions.php | 11 |
10 files changed, 222 insertions, 204 deletions
diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php index db2d0cef..071f24a7 100644 --- a/app/Template/task/analytics.php +++ b/app/Template/task/analytics.php @@ -1,6 +1,10 @@ -<div class="task-show-title color-<?= $task['color_id'] ?>"> - <h2><?= $this->text->e($task['title']) ?></h2> -</div> +<?= $this->render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> + <div class="page-header"> <h2><?= t('Analytics') ?></h2> </div> @@ -14,7 +18,7 @@ <h3 id="analytic-task-time-column"><?= t('Time spent into each column') ?></h3> <div id="chart" data-metrics='<?= json_encode($time_spent_columns, JSON_HEX_APOS) ?>' data-label="<?= t('Time spent') ?>"></div> -<table class="table-stripped"> +<table class="table-striped"> <tr> <th><?= t('Column') ?></th> <th><?= t('Time spent') ?></th> diff --git a/app/Template/task/color_picker.php b/app/Template/task/color_picker.php deleted file mode 100644 index 0c62fa70..00000000 --- a/app/Template/task/color_picker.php +++ /dev/null @@ -1,11 +0,0 @@ -<div class="color-picker"> -<?php foreach ($colors_list as $color_id => $color_name): ?> - <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->text->e($color_name) ?>"> - </div> -<?php endforeach ?> -</div> - -<?= $this->form->hidden('color_id', $values) ?>
\ No newline at end of file diff --git a/app/Template/task/details.php b/app/Template/task/details.php index fe2bba67..a39c1bab 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -4,150 +4,164 @@ <?= $this->hook->render('template:task:details:top', array('task' => $task)) ?> <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') ?> + <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->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 ?> - </span> - </li> - <li> - <strong><?= t('Priority:') ?></strong> <span><?= $task['priority'] ?></span> - </li> - <?php if (! empty($task['reference'])): ?> + <?php if ($project['is_public']): ?> <li> - <strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span> + <small> + <i class="fa fa-external-link fa-fw"></i> + <?= $this->url->link(t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> + </small> </li> - <?php endif ?> - <?php if (! empty($task['score'])): ?> + <?php endif ?> + <?php if ($project['is_public'] && !$editable): ?> <li> - <strong><?= t('Complexity:') ?></strong> <span><?= $this->text->e($task['score']) ?></span> + <small> + <i class="fa fa-th fa-fw"></i> + <?= $this->url->link(t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> + </small> </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'), 'TaskViewController', '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'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> - </li> - <?php endif ?> - <li class="smaller"> + <?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'])): ?> + <?= $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('Category:') ?></strong> - <span><?= $this->text->e($task['category_name']) ?></span> + <strong><?= t('Column:') ?></strong> + <span><?= $this->text->e($task['column_title']) ?></span> </li> - <?php endif ?> - <?php if (! empty($task['swimlane_name'])): ?> <li> - <strong><?= t('Swimlane:') ?></strong> - <span><?= $this->text->e($task['swimlane_name']) ?></span> + <strong><?= t('Position:') ?></strong> + <span><?= $task['position'] ?></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') ?> + <?= $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> + </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 ?> - </span> - </li> - <?php if ($task['creator_username']): ?> + <?php if ($task['time_spent']): ?> <li> - <strong><?= t('Creator:') ?></strong> - <span><?= $this->text->e($task['creator_name'] ?: $task['creator_username']) ?></span> + <strong><?= t('Time spent:') ?></strong> + <span><?= t('%s hours', $task['time_spent']) ?></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 ?> + <?php endif ?> - <?= $this->hook->render('template:task:details:third-column', array('task' => $task)) ?> - </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 ?> + <?= $this->hook->render('template:task:details:third-column', array('task' => $task)) ?> + </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 ?> - <?= $this->hook->render('template:task:details:fourth-column', array('task' => $task)) ?> - </ul> + <?= $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><?= $this->text->e($tag) ?></li> + <?php endforeach ?> + </ul> + </div> + <?php endif ?> </div> <?php if ($editable && empty($task['date_started'])): ?> - <div class="task-summary-buttons"> + <div class="buttons-header"> <?= $this->url->button('fa-play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> <?php endif ?> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index b6b9c789..95c7a88c 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -8,22 +8,10 @@ </li> <?php endif ?> <li> - <i class="fa fa-user fa-fw"></i> - <?= $this->url->link(t('Change assignee'), 'TaskPopoverController', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-tag fa-fw"></i> - <?= $this->url->link(t('Change category'), 'TaskPopoverController', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> <i class="fa fa-pencil-square-o fa-fw"></i> <?= $this->url->link(t('Edit the task'), 'TaskModificationController', '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'), 'TaskModificationController', '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'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> </li> diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index 00e0e9ae..7f6c2913 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -4,7 +4,6 @@ <section class="sidebar-container" id="task-view" data-edit-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" - data-description-url="<?= $this->url->href('TaskModificationController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-subtask-url="<?= $this->url->href('SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-internal-link-url="<?= $this->url->href('TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-comment-url="<?= $this->url->href('CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 94782163..b8405ff7 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -1,5 +1,10 @@ <section id="main" class="public-task"> - <?= $this->render('task/details', array('task' => $task, 'project' => $project, 'editable' => false)) ?> + <?= $this->render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, + )) ?> <?= $this->render('task/description', array( 'task' => $task, diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 2b54eea8..a5c2d5a7 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -2,51 +2,64 @@ <?= $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)) ?> +<?php if (!empty($task['description'])): ?> + <?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> + <?= $this->render('task/description', array('task' => $task)) ?> +<?php endif ?> -<?= $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' => true, -)) ?> +<?php if(!empty($subtasks)): ?> + <?= $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' => true, + )) ?> +<?php endif ?> -<?= $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' => true, - 'is_public' => false, -)) ?> +<?php if (!empty($internal_links)): ?> + <?= $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' => true, + 'is_public' => false, + )) ?> +<?php endif ?> -<?= $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, -)) ?> +<?php if (!empty($external_links)): ?> + <?= $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, + )) ?> +<?php endif ?> -<?= $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 -)) ?> +<?php if (!empty($files) || !empty($images)): ?> + <?= $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 + )) ?> +<?php endif ?> -<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> -<?= $this->render('comments/show', array( - 'task' => $task, - 'comments' => $comments, - 'project' => $project, - 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), -)) ?> +<?php if (!empty($comments)): ?> + <?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> + <?= $this->render('comments/show', array( + 'task' => $task, + 'comments' => $comments, + 'project' => $project, + 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), + )) ?> +<?php endif ?> <?= $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 e77ec18a..728741ba 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -1,5 +1,7 @@ <div class="sidebar sidebar-icons"> - <h2><?= t('Task #%d', $task['id']) ?></h2> + <div class="sidebar-title"> + <h2><?= t('Task #%d', $task['id']) ?></h2> + </div> <ul> <li <?= $this->app->checkMenuSelection('TaskViewController', 'show') ?>> <i class="fa fa-newspaper-o fa-fw"></i> @@ -28,17 +30,15 @@ </ul> <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> - <h2><?= t('Actions') ?></h2> + <div class="sidebar-title"> + <h2><?= t('Actions') ?></h2> + </div> <ul> <li> <i class="fa fa-pencil-square-o fa-fw"></i> <?= $this->url->link(t('Edit the task'), 'TaskModificationController', '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'), 'TaskModificationController', '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'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> </li> diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php index 1a179522..7cb419e0 100644 --- a/app/Template/task/time_tracking_details.php +++ b/app/Template/task/time_tracking_details.php @@ -1,6 +1,9 @@ -<div class="task-show-title color-<?= $task['color_id'] ?>"> - <h2><?= $this->text->e($task['title']) ?></h2> -</div> +<?= $this->render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> <?= $this->render('task/time_tracking_summary', array('task' => $task)) ?> @@ -8,7 +11,7 @@ <?php if ($subtask_paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing to show.') ?></p> <?php else: ?> - <table class="table-fixed"> + <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> diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php index 9e04c4e1..4a9f22ce 100644 --- a/app/Template/task/transitions.php +++ b/app/Template/task/transitions.php @@ -1,6 +1,9 @@ -<div class="task-show-title color-<?= $task['color_id'] ?>"> - <h2><?= $this->text->e($task['title']) ?></h2> -</div> +<?= $this->render('task/details', array( + 'task' => $task, + 'tags' => $tags, + 'project' => $project, + 'editable' => false, +)) ?> <div class="page-header"> <h2><?= t('Transitions') ?></h2> @@ -9,7 +12,7 @@ <?php if (empty($transitions)): ?> <p class="alert"><?= t('There is nothing to show.') ?></p> <?php else: ?> - <table class="table-stripped"> + <table class="table-striped table-scrolling"> <tr> <th><?= t('Date') ?></th> <th><?= t('Source column') ?></th> |