diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Locale/da_DK/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/de_DE/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/es_ES/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/fi_FI/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/fr_FR/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/hu_HU/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/it_IT/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/ja_JP/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/pl_PL/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/pt_BR/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/ru_RU/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/sv_SE/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/th_TH/translations.php | 2 | ||||
-rw-r--r-- | app/Locale/zh_CN/translations.php | 2 | ||||
-rw-r--r-- | app/Template/board/filters.php | 8 | ||||
-rw-r--r-- | app/Template/board/show.php | 3 | ||||
-rw-r--r-- | app/Template/board/swimlane.php | 8 | ||||
-rw-r--r-- | app/Template/board/task.php | 148 | ||||
-rw-r--r-- | app/Template/board/task_footer.php | 45 | ||||
-rw-r--r-- | app/Template/board/task_public.php | 26 |
20 files changed, 152 insertions, 114 deletions
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index b6186a33..44d3c9f8 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index f954ce78..e768c33c 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 60a90c9a..997d0d50 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 42054646..facbafdd 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 26372c48..a6981662 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -724,4 +724,6 @@ return array( '<1h' => '<1h', '%dh' => '%dh', '%b %e' => '%e %b', + 'Expand tasks' => 'Déplier les tâches', + 'Collapse tasks' => 'Replier les tâches', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 487492b2..8407ca55 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index f395caff..dc369ba3 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index ab62128c..e6cfe83e 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 688230fa..c1583cd8 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index d7759fc8..30c4dca3 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 0afd3643..ebaca4fc 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index c9a9b041..6a6d0973 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 502b1135..f78f198a 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 75690708..45d9203a 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -722,4 +722,6 @@ return array( // '<1h' => '', // '%dh' => '', // '%b %e' => '', + // 'Expand tasks' => '', + // 'Collapse tasks' => '', ); diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php index 0e9c4d5f..db2108ab 100644 --- a/app/Template/board/filters.php +++ b/app/Template/board/filters.php @@ -46,5 +46,13 @@ <li> <a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a> </li> + <li> + <span class="filter-collapse"> + <i class="fa fa-compress"></i> <a href="#" class="filter-collapse-link"><?= t('Collapse tasks') ?></a> + </span> + <span class="filter-expand" style="display: none"> + <i class="fa fa-expand"></i> <a href="#" class="filter-expand-link"><?= t('Expand tasks') ?></a> + </span> + </li> </ul> </div>
\ No newline at end of file diff --git a/app/Template/board/show.php b/app/Template/board/show.php index 5fbb576c..dc524737 100644 --- a/app/Template/board/show.php +++ b/app/Template/board/show.php @@ -1,4 +1,3 @@ - <?php if (isset($not_editable)): ?> <table id="board"> <?php else: ?> @@ -25,4 +24,4 @@ )) ?> <?php endif ?> <?php endforeach ?> -</table> +</table>
\ No newline at end of file diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php index f0a00fc1..ec5272f3 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/swimlane.php @@ -26,13 +26,13 @@ <?php endif ?> <?= $this->e($column['title']) ?> - + <?php if (! empty($column['description'])): ?> - <span class="column-tooltip pull-right" title="<?= $this->markdown($column['description']) ?>"> + <span class="column-tooltip pull-right" title="<?= $this->markdown($column['description']) ?>"> <i class="fa fa-info-circle"></i> </span> <?php endif ?> - + <?php if ($column['task_limit']): ?> <span title="<?= t('Task limit') ?>" class="task-limit"> (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>) @@ -65,7 +65,7 @@ <?php endif ?> <?php foreach ($column['tasks'] as $task): ?> - <?= $this->render('board/task', array( + <?= $this->render($not_editable ? 'board/task_public' : 'board/task', array( 'project' => $project, 'task' => $task, 'categories' => $categories, diff --git a/app/Template/board/task.php b/app/Template/board/task.php index 638078c3..5f73a5c2 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task.php @@ -1,31 +1,3 @@ -<?php if ($not_editable): ?> - -<div class="task-board color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>"> - - <?= $this->a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> - - <?php if ($task['reference']): ?> - <span class="task-board-reference" title="<?= t('Reference') ?>"> - (<?= $task['reference'] ?>) - </span> - <?php endif ?> - - - - - <span class="task-board-user"> - <?php if (! empty($task['owner_id'])): ?> - <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?> - <?php else: ?> - <span class="task-board-nobody"><?= t('Nobody assigned') ?></span> - <?php endif ?> - </span> - - <div class="task-board-title"> - <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> - </div> - -<?php else: ?> - <div class="task-board draggable-item color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" @@ -34,91 +6,51 @@ data-task-url="<?= $this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" title="<?= t('View this task') ?>"> - <ul class="dropdown"> - <li> - <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a> - <ul> - <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'assignee-popover') ?></li> - <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'category-popover') ?></li> - <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-description-popover') ?></li> - <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-edit-popover') ?></li> - <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => 'board'), true) ?></li> - </li> - </li> - </ul> - - <?php if ($task['reference']): ?> - <span class="task-board-reference" title="<?= t('Reference') ?>"> - (<?= $task['reference'] ?>) - </span> - <?php endif ?> - - <span class="task-board-user <?= $this->userSession->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>"> - <?= $this->a( - (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')), - 'board', - 'changeAssignee', - array('task_id' => $task['id'], 'project_id' => $task['project_id']), - false, - 'assignee-popover', - t('Change assignee') - ) ?> - </span> - - <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->getTaskAge($task['date_creation']) ?></span> - <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->getTaskAge($task['date_moved']) ?></span> - - <div class="task-board-title"> - <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + <div class="task-board-collapsed" style="display: none"> + <?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-id') ?> + <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?> </div> -<?php endif ?> - - -<?php if ($task['category_id']): ?> -<div class="task-board-category-container"> - <span class="task-board-category"> - <?= $this->a( - $this->inList($task['category_id'], $categories), - 'board', - 'changeCategory', - array('task_id' => $task['id'], 'project_id' => $task['project_id']), - false, - 'category-popover', - t('Change category') - ) ?> - </span> -</div> -<?php endif ?> + <div class="task-board-expanded"> + + <ul class="dropdown"> + <li> + <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a> + <ul> + <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'assignee-popover') ?></li> + <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'category-popover') ?></li> + <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-description-popover') ?></li> + <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-edit-popover') ?></li> + <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => 'board'), true) ?></li> + </li> + </li> + </ul> -<div class="task-board-icons"> - <?php if (! empty($task['date_due'])): ?> - <span class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>"> - <i class="fa fa-calendar"></i> <?= dt('%b %e', $task['date_due']) ?> + <?php if ($task['reference']): ?> + <span class="task-board-reference" title="<?= t('Reference') ?>"> + (<?= $task['reference'] ?>) + </span> + <?php endif ?> + + <span class="task-board-user <?= $this->userSession->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>"> + <?= $this->a( + (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')), + 'board', + 'changeAssignee', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + false, + 'assignee-popover', + t('Change assignee') + ) ?> </span> - <?php endif ?> - - <?php if (! empty($task['nb_links'])): ?> - <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_links'] ?> <i class="fa fa-code-fork"></i></span> - <?php endif ?> - - <?php if (! empty($task['nb_subtasks'])): ?> - <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?> <i class="fa fa-bars"></i></span> - <?php endif ?> - - <?php if (! empty($task['nb_files'])): ?> - <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span> - <?php endif ?> - <?php if (! empty($task['nb_comments'])): ?> - <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span> - <?php endif ?> + <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->getTaskAge($task['date_creation']) ?></span> + <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->getTaskAge($task['date_moved']) ?></span> - <?php if (! empty($task['description'])): ?> - <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> - <i class="fa fa-file-text-o"></i> - </span> - <?php endif ?> -</div> + <div class="task-board-title"> + <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + </div> + <?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?> + </div> </div> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php new file mode 100644 index 00000000..04d425e8 --- /dev/null +++ b/app/Template/board/task_footer.php @@ -0,0 +1,45 @@ +<?php if ($task['category_id']): ?> +<div class="task-board-category-container"> + <span class="task-board-category"> + <?= $this->a( + $this->inList($task['category_id'], $categories), + 'board', + 'changeCategory', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + false, + 'category-popover', + t('Change category') + ) ?> + </span> +</div> +<?php endif ?> + +<div class="task-board-icons"> + <?php if (! empty($task['date_due'])): ?> + <span class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>"> + <i class="fa fa-calendar"></i> <?= dt('%b %e', $task['date_due']) ?> + </span> + <?php endif ?> + + <?php if (! empty($task['nb_links'])): ?> + <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_links'] ?> <i class="fa fa-code-fork"></i></span> + <?php endif ?> + + <?php if (! empty($task['nb_subtasks'])): ?> + <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?> <i class="fa fa-bars"></i></span> + <?php endif ?> + + <?php if (! empty($task['nb_files'])): ?> + <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span> + <?php endif ?> + + <?php if (! empty($task['nb_comments'])): ?> + <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span> + <?php endif ?> + + <?php if (! empty($task['description'])): ?> + <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> + <i class="fa fa-file-text-o"></i> + </span> + <?php endif ?> +</div>
\ No newline at end of file diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php new file mode 100644 index 00000000..4e3ad18c --- /dev/null +++ b/app/Template/board/task_public.php @@ -0,0 +1,26 @@ +<div class="task-board color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>"> + + <?= $this->a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> + + <?php if ($task['reference']): ?> + <span class="task-board-reference" title="<?= t('Reference') ?>"> + (<?= $task['reference'] ?>) + </span> + <?php endif ?> + + - + + <span class="task-board-user"> + <?php if (! empty($task['owner_id'])): ?> + <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?> + <?php else: ?> + <span class="task-board-nobody"><?= t('Nobody assigned') ?></span> + <?php endif ?> + </span> + + <div class="task-board-title"> + <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> + </div> + + <?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?> +</div>
\ No newline at end of file |