diff options
author | JLGC @monolinux <monolinux@junglacode.org> | 2016-08-15 23:13:16 -0500 |
---|---|---|
committer | JLGC @monolinux <monolinux@junglacode.org> | 2016-08-15 23:13:16 -0500 |
commit | 683c0464093f6a7976236c68653c2a2cc5dae280 (patch) | |
tree | bf176ecd82415cc4952eea071b7d264dd5fd68b4 /app/Template | |
parent | b1e795fc5b45369f7b9b565b1e106d2673361977 (diff) | |
parent | 5f82a942c0011bf91947b2c1d627c0907bda0c92 (diff) |
Merge https://github.com/kanboard/kanboard
Diffstat (limited to 'app/Template')
131 files changed, 1046 insertions, 791 deletions
diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 0a94e4f0..085ea3ad 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -15,7 +15,7 @@ <?php if (empty($actions)): ?> <p class="alert"><?= t('There is no action at the moment.') ?></p> <?php else: ?> - <table> + <table class="table-scrolling"> <tr> <th><?= t('Automatic actions') ?></th> <th><?= t('Action parameters') ?></th> diff --git a/app/Template/activity/task.php b/app/Template/activity/task.php index 04c64c63..39953d1a 100644 --- a/app/Template/activity/task.php +++ b/app/Template/activity/task.php @@ -1,9 +1,12 @@ -<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('Activity stream') ?></h2> </div> -<?= $this->render('event/events', array('events' => $events)) ?>
\ No newline at end of file +<?= $this->render('event/events', array('events' => $events)) ?> diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php index 5f6c6b35..91c269fc 100644 --- a/app/Template/analytic/avg_time_columns.php +++ b/app/Template/analytic/avg_time_columns.php @@ -9,7 +9,7 @@ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-label="<?= t('Average time spent') ?>"></div> - <table class="table-stripped"> + <table class="table-striped"> <tr> <th><?= t('Column') ?></th> <th><?= t('Average time spent') ?></th> diff --git a/app/Template/analytic/compare_hours.php b/app/Template/analytic/compare_hours.php index 70d8d02b..c0b9cfc3 100644 --- a/app/Template/analytic/compare_hours.php +++ b/app/Template/analytic/compare_hours.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Compare Estimated Time vs Actual Time') ?></h2> + <h2><?= t('Estimated vs actual time') ?></h2> </div> <div class="listing"> @@ -23,7 +23,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No tasks found.') ?></p> <?php elseif (! $paginator->isEmpty()): ?> - <table class="table-fixed table-small"> + <table class="table-fixed table-small table-scrolling"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index de3dccf8..0f5ee101 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Reportings') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('AnalyticController', 'tasks') ?>> <?= $this->url->link(t('Task distribution'), 'AnalyticController', 'tasks', array('project_id' => $project['id'])) ?> diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php index 9e7b1fd7..4bc19784 100644 --- a/app/Template/analytic/tasks.php +++ b/app/Template/analytic/tasks.php @@ -9,7 +9,7 @@ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>'></div> - <table> + <table class="table-striped"> <tr> <th><?= t('Column') ?></th> <th><?= t('Number of tasks') ?></th> diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php index 9d1d3a1e..91bec11b 100644 --- a/app/Template/analytic/users.php +++ b/app/Template/analytic/users.php @@ -9,7 +9,7 @@ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>'></div> - <table> + <table class="table-striped"> <tr> <th><?= t('User') ?></th> <th><?= t('Number of tasks') ?></th> diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php index f7a9f6ad..c0b71eab 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -5,9 +5,9 @@ <!-- column in collapsed mode --> <div class="board-column-collapsed"> - <span class="board-column-header-task-count" title="<?= t('Show this column') ?>"> + <small class="board-column-header-task-count" title="<?= t('Show this column') ?>"> <span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span> - </span> + </small> </div> <!-- column in expanded mode --> @@ -18,9 +18,9 @@ </div> <?php endif ?> - <?php if ($swimlane['nb_swimlanes'] > 1 && ! empty($column['nb_column_tasks'])): ?> + <?php if ($swimlane['nb_swimlanes'] > 1 && ! empty($column['column_nb_tasks'])): ?> <span title="<?= t('Total number of tasks in this column across all swimlanes') ?>" class="board-column-header-task-count"> - (<span><?= $column['nb_column_tasks'] ?></span>) + (<span><?= $column['column_nb_tasks'] ?></span>) </span> <?php endif ?> @@ -47,6 +47,7 @@ </li> <?php endif ?> <?php endif ?> + <?= $this->hook->render('template:board:column:dropdown', array('swimlane' => $swimlane, 'column' => $column)) ?> </ul> </span> <?php endif ?> diff --git a/app/Template/board/table_tasks.php b/app/Template/board/table_tasks.php index fd9ce5e7..1651f5d6 100644 --- a/app/Template/board/table_tasks.php +++ b/app/Template/board/table_tasks.php @@ -4,7 +4,8 @@ <td class=" board-column-<?= $column['id'] ?> <?= $column['task_limit'] > 0 && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?> - "> + " + > <!-- tasks list --> <div class="board-task-list board-column-expanded" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>"> diff --git a/app/Template/board/task_avatar.php b/app/Template/board/task_avatar.php index 14b55476..28e0813e 100644 --- a/app/Template/board/task_avatar.php +++ b/app/Template/board/task_avatar.php @@ -3,7 +3,7 @@ <span <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> class="task-board-assignee task-board-change-assignee" - data-url="<?= $this->url->href('TaskPopoverController', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> + data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> <?php else: ?> class="task-board-assignee"> <?php endif ?> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index f6cbff70..bc34363c 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -6,8 +6,8 @@ <?php else: ?> <?= $this->url->link( $this->text->e($task['category_name']), - 'TaskPopoverController', - 'changeCategory', + 'TaskModificationController', + 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover' . (! empty($task['category_description']) ? ' tooltip' : ''), @@ -18,6 +18,16 @@ </div> <?php endif ?> +<?php if (! empty($task['tags'])): ?> + <div class="task-tags"> + <ul> + <?php foreach ($task['tags'] as $tag): ?> + <li><?= $this->text->e($tag['name']) ?></li> + <?php endforeach ?> + </ul> + </div> +<?php endif ?> + <div class="task-board-icons"> <?php if ($task['score']): ?> <span class="task-score" title="<?= t('Complexity') ?>"> @@ -27,7 +37,7 @@ <?php endif ?> <?php if (! empty($task['date_due'])): ?> - <?php if (date('d') == date('d', $task['date_due'])): ?> + <?php if (date('Y-m-d') == date('Y-m-d', $task['date_due'])): ?> <span class="task-board-date task-board-date-today"> <?php elseif (time() > $task['date_due']): ?> <span class="task-board-date task-board-date-overdue"> diff --git a/app/Template/board/tooltip_external_links.php b/app/Template/board/tooltip_external_links.php index 65331864..a9f1fc7f 100644 --- a/app/Template/board/tooltip_external_links.php +++ b/app/Template/board/tooltip_external_links.php @@ -1,5 +1,5 @@ <div class="tooltip-large"> - <table> + <table class="table-small"> <tr> <th class="column-20"><?= t('Type') ?></th> <th class="column-70"><?= t('Title') ?></th> diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 6f9e2640..4e704dac 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -1,5 +1,5 @@ <div class="tooltip-large"> - <table> + <table class="table-small"> <?php foreach ($files as $file): ?> <tr> <th> diff --git a/app/Template/board/tooltip_subtasks.php b/app/Template/board/tooltip_subtasks.php index 0322d373..8d5bc059 100644 --- a/app/Template/board/tooltip_subtasks.php +++ b/app/Template/board/tooltip_subtasks.php @@ -1,5 +1,5 @@ <div class="tooltip-large"> - <table> + <table class="table-small"> <tr> <th class="column-80"><?= t('Subtask') ?></th> <th><?= t('Assignee') ?></th> diff --git a/app/Template/board/tooltip_tasklinks.php b/app/Template/board/tooltip_tasklinks.php index d1156cbe..08432e71 100644 --- a/app/Template/board/tooltip_tasklinks.php +++ b/app/Template/board/tooltip_tasklinks.php @@ -1,5 +1,5 @@ <div class="tooltip-large"> - <table> + <table class="table-small"> <?php foreach ($links as $label => $grouped_links): ?> <tr> <th colspan="4"><?= t($label) ?></th> diff --git a/app/Template/category/index.php b/app/Template/category/index.php index a103d89f..ac60d9a8 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -2,7 +2,7 @@ <div class="page-header"> <h2><?= t('Categories') ?></h2> </div> -<table> +<table class="table-striped"> <tr> <th><?= t('Category Name') ?></th> <th class="column-8"><?= t('Actions') ?></th> diff --git a/app/Template/column/create.php b/app/Template/column/create.php index 023de525..812e9139 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -13,6 +13,8 @@ <?= $this->form->label(t('Task limit'), 'task_limit') ?> <?= $this->form->number('task_limit', $values, $errors) ?> + <?= $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1) ?> + <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textarea('description', $values, $errors, array(), 'markdown-editor') ?> diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index a742e4b9..89487298 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -15,6 +15,8 @@ <?= $this->form->label(t('Task limit'), 'task_limit') ?> <?= $this->form->number('task_limit', $values, $errors) ?> + <?= $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1, $values['hide_in_dashboard'] == 1) ?> + <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textarea('description', $values, $errors, array(), 'markdown-editor') ?> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 04760a16..66890ba5 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -12,7 +12,7 @@ <p class="alert alert-error"><?= t('Your board doesn\'t have any columns!') ?></p> <?php else: ?> <table - class="columns-table table-stripped" + class="columns-table table-striped" data-save-position-url="<?= $this->url->href('ColumnController', 'move', array('project_id' => $project['id'])) ?>"> <thead> <tr> diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 8419a14e..16a807bc 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -4,10 +4,10 @@ <div class="comment-title"> <?php if (! empty($comment['username'])): ?> - <span class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></span> + <strong class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></strong> <?php endif ?> - <span class="comment-date"><?= $this->dt->datetime($comment['date_creation']) ?></span> + <small class="comment-date"><?= $this->dt->datetime($comment['date_creation']) ?></small> </div> <div class="comment-content"> diff --git a/app/Template/comments/show.php b/app/Template/comments/show.php index 43f6b2c2..5c6d8e20 100644 --- a/app/Template/comments/show.php +++ b/app/Template/comments/show.php @@ -5,8 +5,10 @@ <div class="accordion-content" id="comments"> <?php if (!isset($is_public) || !$is_public): ?> <div class="comment-sorting"> - <i class="fa fa-sort"></i> - <?= $this->url->link(t('change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <small> + <i class="fa fa-sort"></i> + <?= $this->url->link(t('change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </small> </div> <?php endif ?> <?php foreach ($comments as $comment): ?> diff --git a/app/Template/config/about.php b/app/Template/config/about.php index 8e2d1325..8d5a575d 100644 --- a/app/Template/config/about.php +++ b/app/Template/config/about.php @@ -9,7 +9,7 @@ </li> <li> <?= t('Author:') ?> - <strong>Frédéric Guillot</strong> (<a href="https://github.com/fguillot/kanboard/blob/master/CONTRIBUTORS.md" target="_blank"><?= t('contributors') ?></a>) + <strong>Frédéric Guillot</strong> (<a href="https://github.com/kanboard/kanboard/blob/master/CONTRIBUTORS.md" target="_blank"><?= t('contributors') ?></a>) </li> <li> <?= t('License:') ?> diff --git a/app/Template/config/keyboard_shortcuts.php b/app/Template/config/keyboard_shortcuts.php index da532661..1b1a9477 100644 --- a/app/Template/config/keyboard_shortcuts.php +++ b/app/Template/config/keyboard_shortcuts.php @@ -19,7 +19,6 @@ <h3><?= t('Task view') ?></h3> <ul> <li><?= t('Edit task') ?> = <strong>e</strong></li> - <li><?= t('Edit description') ?> = <strong>d</strong></li> <li><?= t('New subtask') ?> = <strong>s</strong></li> <li><?= t('New comment') ?> = <strong>c</strong></li> <li><?= t('New internal link') ?> = <strong>l</strong></li> @@ -33,4 +32,4 @@ <li><?= t('Close dialog box') ?> = <strong>ESC</strong></li> <li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li> </ul> -</div>
\ No newline at end of file +</div> diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 29caa0ef..239edc19 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Actions') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('ConfigController', 'index') ?>> <?= $this->url->link(t('About'), 'ConfigController', 'index') ?> @@ -19,6 +18,9 @@ <li <?= $this->app->checkMenuSelection('ConfigController', 'calendar') ?>> <?= $this->url->link(t('Calendar settings'), 'ConfigController', 'calendar') ?> </li> + <li <?= $this->app->checkMenuSelection('TagController', 'index') ?>> + <?= $this->url->link(t('Tags management'), 'TagController', 'index') ?> + </li> <li <?= $this->app->checkMenuSelection('LinkController') ?>> <?= $this->url->link(t('Link settings'), 'LinkController', 'index') ?> </li> diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php index 9881cee5..db9b21af 100644 --- a/app/Template/currency/index.php +++ b/app/Template/currency/index.php @@ -4,7 +4,7 @@ <?php if (! empty($rates)): ?> -<table class="table-stripped"> +<table class="table-striped"> <tr> <th class="column-35"><?= t('Currency') ?></th> <th><?= t('Rate') ?></th> diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php index 08c8040c..dcab891b 100644 --- a/app/Template/custom_filter/index.php +++ b/app/Template/custom_filter/index.php @@ -3,7 +3,7 @@ <h2><?= t('Custom filters') ?></h2> </div> <div> - <table> + <table class="table-striped table-scrolling"> <tr> <th class="column-15"><?= t('Name') ?></th> <th class="column-30"><?= t('Filter') ?></th> diff --git a/app/Template/dashboard/notifications.php b/app/Template/dashboard/notifications.php index e0e9b878..a189d74f 100644 --- a/app/Template/dashboard/notifications.php +++ b/app/Template/dashboard/notifications.php @@ -13,7 +13,7 @@ </ul> </div> - <table class="table-fixed table-small"> + <table class="table-striped table-scrolling table-small"> <tr> <th><?= t('Notification') ?></th> <th class="column-20"><?= t('Date') ?></th> @@ -36,10 +36,8 @@ <i class="fa fa-file-o fa-fw"></i> <?php endif ?> - <?php if ($this->text->contains($notification['event_name'], 'task.overdue')): ?> - <?php if (count($notification['event_data']['tasks']) > 1): ?> - <?= $notification['title'] ?> - <?php endif ?> + <?php if ($this->text->contains($notification['event_name'], 'task.overdue') && count($notification['event_data']['tasks']) > 1): ?> + <?= $notification['title'] ?> <?php else: ?> <?= $this->url->link($notification['title'], 'WebNotificationController', 'redirect', array('notification_id' => $notification['id'], 'user_id' => $user['id'])) ?> <?php endif ?> diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php index 962e4d83..f8806c01 100644 --- a/app/Template/dashboard/projects.php +++ b/app/Template/dashboard/projects.php @@ -4,10 +4,10 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('Your are not member of any project.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'id') ?></th> - <th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', 'is_private') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\ProjectModel::TABLE.'.id') ?></th> + <th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', \Kanboard\Model\ProjectModel::TABLE.'.is_private') ?></th> <th class="column-25"><?= $paginator->order(t('Project'), \Kanboard\Model\ProjectModel::TABLE.'.name') ?></th> <th class="column-10"><?= t('Tasks') ?></th> <th><?= t('Columns') ?></th> @@ -43,7 +43,7 @@ <td class="dashboard-project-stats"> <?php foreach ($project['columns'] as $column): ?> <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong> - <span><?= $this->text->e($column['title']) ?></span> + <small><?= $this->text->e($column['title']) ?></small> <?php endforeach ?> </td> diff --git a/app/Template/dashboard/show.php b/app/Template/dashboard/show.php index 637b60f8..aec6f591 100644 --- a/app/Template/dashboard/show.php +++ b/app/Template/dashboard/show.php @@ -2,11 +2,18 @@ <form method="get" action="<?= $this->url->dir() ?>" class="search"> <?= $this->form->hidden('controller', array('controller' => 'SearchController')) ?> <?= $this->form->hidden('action', array('action' => 'index')) ?> - <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'form-input-large') ?> - <?= $this->render('app/filters_helper') ?> + + <div class="input-addon"> + <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper') ?> + </div> + </div> </form> </div> <?= $this->render('dashboard/projects', array('paginator' => $project_paginator, 'user' => $user)) ?> <?= $this->render('dashboard/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?> <?= $this->render('dashboard/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?> + +<?= $this->hook->render('template:dashboard:show', array('user' => $user)) ?> diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php index 86cc20f8..108c028a 100644 --- a/app/Template/dashboard/sidebar.php +++ b/app/Template/dashboard/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= $this->text->e($user['name'] ?: $user['username']) ?></h2> <ul> <li <?= $this->app->checkMenuSelection('DashboardController', 'show') ?>> <?= $this->url->link(t('Overview'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?> @@ -22,6 +21,6 @@ <li <?= $this->app->checkMenuSelection('DashboardController', 'notifications') ?>> <?= $this->url->link(t('My notifications'), 'DashboardController', 'notifications', array('user_id' => $user['id'])) ?> </li> - <?= $this->hook->render('template:dashboard:sidebar') ?> + <?= $this->hook->render('template:dashboard:sidebar', array('user' => $user)) ?> </ul> </div> diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php index 8e0aa3ce..b71deeb9 100644 --- a/app/Template/dashboard/subtasks.php +++ b/app/Template/dashboard/subtasks.php @@ -4,12 +4,12 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing assigned to you.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?></th> <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th> <th><?= $paginator->order(t('Task'), 'task_name') ?></th> - <th><?= $paginator->order(t('Subtask'), 'title') ?></th> + <th><?= $paginator->order(t('Subtask'), \Kanboard\Model\SubtaskModel::TABLE.'.title') ?></th> <th class="column-20"><?= t('Time tracking') ?></th> </tr> <?php foreach ($paginator->getCollection() as $subtask): ?> diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php index 4b83a96a..427b903d 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -4,14 +4,14 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing assigned to you.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?></th> <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th> - <th><?= $paginator->order(t('Task'), 'title') ?></th> - <th class="column-5"><?= $paginator->order('Priority', 'tasks.priority') ?></th> + <th><?= $paginator->order(t('Task'), \Kanboard\Model\TaskModel::TABLE.'.title') ?></th> + <th class="column-8"><?= $paginator->order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?></th> <th class="column-20"><?= t('Time tracking') ?></th> - <th class="column-10"><?= $paginator->order(t('Due date'), 'date_due') ?></th> + <th class="column-10"><?= $paginator->order(t('Due date'), \Kanboard\Model\TaskModel::TABLE.'.date_due') ?></th> <th class="column-10"><?= $paginator->order(t('Column'), 'column_title') ?></th> </tr> <?php foreach ($paginator->getCollection() as $task): ?> diff --git a/app/Template/event/comment_create.php b/app/Template/event/comment_create.php index 45132e6d..780bba93 100644 --- a/app/Template/event/comment_create.php +++ b/app/Template/event/comment_create.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/comment_delete.php b/app/Template/event/comment_delete.php new file mode 100644 index 00000000..e3a2f9fa --- /dev/null +++ b/app/Template/event/comment_delete.php @@ -0,0 +1,11 @@ +<p class="activity-title"> + <?= e('%s removed a comment on the task %s', + $this->text->e($author), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + ) ?> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> +</p> +<div class="activity-description"> + <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> + <div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div> +</div> diff --git a/app/Template/event/comment_update.php b/app/Template/event/comment_update.php index 5a0821bd..9e25ec2d 100644 --- a/app/Template/event/comment_update.php +++ b/app/Template/event/comment_update.php @@ -3,8 +3,11 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> + <?php if (! empty($comment['comment'])): ?> + <div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div> + <?php endif ?> </div> diff --git a/app/Template/event/subtask_create.php b/app/Template/event/subtask_create.php index 1bf36c05..9a115c73 100644 --- a/app/Template/event/subtask_create.php +++ b/app/Template/event/subtask_create.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/subtask_delete.php b/app/Template/event/subtask_delete.php new file mode 100644 index 00000000..7f0d6d58 --- /dev/null +++ b/app/Template/event/subtask_delete.php @@ -0,0 +1,15 @@ +<p class="activity-title"> + <?= e('%s removed a subtask for the task %s', + $this->text->e($author), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + ) ?> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> +</p> +<div class="activity-description"> + <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> + <ul> + <li> + <?= $this->text->e($subtask['title']) ?> (<strong><?= $this->text->e($subtask['status_name']) ?></strong>) + </li> + </ul> +</div> diff --git a/app/Template/event/subtask_update.php b/app/Template/event/subtask_update.php index 201402f6..e566022e 100644 --- a/app/Template/event/subtask_update.php +++ b/app/Template/event/subtask_update.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php index 7c962223..405f8ac1 100644 --- a/app/Template/event/task_assignee_change.php +++ b/app/Template/event/task_assignee_change.php @@ -8,9 +8,9 @@ $this->text->e($assignee) ) ?> <?php else: ?> - <?= e('%s remove the assignee of the task %s', $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> + <?= e('%s removed the assignee of the task %s', $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?php endif ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_close.php b/app/Template/event/task_close.php index 90ff9207..1ac81ea9 100644 --- a/app/Template/event/task_close.php +++ b/app/Template/event/task_close.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_create.php b/app/Template/event/task_create.php index 017a5ada..9d0ff358 100644 --- a/app/Template/event/task_create.php +++ b/app/Template/event/task_create.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_file_create.php b/app/Template/event/task_file_create.php index d329529a..7e58fdc1 100644 --- a/app/Template/event/task_file_create.php +++ b/app/Template/event/task_file_create.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($file['name']) ?></p> diff --git a/app/Template/event/task_internal_link_create_update.php b/app/Template/event/task_internal_link_create_update.php new file mode 100644 index 00000000..4bc6ae9a --- /dev/null +++ b/app/Template/event/task_internal_link_create_update.php @@ -0,0 +1,16 @@ +<p class="activity-title"> + <?= e('%s set a new internal link for the task %s', + $this->text->e($author), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + ) ?> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> +</p> +<div class="activity-description"> + <p class="activity-task-title"> + <?= e( + 'This task is now linked to the task %s with the relation "%s"', + $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])), + $this->text->e($task_link['label']) + ) ?> + </p> +</div> diff --git a/app/Template/event/task_internal_link_delete.php b/app/Template/event/task_internal_link_delete.php new file mode 100644 index 00000000..3465fa57 --- /dev/null +++ b/app/Template/event/task_internal_link_delete.php @@ -0,0 +1,16 @@ +<p class="activity-title"> + <?= e('%s removed an internal link for the task %s', + $this->text->e($author), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + ) ?> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> +</p> +<div class="activity-description"> + <p class="activity-task-title"> + <?= e( + 'The link with the relation "%s" to the task %s have been removed', + $this->text->e($task_link['label']), + $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])) + ) ?> + </p> +</div> diff --git a/app/Template/event/task_move_column.php b/app/Template/event/task_move_column.php index f3155e47..e7e5ec28 100644 --- a/app/Template/event/task_move_column.php +++ b/app/Template/event/task_move_column.php @@ -4,7 +4,7 @@ $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), $this->text->e($task['column_title']) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_move_position.php b/app/Template/event/task_move_position.php index ecdd02b6..48fbbb1e 100644 --- a/app/Template/event/task_move_position.php +++ b/app/Template/event/task_move_position.php @@ -5,7 +5,7 @@ $task['position'], $this->text->e($task['column_title']) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_move_swimlane.php b/app/Template/event/task_move_swimlane.php index fe9bfb55..a467875b 100644 --- a/app/Template/event/task_move_swimlane.php +++ b/app/Template/event/task_move_swimlane.php @@ -11,7 +11,7 @@ $this->text->e($task['swimlane_name']) ) ?> <?php endif ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_open.php b/app/Template/event/task_open.php index 548aa98f..6d5252a1 100644 --- a/app/Template/event/task_open.php +++ b/app/Template/event/task_open.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/event/task_update.php b/app/Template/event/task_update.php index 7c7507c0..2608f623 100644 --- a/app/Template/event/task_update.php +++ b/app/Template/event/task_update.php @@ -3,7 +3,7 @@ $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> - <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> + <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> </p> <div class="activity-description"> <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p> diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php index 55fbaeef..463c0cee 100644 --- a/app/Template/export/sidebar.php +++ b/app/Template/export/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Exports') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('ExportController', 'tasks') ?>> <?= $this->url->link(t('Tasks'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php index a82cb3d1..878a7132 100644 --- a/app/Template/export/subtasks.php +++ b/app/Template/export/subtasks.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Subtasks exportation for "%s"', $project['name']) ?></h2> + <h2><?= t('Subtasks export') ?></h2> </div> <p class="alert alert-info"><?= t('This report contains all subtasks information for the given date range.') ?></p> @@ -21,4 +21,4 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/export/summary.php b/app/Template/export/summary.php index 60aa306f..d9362a9b 100644 --- a/app/Template/export/summary.php +++ b/app/Template/export/summary.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Daily project summary export for "%s"', $project['name']) ?></h2> + <h2><?= t('Daily project summary export') ?></h2> </div> <p class="alert alert-info"><?= t('This export contains the number of tasks per column grouped per day.') ?></p> @@ -21,4 +21,4 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php index bed8ab90..ae411326 100644 --- a/app/Template/export/tasks.php +++ b/app/Template/export/tasks.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Tasks exportation for "%s"', $project['name']) ?></h2> + <h2><?= t('Tasks exportation') ?></h2> </div> <p class="alert alert-info"><?= t('This report contains all tasks information for the given date range.') ?></p> @@ -21,4 +21,4 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/feed/project.php b/app/Template/feed/project.php deleted file mode 100644 index 213a04d4..00000000 --- a/app/Template/feed/project.php +++ /dev/null @@ -1,27 +0,0 @@ -<?= '<?xml version="1.0" encoding="utf-8"?>' ?> -<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom"> - <title><?= t('%s\'s activity', $project['name']) ?></title> - <link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/> - <link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'project', array('token' => $project['token']), false, '', true) ?>"/> - <updated><?= date(DATE_ATOM) ?></updated> - <id><?= $this->url->href('FeedController', 'project', array('token' => $project['token']), false, '', true) ?></id> - <icon><?= $this->url->base() ?>assets/img/favicon.png</icon> - - <?php foreach ($events as $e): ?> - <entry> - <title type="text"><?= $e['event_title'] ?></title> - <link rel="alternate" href="<?= $this->url->href('TaskViewController', 'show', array('task_id' => $e['task_id']), false, '', true) ?>"/> - <id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id> - <published><?= date(DATE_ATOM, $e['date_creation']) ?></published> - <updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated> - <author> - <name><?= $this->text->e($e['author']) ?></name> - </author> - <content type="html"> - <![CDATA[ - <?= $e['event_content'] ?> - ]]> - </content> - </entry> - <?php endforeach ?> -</feed> diff --git a/app/Template/feed/user.php b/app/Template/feed/user.php deleted file mode 100644 index 0c45f03c..00000000 --- a/app/Template/feed/user.php +++ /dev/null @@ -1,27 +0,0 @@ -<?= '<?xml version="1.0" encoding="utf-8"?>' ?> -<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom"> - <title><?= t('Project activities for %s', $user['name'] ?: $user['username']) ?></title> - <link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/> - <link rel="self" type="application/atom+xml" href="<?= $this->url->href('FeedController', 'user', array('token' => $user['token']), false, '', true) ?>"/> - <updated><?= date(DATE_ATOM) ?></updated> - <id><?= $this->url->href('FeedController', 'user', array('token' => $user['token']), false, '', true) ?></id> - <icon><?= $this->url->base() ?>assets/img/favicon.png</icon> - - <?php foreach ($events as $e): ?> - <entry> - <title type="text"><?= $e['event_title'] ?></title> - <link rel="alternate" href="<?= $this->url->href('TaskViewController', 'show', array('task_id' => $e['task_id']), false, '', true) ?>"/> - <id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id> - <published><?= date(DATE_ATOM, $e['date_creation']) ?></published> - <updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated> - <author> - <name><?= $this->text->e($e['author']) ?></name> - </author> - <content type="html"> - <![CDATA[ - <?= $e['event_content'] ?> - ]]> - </content> - </entry> - <?php endforeach ?> -</feed> diff --git a/app/Template/group/index.php b/app/Template/group/index.php index 1062e18c..fe8a07e7 100644 --- a/app/Template/group/index.php +++ b/app/Template/group/index.php @@ -8,7 +8,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is no group.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th> <th class="column-20"><?= $paginator->order(t('External Id'), 'external_id') ?></th> diff --git a/app/Template/group/users.php b/app/Template/group/users.php index a4895ab7..73597b39 100644 --- a/app/Template/group/users.php +++ b/app/Template/group/users.php @@ -8,7 +8,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is no user in this group.') ?></p> <?php else: ?> - <table> + <table class="table-striped table-scrolling"> <tr> <th><?= $paginator->order(t('Id'), 'id') ?></th> <th><?= $paginator->order(t('Username'), 'username') ?></th> diff --git a/app/Template/header.php b/app/Template/header.php index 13521ae7..2fe68ebe 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -1,118 +1,26 @@ -<header> - <nav> - <h1> - <span class="logo"> - <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?> - </span> - <span class="title"> - <?php if (isset($project) && ! empty($project)): ?> - <?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?> - <?php else: ?> - <?= $this->text->e($title) ?> - <?php endif ?> - </span> - <?php if (! empty($description)): ?> - <span class="tooltip" title="<?= $this->text->markdownAttribute($description) ?>"> - <i class="fa fa-info-circle"></i> - </span> - <?php endif ?> - </h1> - <ul> - <?php if (isset($board_selector) && ! empty($board_selector)): ?> - <li> - <select id="board-selector" - class="chosen-select select-auto-redirect" - tabindex="-1" - data-search-threshold="0" - data-notfound="<?= t('No results match:') ?>" - data-placeholder="<?= t('Display another project') ?>" - data-redirect-regex="PROJECT_ID" - data-redirect-url="<?= $this->url->href('BoardViewController', 'show', array('project_id' => 'PROJECT_ID')) ?>"> - <option value=""></option> - <?php foreach ($board_selector as $board_id => $board_name): ?> - <option value="<?= $board_id ?>"><?= $this->text->e($board_name) ?></option> - <?php endforeach ?> - </select> - </li> - <?php endif ?> - <li class="user-links"> - <?php if ($this->user->hasNotifications()): ?> - <span class="notification"> - <?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'DashboardController', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?> - </span> - <?php endif ?> - - <?php $has_project_creation_access = $this->user->hasAccess('ProjectCreationController', 'create'); ?> - <?php $is_private_project_enabled = $this->app->config('disable_private_project', 0) == 0; ?> - - <?php if ($has_project_creation_access || (!$has_project_creation_access && $is_private_project_enabled)): ?> - <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-plus fa-fw"></i><i class="fa fa-caret-down"></i></a> - <ul> - <?php if ($has_project_creation_access): ?> - <li><i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?></li> - <?php endif ?> - <?php if ($is_private_project_enabled): ?> - <li> - <i class="fa fa-lock fa-fw"></i> - <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?> - </li> - <?php endif ?> - </ul> - </div> - <?php endif ?> +<?php $_title = $this->render('header/title', array( + 'project' => isset($project) ? $project : null, + 'task' => isset($task) ? $task : null, + 'description' => isset($description) ? $description : null, + 'title' => $title, +)) ?> - <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-icon"><?= $this->avatar->currentUserSmall('avatar-inline') ?><i class="fa fa-caret-down"></i></a> - <ul> - <li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li> - <li> - <i class="fa fa-tachometer fa-fw"></i> - <?= $this->url->link(t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?> - </li> - <li> - <i class="fa fa-home fa-fw"></i> - <?= $this->url->link(t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?> - </li> - <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('Projects management'), 'ProjectListController', 'show') ?> - </li> - <?php if ($this->user->hasAccess('UserListController', 'show')): ?> - <li> - <i class="fa fa-user fa-fw"></i> - <?= $this->url->link(t('Users management'), 'UserListController', 'show') ?> - </li> - <li> - <i class="fa fa-group fa-fw"></i> - <?= $this->url->link(t('Groups management'), 'GroupListController', 'index') ?> - </li> - <li> - <i class="fa fa-cubes" aria-hidden="true"></i> - <?= $this->url->link(t('Plugins'), 'PluginController', 'show') ?> - </li> - <li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Settings'), 'ConfigController', 'index') ?> - </li> - <?php endif ?> +<?php $_top_right_corner = implode(' ', array( + $this->render('header/user_notifications'), + $this->render('header/creation_dropdown'), + $this->render('header/user_dropdown') + )) ?> - <?= $this->hook->render('template:header:dropdown') ?> - - <li> - <i class="fa fa-life-ring fa-fw"></i> - <?= $this->url->link(t('Documentation'), 'DocumentationController', 'show') ?> - </li> - <?php if (! DISABLE_LOGOUT): ?> - <li> - <i class="fa fa-sign-out fa-fw"></i> - <?= $this->url->link(t('Logout'), 'AuthController', 'logout') ?> - </li> - <?php endif ?> - </ul> - </div> - </li> - </ul> - </nav> +<header> + <div class="title-container"> + <?= $_title ?> + </div> + <?php if (! empty($board_selector)): ?> + <div class="board-selector-container"> + <?= $this->render('header/board_selector', array('board_selector' => $board_selector)) ?> + </div> + <?php endif ?> + <div class="menus-container pull-right"> + <?= $_top_right_corner ?> + </div> </header> diff --git a/app/Template/header/board_selector.php b/app/Template/header/board_selector.php new file mode 100644 index 00000000..b42d47f9 --- /dev/null +++ b/app/Template/header/board_selector.php @@ -0,0 +1,13 @@ +<select id="board-selector" + class="chosen-select select-auto-redirect" + tabindex="-1" + data-search-threshold="0" + data-notfound="<?= t('No results match:') ?>" + data-placeholder="<?= t('Display another project') ?>" + data-redirect-regex="PROJECT_ID" + data-redirect-url="<?= $this->url->href('BoardViewController', 'show', array('project_id' => 'PROJECT_ID')) ?>"> + <option value=""></option> + <?php foreach ($board_selector as $board_id => $board_name): ?> + <option value="<?= $board_id ?>"><?= $this->text->e($board_name) ?></option> + <?php endforeach ?> +</select> diff --git a/app/Template/header/creation_dropdown.php b/app/Template/header/creation_dropdown.php new file mode 100644 index 00000000..d3b9e7cb --- /dev/null +++ b/app/Template/header/creation_dropdown.php @@ -0,0 +1,22 @@ +<?php $has_project_creation_access = $this->user->hasAccess('ProjectCreationController', 'create'); ?> +<?php $is_private_project_enabled = $this->app->config('disable_private_project', 0) == 0; ?> + +<?php if ($has_project_creation_access || (!$has_project_creation_access && $is_private_project_enabled)): ?> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-plus fa-fw"></i><i class="fa fa-caret-down"></i></a> + <ul> + <?php if ($has_project_creation_access): ?> + <li><i class="fa fa-plus fa-fw"></i> + <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?> + </li> + <?php endif ?> + <?php if ($is_private_project_enabled): ?> + <li> + <i class="fa fa-lock fa-fw"></i> + <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?> + </li> + <?php endif ?> + <?= $this->hook->render('template:header:creation-dropdown') ?> + </ul> + </div> +<?php endif ?> diff --git a/app/Template/header/title.php b/app/Template/header/title.php new file mode 100644 index 00000000..61c6ee9a --- /dev/null +++ b/app/Template/header/title.php @@ -0,0 +1,17 @@ +<h1> + <span class="logo"> + <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?> + </span> + <span class="title"> + <?php if (! empty($project) && ! empty($task)): ?> + <?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?> + <?php else: ?> + <?= $this->text->e($title) ?> + <?php endif ?> + </span> + <?php if (! empty($description)): ?> + <small class="tooltip" title="<?= $this->text->markdownAttribute($description) ?>"> + <i class="fa fa-info-circle"></i> + </small> + <?php endif ?> +</h1> diff --git a/app/Template/header/user_dropdown.php b/app/Template/header/user_dropdown.php new file mode 100644 index 00000000..49d08213 --- /dev/null +++ b/app/Template/header/user_dropdown.php @@ -0,0 +1,49 @@ +<div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon"><?= $this->avatar->currentUserSmall('avatar-inline') ?><i class="fa fa-caret-down"></i></a> + <ul> + <li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li> + <li> + <i class="fa fa-tachometer fa-fw"></i> + <?= $this->url->link(t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?> + </li> + <li> + <i class="fa fa-home fa-fw"></i> + <?= $this->url->link(t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?> + </li> + <li> + <i class="fa fa-folder fa-fw"></i> + <?= $this->url->link(t('Projects management'), 'ProjectListController', 'show') ?> + </li> + <?php if ($this->user->hasAccess('UserListController', 'show')): ?> + <li> + <i class="fa fa-user fa-fw"></i> + <?= $this->url->link(t('Users management'), 'UserListController', 'show') ?> + </li> + <li> + <i class="fa fa-group fa-fw"></i> + <?= $this->url->link(t('Groups management'), 'GroupListController', 'index') ?> + </li> + <li> + <i class="fa fa-cubes" aria-hidden="true"></i> + <?= $this->url->link(t('Plugins'), 'PluginController', 'show') ?> + </li> + <li> + <i class="fa fa-cog fa-fw"></i> + <?= $this->url->link(t('Settings'), 'ConfigController', 'index') ?> + </li> + <?php endif ?> + + <?= $this->hook->render('template:header:dropdown') ?> + + <li> + <i class="fa fa-life-ring fa-fw"></i> + <?= $this->url->link(t('Documentation'), 'DocumentationController', 'show') ?> + </li> + <?php if (! DISABLE_LOGOUT): ?> + <li> + <i class="fa fa-sign-out fa-fw"></i> + <?= $this->url->link(t('Logout'), 'AuthController', 'logout') ?> + </li> + <?php endif ?> + </ul> +</div> diff --git a/app/Template/header/user_notifications.php b/app/Template/header/user_notifications.php new file mode 100644 index 00000000..83c545d2 --- /dev/null +++ b/app/Template/header/user_notifications.php @@ -0,0 +1,5 @@ +<?php if ($this->user->hasNotifications()): ?> + <span class="notification"> + <?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'DashboardController', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?> + </span> +<?php endif ?> diff --git a/app/Template/layout.php b/app/Template/layout.php index 411237cb..8c85ffc6 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -15,7 +15,6 @@ <?= $this->asset->colorCss() ?> <?= $this->asset->css('assets/css/vendor.min.css') ?> <?= $this->asset->css('assets/css/app.min.css') ?> - <?= $this->asset->css('assets/css/print.min.css', true, 'print') ?> <?= $this->asset->customCss() ?> <?php if (! isset($not_editable)): ?> diff --git a/app/Template/link/index.php b/app/Template/link/index.php index 7e32069a..70ead4a6 100644 --- a/app/Template/link/index.php +++ b/app/Template/link/index.php @@ -2,7 +2,7 @@ <h2><?= t('Link labels') ?></h2> </div> <?php if (! empty($links)): ?> -<table> +<table class="table-striped table-scrolling"> <tr> <th class="column-70"><?= t('Link labels') ?></th> <th><?= t('Actions') ?></th> diff --git a/app/Template/notification/comment_delete.php b/app/Template/notification/comment_delete.php new file mode 100644 index 00000000..928623ec --- /dev/null +++ b/app/Template/notification/comment_delete.php @@ -0,0 +1,7 @@ +<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> + +<h3><?= t('Comment removed') ?></h3> + +<?= $this->text->markdown($comment['comment']) ?> + +<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> diff --git a/app/Template/notification/subtask_delete.php b/app/Template/notification/subtask_delete.php new file mode 100644 index 00000000..8c5f262c --- /dev/null +++ b/app/Template/notification/subtask_delete.php @@ -0,0 +1,11 @@ +<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> + +<h3><?= t('Subtask removed') ?></h3> + +<ul> + <li><?= t('Title:') ?> <?= $this->text->e($subtask['title']) ?></li> + <li><?= t('Status:') ?> <?= $this->text->e($subtask['status_name']) ?></li> + <li><?= t('Assignee:') ?> <?= $this->text->e($subtask['name'] ?: $subtask['username'] ?: '?') ?></li> +</ul> + +<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> diff --git a/app/Template/notification/task_file_create.php b/app/Template/notification/task_file_create.php index feab8dd2..c19f7279 100644 --- a/app/Template/notification/task_file_create.php +++ b/app/Template/notification/task_file_create.php @@ -2,4 +2,4 @@ <p><?= t('New attachment added "%s"', $file['name']) ?></p> -<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file +<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> diff --git a/app/Template/notification/task_internal_link_create_update.php b/app/Template/notification/task_internal_link_create_update.php new file mode 100644 index 00000000..73cad84d --- /dev/null +++ b/app/Template/notification/task_internal_link_create_update.php @@ -0,0 +1,11 @@ +<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> + +<p> + <?= e( + 'This task is now linked to the task %s with the relation "%s"', + $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])), + $this->text->e($task_link['label']) + ) ?> +</p> + +<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> diff --git a/app/Template/notification/task_internal_link_delete.php b/app/Template/notification/task_internal_link_delete.php new file mode 100644 index 00000000..bb54e0a7 --- /dev/null +++ b/app/Template/notification/task_internal_link_delete.php @@ -0,0 +1,11 @@ +<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> + +<p> + <?= e( + 'The link with the relation "%s" to the task %s have been removed', + $this->text->e($task_link['label']), + $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])) + ) ?> +</p> + +<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> diff --git a/app/Template/plugin/sidebar.php b/app/Template/plugin/sidebar.php index e1b47632..dd1a2a6b 100644 --- a/app/Template/plugin/sidebar.php +++ b/app/Template/plugin/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Actions') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('PluginController', 'show') ?>> <?= $this->url->link(t('Installed Plugins'), 'PluginController', 'show') ?> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 9bc0c9c4..3be0da48 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Actions') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('ProjectViewController', 'show') ?>> <?= $this->url->link(t('Summary'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> @@ -32,6 +31,9 @@ <li <?= $this->app->checkMenuSelection('CategoryController') ?>> <?= $this->url->link(t('Categories'), 'CategoryController', 'index', array('project_id' => $project['id'])) ?> </li> + <li <?= $this->app->checkMenuSelection('ProjectTagController') ?>> + <?= $this->url->link(t('Tags'), 'ProjectTagController', 'index', array('project_id' => $project['id'])) ?> + </li> <?php if ($project['is_private'] == 0): ?> <li <?= $this->app->checkMenuSelection('ProjectPermissionController') ?>> <?= $this->url->link(t('Permissions'), 'ProjectPermissionController', 'index', array('project_id' => $project['id'])) ?> diff --git a/app/Template/project_creation/create.php b/app/Template/project_creation/create.php index 01d06bab..b90b15c4 100644 --- a/app/Template/project_creation/create.php +++ b/app/Template/project_creation/create.php @@ -19,13 +19,14 @@ <p class="alert"><?= t('Which parts of the project do you want to duplicate?') ?></p> <?php if (! $is_private): ?> - <?= $this->form->checkbox('projectPermission', t('Permissions'), 1, true) ?> + <?= $this->form->checkbox('projectPermissionModel', t('Permissions'), 1, true) ?> <?php endif ?> <?= $this->form->checkbox('categoryModel', t('Categories'), 1, true) ?> + <?= $this->form->checkbox('tagDuplicationModel', t('Tags'), 1, true) ?> <?= $this->form->checkbox('actionModel', t('Actions'), 1, true) ?> <?= $this->form->checkbox('swimlaneModel', t('Swimlanes'), 1, true) ?> - <?= $this->form->checkbox('taskModel', t('Tasks'), 1, false) ?> + <?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?> </div> <div class="form-actions"> diff --git a/app/Template/project_header/dropdown.php b/app/Template/project_header/dropdown.php index 79a1b389..f8901289 100644 --- a/app/Template/project_header/dropdown.php +++ b/app/Template/project_header/dropdown.php @@ -20,14 +20,6 @@ <i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a> </span> </li> - <li> - <span class="filter-max-height" style="display: none"> - <i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Set maximum column height') ?></a> - </span> - <span class="filter-min-height"> - <i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Remove maximum column height') ?></a> - </span> - </li> <?php endif ?> <?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?> diff --git a/app/Template/project_header/header.php b/app/Template/project_header/header.php index aaa8137b..6c91e38b 100644 --- a/app/Template/project_header/header.php +++ b/app/Template/project_header/header.php @@ -1,15 +1,21 @@ <div class="project-header"> <?= $this->hook->render('template:project:header:before', array('project' => $project)) ?> - <?= $this->render('project_header/dropdown', array('project' => $project, 'board_view' => $board_view)) ?> - <?= $this->render('project_header/views', array('project' => $project, 'filters' => $filters)) ?> - <?= $this->render('project_header/search', array( - 'project' => $project, - 'filters' => $filters, - 'custom_filters_list' => isset($custom_filters_list) ? $custom_filters_list : array(), - 'users_list' => isset($users_list) ? $users_list : array(), - 'categories_list' => isset($categories_list) ? $categories_list : array(), - )) ?> + <div class="dropdown-component"> + <?= $this->render('project_header/dropdown', array('project' => $project, 'board_view' => $board_view)) ?> + </div> + <div class="views-switcher-component"> + <?= $this->render('project_header/views', array('project' => $project, 'filters' => $filters)) ?> + </div> + <div class="filter-box-component"> + <?= $this->render('project_header/search', array( + 'project' => $project, + 'filters' => $filters, + 'custom_filters_list' => isset($custom_filters_list) ? $custom_filters_list : array(), + 'users_list' => isset($users_list) ? $users_list : array(), + 'categories_list' => isset($categories_list) ? $categories_list : array(), + )) ?> + </div> <?= $this->hook->render('template:project:header:after', array('project' => $project)) ?> -</div>
\ No newline at end of file +</div> diff --git a/app/Template/project_header/search.php b/app/Template/project_header/search.php index 8885d9c9..512e88d7 100644 --- a/app/Template/project_header/search.php +++ b/app/Template/project_header/search.php @@ -3,43 +3,54 @@ <?= $this->form->hidden('controller', $filters) ?> <?= $this->form->hidden('action', $filters) ?> <?= $this->form->hidden('project_id', $filters) ?> - <?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"')) ?> - <?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?> + <div class="input-addon"> + <?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?> + </div> - <?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?> - <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Custom filters') ?>"><i class="fa fa-bookmark fa-fw"></i><i class="fa fa-caret-down"></i></a> - <ul> - <?php foreach ($custom_filters_list as $filter): ?> - <li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li> - <?php endforeach ?> - </ul> - </div> - <?php endif ?> + <?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?> + <div class="input-addon-item"> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Custom filters') ?>"><i class="fa fa-bookmark fa-fw"></i><i class="fa fa-caret-down"></i></a> + <ul> + <?php foreach ($custom_filters_list as $filter): ?> + <li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </div> + <?php endif ?> - <?php if (isset($users_list)): ?> - <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('User filters') ?>"><i class="fa fa-users fa-fw"></i> <i class="fa fa-caret-down"></i></a> - <ul> - <li><a href="#" class="filter-helper" data-unique-filter="assignee:nobody"><?= t('Not assigned') ?></a></li> - <?php foreach ($users_list as $user): ?> - <li><a href="#" class="filter-helper" data-unique-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li> - <?php endforeach ?> - </ul> - </div> - <?php endif ?> + <?php if (isset($users_list)): ?> + <div class="input-addon-item"> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('User filters') ?>"><i class="fa fa-users fa-fw"></i> <i class="fa fa-caret-down"></i></a> + <ul> + <li><a href="#" class="filter-helper" data-unique-filter="assignee:nobody"><?= t('Not assigned') ?></a></li> + <?php foreach ($users_list as $user): ?> + <li><a href="#" class="filter-helper" data-unique-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </div> + <?php endif ?> - <?php if (isset($categories_list) && ! empty($categories_list)): ?> - <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Category filters') ?>"><i class="fa fa-tags fa-fw"></i><i class="fa fa-caret-down"></i></a> - <ul> - <li><a href="#" class="filter-helper" data-unique-filter="category:none"><?= t('No category') ?></a></li> - <?php foreach ($categories_list as $category): ?> - <li><a href="#" class="filter-helper" data-unique-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li> - <?php endforeach ?> - </ul> + <?php if (isset($categories_list) && ! empty($categories_list)): ?> + <div class="input-addon-item"> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Category filters') ?>"><i class="fa fa-tags fa-fw"></i><i class="fa fa-caret-down"></i></a> + <ul> + <li><a href="#" class="filter-helper" data-unique-filter="category:none"><?= t('No category') ?></a></li> + <?php foreach ($categories_list as $category): ?> + <li><a href="#" class="filter-helper" data-unique-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </div> + <?php endif ?> </div> - <?php endif ?> + </form> </div> diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php index 8b9f1396..8e4c3e6a 100644 --- a/app/Template/project_list/show.php +++ b/app/Template/project_list/show.php @@ -12,13 +12,13 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No project') ?></p> <?php else: ?> - <table class="table-stripped table-small"> + <table class="table-striped table-scrolling"> <tr> - <th class="column-3"><?= $paginator->order(t('Id'), 'id') ?></th> - <th class="column-5"><?= $paginator->order(t('Status'), 'is_active') ?></th> + <th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th> + <th class="column-8"><?= $paginator->order(t('Status'), 'is_active') ?></th> <th class="column-15"><?= $paginator->order(t('Project'), 'name') ?></th> - <th class="column-8"><?= $paginator->order(t('Start date'), 'start_date') ?></th> - <th class="column-8"><?= $paginator->order(t('End date'), 'end_date') ?></th> + <th class="column-10"><?= $paginator->order(t('Start date'), 'start_date') ?></th> + <th class="column-10"><?= $paginator->order(t('End date'), 'end_date') ?></th> <th class="column-15"><?= $paginator->order(t('Owner'), 'owner_id') ?></th> <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?> <th class="column-10"><?= t('Users') ?></th> @@ -73,7 +73,7 @@ <td class="dashboard-project-stats"> <?php foreach ($project['columns'] as $column): ?> <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong> - <span><?= $this->text->e($column['title']) ?></span> + <small><?= $this->text->e($column['title']) ?></small> <?php endforeach ?> </td> </tr> diff --git a/app/Template/project_overview/columns.php b/app/Template/project_overview/columns.php index cc5782bd..daae9ca7 100644 --- a/app/Template/project_overview/columns.php +++ b/app/Template/project_overview/columns.php @@ -1,8 +1,8 @@ <div class="project-overview-columns"> <?php foreach ($project['columns'] as $column): ?> <div class="project-overview-column"> - <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong><br> - <span><?= $this->text->e($column['title']) ?></span> + <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong> + <small><?= $this->text->e($column['title']) ?></small> </div> <?php endforeach ?> </div> diff --git a/app/Template/project_overview/files.php b/app/Template/project_overview/files.php index fa870938..826e6325 100644 --- a/app/Template/project_overview/files.php +++ b/app/Template/project_overview/files.php @@ -1,5 +1,5 @@ <?php if (! empty($files)): ?> - <table class="table-stripped"> + <table class="table-striped table-scrolling"> <tr> <th><?= t('Filename') ?></th> <th><?= t('Creator') ?></th> diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php index d850ec50..c7b17782 100644 --- a/app/Template/project_permission/index.php +++ b/app/Template/project_permission/index.php @@ -9,7 +9,7 @@ <?php if (empty($users)): ?> <div class="alert"><?= t('No user have been allowed specifically.') ?></div> <?php else: ?> - <table> + <table class="table-scrolling"> <tr> <th class="column-50"><?= t('User') ?></th> <th><?= t('Role') ?></th> @@ -69,7 +69,7 @@ <?php if (empty($groups)): ?> <div class="alert"><?= t('No group have been allowed specifically.') ?></div> <?php else: ?> - <table> + <table class="table-scrolling"> <tr> <th class="column-50"><?= t('Group') ?></th> <th><?= t('Role') ?></th> diff --git a/app/Template/project_tag/create.php b/app/Template/project_tag/create.php new file mode 100644 index 00000000..bfd1084a --- /dev/null +++ b/app/Template/project_tag/create.php @@ -0,0 +1,16 @@ +<div class="page-header"> + <h2><?= t('Add new tag') ?></h2> +</div> +<form method="post" class="popover-form" action="<?= $this->url->href('ProjectTagController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> + </div> +</form> diff --git a/app/Template/project_tag/edit.php b/app/Template/project_tag/edit.php new file mode 100644 index 00000000..9bf261bd --- /dev/null +++ b/app/Template/project_tag/edit.php @@ -0,0 +1,17 @@ +<div class="page-header"> + <h2><?= t('Edit a tag') ?></h2> +</div> +<form method="post" class="popover-form" action="<?= $this->url->href('ProjectTagController', 'update', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array(), false, 'close-popover') ?> + </div> +</form> diff --git a/app/Template/project_tag/index.php b/app/Template/project_tag/index.php new file mode 100644 index 00000000..f77e21ee --- /dev/null +++ b/app/Template/project_tag/index.php @@ -0,0 +1,31 @@ +<div class="page-header"> + <h2><?= t('Project tags') ?></h2> + <ul> + <li> + <i class="fa fa-plus" aria-hidden="true"></i> + <?= $this->url->link(t('Add new tag'), 'ProjectTagController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + </li> + </ul> +</div> + +<?php if (empty($tags)): ?> + <p class="alert"><?= t('There is no specific tag for this project at the moment.') ?></p> +<?php else: ?> + <table class="table-striped table-scrolling"> + <tr> + <th class="column-80"><?= t('Tag') ?></th> + <th><?= t('Action') ?></th> + </tr> + <?php foreach ($tags as $tag): ?> + <tr> + <td><?= $this->text->e($tag['name']) ?></td> + <td> + <i class="fa fa-times" aria-hidden="true"></i> + <?= $this->url->link(t('Remove'), 'ProjectTagController', 'confirm', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> + <i class="fa fa-pencil-square-o" aria-hidden="true"></i> + <?= $this->url->link(t('Edit'), 'ProjectTagController', 'edit', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> diff --git a/app/Template/project_tag/remove.php b/app/Template/project_tag/remove.php new file mode 100644 index 00000000..f4aadab1 --- /dev/null +++ b/app/Template/project_tag/remove.php @@ -0,0 +1,15 @@ +<div class="page-header"> + <h2><?= t('Remove a tag') ?></h2> +</div> + +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this tag: "%s"?', $tag['name']) ?> + </p> + + <div class="form-actions"> + <?= $this->url->link(t('Yes'), 'ProjectTagController', 'remove', array('tag_id' => $tag['id'], 'project_id' => $project['id']), true, 'btn btn-red popover-link') ?> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> + </div> +</div> diff --git a/app/Template/project_user_overview/roles.php b/app/Template/project_user_overview/roles.php index 87c8df85..011714d4 100644 --- a/app/Template/project_user_overview/roles.php +++ b/app/Template/project_user_overview/roles.php @@ -1,7 +1,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No project') ?></p> <?php else: ?> - <table class="table-fixed"> + <table class="table-fixed table-scrolling"> <tr> <th class="column-20"><?= $paginator->order(t('User'), 'users.username') ?></th> <th class="column-25"><?= $paginator->order(t('Project'), 'projects.name') ?></th> diff --git a/app/Template/project_user_overview/sidebar.php b/app/Template/project_user_overview/sidebar.php index 9a87d4eb..ccbf9cab 100644 --- a/app/Template/project_user_overview/sidebar.php +++ b/app/Template/project_user_overview/sidebar.php @@ -1,6 +1,4 @@ <div class="sidebar"> - <h2><?= t('Actions') ?></h2> - <?= $this->form->select( 'user_id', $users, diff --git a/app/Template/project_user_overview/tasks.php b/app/Template/project_user_overview/tasks.php index af0a3d97..8d682170 100644 --- a/app/Template/project_user_overview/tasks.php +++ b/app/Template/project_user_overview/tasks.php @@ -1,7 +1,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No tasks found.') ?></p> <?php elseif (! $paginator->isEmpty()): ?> - <table class="table-small"> + <table class="table-small table-striped table-scrolling"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> <th class="column-10"><?= $paginator->order(t('Project'), 'projects.name') ?></th> diff --git a/app/Template/project_user_overview/tooltip_users.php b/app/Template/project_user_overview/tooltip_users.php index 7117a87f..99b00030 100644 --- a/app/Template/project_user_overview/tooltip_users.php +++ b/app/Template/project_user_overview/tooltip_users.php @@ -1,7 +1,7 @@ <?php if (empty($users)): ?> <p><?= t('There is no project member.') ?></p> <?php else: ?> - <table> + <table class="table-small"> <?php foreach ($roles as $role => $role_name): ?> <?php if (isset($users[$role])): ?> <tr><th><?= $role_name ?></th></tr> diff --git a/app/Template/project_view/duplicate.php b/app/Template/project_view/duplicate.php index d2cd127a..561378d1 100644 --- a/app/Template/project_view/duplicate.php +++ b/app/Template/project_view/duplicate.php @@ -11,14 +11,15 @@ <?= $this->form->csrf() ?> <?php if ($project['is_private'] == 0): ?> - <?= $this->form->checkbox('projectPermission', t('Permissions'), 1, true) ?> + <?= $this->form->checkbox('projectPermissionModel', t('Permissions'), 1, true) ?> <?php endif ?> <?= $this->form->checkbox('categoryModel', t('Categories'), 1, true) ?> + <?= $this->form->checkbox('tagDuplicationModel', t('Tags'), 1, true) ?> <?= $this->form->checkbox('actionModel', t('Actions'), 1, true) ?> <?= $this->form->checkbox('swimlaneModel', t('Swimlanes'), 1, false) ?> - <?= $this->form->checkbox('taskModel', t('Tasks'), 1, false) ?> <?= $this->form->checkbox('projectMetadataModel', t('Metadata'), 1, false) ?> + <?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?> <div class="form-actions"> <button type="submit" class="btn btn-red"><?= t('Duplicate') ?></button> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php index 5efe8ce6..afe60384 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -52,11 +52,12 @@ <div class="page-header"> <h2><?= t('Board') ?></h2> </div> -<table class="table-stripped"> +<table class="table-striped table-scrolling"> <tr> - <th class="column-60"><?= t('Column') ?></th> + <th class="column-40"><?= t('Column') ?></th> <th class="column-20"><?= t('Task limit') ?></th> <th class="column-20"><?= t('Active tasks') ?></th> + <th class="column-20"><?= t('Hide tasks in this column in the dashboard') ?></th> </tr> <?php foreach ($stats['columns'] as $column): ?> <tr> @@ -70,6 +71,13 @@ </td> <td><?= $column['task_limit'] ?: '∞' ?></td> <td><?= $column['nb_active_tasks'] ?></td> + <td> + <?php if ($column['hide_in_dashboard'] == 1): ?> + <?= t('Yes') ?> + <?php else: ?> + <?= t('No') ?> + <?php endif ?> + </td> </tr> <?php endforeach ?> </table> diff --git a/app/Template/search/activity.php b/app/Template/search/activity.php index 9abc7d7e..1dfd9234 100644 --- a/app/Template/search/activity.php +++ b/app/Template/search/activity.php @@ -12,8 +12,13 @@ <form method="get" action="<?= $this->url->dir() ?>" class="search"> <?= $this->form->hidden('controller', $values) ?> <?= $this->form->hidden('action', $values) ?> - <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> - <?= $this->render('activity/filter_dropdown') ?> + + <div class="input-addon"> + <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper') ?> + </div> + </div> </form> </div> diff --git a/app/Template/search/index.php b/app/Template/search/index.php index bc528af7..c59a5c99 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -12,8 +12,13 @@ <form method="get" action="<?= $this->url->dir() ?>" class="search"> <?= $this->form->hidden('controller', $values) ?> <?= $this->form->hidden('action', $values) ?> - <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> - <?= $this->render('app/filters_helper') ?> + + <div class="input-addon"> + <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper') ?> + </div> + </div> </form> </div> diff --git a/app/Template/search/results.php b/app/Template/search/results.php index 8376b9e8..8c439a8a 100644 --- a/app/Template/search/results.php +++ b/app/Template/search/results.php @@ -1,4 +1,4 @@ -<table class="table-fixed table-small"> +<table class="table-small table-scrolling"> <tr> <th class="column-8"><?= $paginator->order(t('Project'), 'tasks.project_id') ?></th> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index 4c6484ef..5c60df44 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -1,6 +1,6 @@ <?php if (! empty($subtasks)): ?> <table - class="subtasks-table table-stripped" + class="subtasks-table table-striped table-scrolling" data-save-position-url="<?= $this->url->href('SubtaskController', 'movePosition', array('project_id' => $task['project_id'], 'task_id' => $task['id'])) ?>" > <thead> diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index be123b08..cefef9de 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -1,5 +1,5 @@ <table - class="swimlanes-table table-stripped" + class="swimlanes-table table-striped table-scrolling" data-save-position-url="<?= $this->url->href('SwimlaneController', 'move', array('project_id' => $project['id'])) ?>"> <thead> <tr> diff --git a/app/Template/tag/create.php b/app/Template/tag/create.php new file mode 100644 index 00000000..9b32bc46 --- /dev/null +++ b/app/Template/tag/create.php @@ -0,0 +1,16 @@ +<div class="page-header"> + <h2><?= t('Add new tag') ?></h2> +</div> +<form method="post" class="popover-form" action="<?= $this->url->href('TagController', 'save') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> + </div> +</form> diff --git a/app/Template/tag/edit.php b/app/Template/tag/edit.php new file mode 100644 index 00000000..f751ff49 --- /dev/null +++ b/app/Template/tag/edit.php @@ -0,0 +1,17 @@ +<div class="page-header"> + <h2><?= t('Edit a tag') ?></h2> +</div> +<form method="post" class="popover-form" action="<?= $this->url->href('TagController', 'update', array('tag_id' => $tag['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> + </div> +</form> diff --git a/app/Template/tag/index.php b/app/Template/tag/index.php new file mode 100644 index 00000000..8e0c9a06 --- /dev/null +++ b/app/Template/tag/index.php @@ -0,0 +1,31 @@ +<div class="page-header"> + <h2><?= t('Global tags') ?></h2> + <ul> + <li> + <i class="fa fa-plus" aria-hidden="true"></i> + <?= $this->url->link(t('Add new tag'), 'TagController', 'create', array(), false, 'popover') ?> + </li> + </ul> +</div> + +<?php if (empty($tags)): ?> + <p class="alert"><?= t('There is no global tag at the moment.') ?></p> +<?php else: ?> + <table class="table-striped table-scrolling"> + <tr> + <th class="column-80"><?= t('Tag') ?></th> + <th><?= t('Action') ?></th> + </tr> + <?php foreach ($tags as $tag): ?> + <tr> + <td><?= $this->text->e($tag['name']) ?></td> + <td> + <i class="fa fa-times" aria-hidden="true"></i> + <?= $this->url->link(t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id']), false, 'popover') ?> + <i class="fa fa-pencil-square-o" aria-hidden="true"></i> + <?= $this->url->link(t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id']), false, 'popover') ?> + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> diff --git a/app/Template/tag/remove.php b/app/Template/tag/remove.php new file mode 100644 index 00000000..46ea3f99 --- /dev/null +++ b/app/Template/tag/remove.php @@ -0,0 +1,15 @@ +<div class="page-header"> + <h2><?= t('Remove a tag') ?></h2> +</div> + +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this tag: "%s"?', $tag['name']) ?> + </p> + + <div class="form-actions"> + <?= $this->url->link(t('Yes'), 'TagController', 'remove', array('tag_id' => $tag['id']), true, 'btn btn-red popover-link') ?> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> + </div> +</div> 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> diff --git a/app/Template/task_bulk/show.php b/app/Template/task_bulk/show.php index 1391c2c1..11ddea31 100644 --- a/app/Template/task_bulk/show.php +++ b/app/Template/task_bulk/show.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Create tasks in bulk') ?></h2> + <h2><?= $this->text->e($project['name']) ?> > <?= t('Create tasks in bulk') ?></h2> </div> <form class="popover-form" method="post" action="<?= $this->url->href('TaskBulkController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> @@ -8,6 +8,7 @@ <?= $this->form->hidden('swimlane_id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> + <?= $this->task->selectColor($values) ?> <?= $this->task->selectAssignee($users_list, $values, $errors) ?> <?= $this->task->selectCategory($categories_list, $values, $errors) ?> @@ -15,8 +16,6 @@ <?= $this->form->textarea('tasks', $values, $errors, array('placeholder="'.t('My task title').'"')) ?> <p class="form-help"><?= t('Enter one task by line.') ?></p> - <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> - <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index 7bebbfe9..1a8a17d5 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -1,49 +1,45 @@ <div class="page-header"> - <h2><?= t('New task') ?></h2> + <h2><?= $this->text->e($project['name']) ?> > <?= t('New task') ?></h2> </div> <form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <div class="form-column"> - <?= $this->form->label(t('Title'), 'title') ?> - <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> - - <?= $this->form->label(t('Description'), 'description') ?> - <?= $this->form->textarea( - 'description', - $values, - $errors, - array( - 'placeholder="'.t('Leave a description').'"', - 'tabindex="2"', - 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $values['project_id'])).'"' - ), - 'markdown-editor' - ) ?> - - <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> - - <?php if (! isset($duplicate)): ?> - <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> - <?php endif ?> - - <?= $this->hook->render('template:task:form:left-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-column"> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> - <?= $this->task->selectColumn($columns_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> - - <?= $this->hook->render('template:task:form:right-column', array('values' => $values, 'errors' => $errors)) ?> + <div class="form-columns"> + <div class="form-column"> + <?= $this->task->selectTitle($values, $errors) ?> + <?= $this->task->selectDescription($values, $errors) ?> + <?= $this->task->selectTags($project) ?> + + <?php if (! isset($duplicate)): ?> + <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> + <?php endif ?> + + <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="form-column"> + <?= $this->form->hidden('project_id', $values) ?> + <?= $this->task->selectColor($values) ?> + <?= $this->task->selectAssignee($users_list, $values, $errors) ?> + <?= $this->task->selectCategory($categories_list, $values, $errors) ?> + <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> + <?= $this->task->selectColumn($columns_list, $values, $errors) ?> + <?= $this->task->selectPriority($project, $values) ?> + <?= $this->task->selectScore($values, $errors) ?> + <?= $this->task->selectReference($values, $errors) ?> + + <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="form-column"> + <?= $this->task->selectTimeEstimated($values, $errors) ?> + <?= $this->task->selectTimeSpent($values, $errors) ?> + <?= $this->task->selectStartDate($values, $errors) ?> + <?= $this->task->selectDueDate($values, $errors) ?> + + <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> + </div> </div> <div class="form-actions"> diff --git a/app/Template/task_external_link/table.php b/app/Template/task_external_link/table.php index 56ef0363..cdfe0028 100644 --- a/app/Template/task_external_link/table.php +++ b/app/Template/task_external_link/table.php @@ -1,5 +1,5 @@ <?php if (! empty($links)): ?> -<table class="table-stripped table-small"> +<table class="table-striped table-scrolling"> <tr> <th class="column-10"><?= t('Type') ?></th> <th><?= t('Title') ?></th> diff --git a/app/Template/task_file/files.php b/app/Template/task_file/files.php index 7ca59b1c..94c26f73 100644 --- a/app/Template/task_file/files.php +++ b/app/Template/task_file/files.php @@ -1,5 +1,5 @@ <?php if (! empty($files)): ?> - <table class="table-stripped table-small"> + <table class="table-striped table-scrolling"> <tr> <th><?= t('Filename') ?></th> <th><?= t('Creator') ?></th> diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php index 683bc8c8..7906c39a 100644 --- a/app/Template/task_gantt_creation/show.php +++ b/app/Template/task_gantt_creation/show.php @@ -1,30 +1,41 @@ <div class="page-header"> - <h2><?= t('New task') ?></h2> + <h2><?= $this->text->e($project['name']) ?> > <?= t('New task') ?></h2> </div> -<form method="post" action="<?= $this->url->href('TaskGanttCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> +<form class="popover-form" method="post" action="<?= $this->url->href('TaskGanttCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->hidden('column_id', $values) ?> <?= $this->form->hidden('position', $values) ?> - <div class="form-column"> - <?= $this->form->label(t('Title'), 'title') ?> - <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> + <div class="form-columns"> + <div class="form-column"> + <?= $this->task->selectTitle($values, $errors) ?> + <?= $this->task->selectDescription($values, $errors) ?> + <?= $this->task->selectTags($project) ?> - <?= $this->form->label(t('Description'), 'description') ?> - <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"'), 'markdown-editor') ?> + <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> + </div> - <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> - </div> + <div class="form-column"> + <?= $this->task->selectColor($values) ?> + <?= $this->task->selectAssignee($users_list, $values, $errors) ?> + <?= $this->task->selectCategory($categories_list, $values, $errors) ?> + <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> + <?= $this->task->selectPriority($project, $values) ?> + <?= $this->task->selectScore($values, $errors) ?> + <?= $this->task->selectReference($values, $errors) ?> + + <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="form-column"> + <?= $this->task->selectTimeEstimated($values, $errors) ?> + <?= $this->task->selectTimeSpent($values, $errors) ?> + <?= $this->task->selectStartDate($values, $errors) ?> + <?= $this->task->selectDueDate($values, $errors) ?> - <div class="form-column"> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> + <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> + </div> </div> <div class="form-actions"> diff --git a/app/Template/task_import/sidebar.php b/app/Template/task_import/sidebar.php index 4cd92af8..04896948 100644 --- a/app/Template/task_import/sidebar.php +++ b/app/Template/task_import/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= t('Imports') ?></h2> <ul> <li <?= $this->app->checkMenuSelection('TaskImportController', 'show') ?>> <?= $this->url->link(t('Tasks').' (CSV)', 'TaskImportController', 'show', array('project_id' => $project['id'])) ?> diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php index 424d4791..6584a33a 100644 --- a/app/Template/task_internal_link/table.php +++ b/app/Template/task_internal_link/table.php @@ -1,5 +1,5 @@ <?php if (! empty($links)): ?> -<table class="task-links-table table-stripped"> +<table class="task-links-table table-striped table-scrolling"> <?php foreach ($links as $label => $grouped_links): ?> <?php $hide_td = false ?> <?php foreach ($grouped_links as $link): ?> diff --git a/app/Template/task_list/show.php b/app/Template/task_list/show.php index bb95b6a3..0518e4c3 100644 --- a/app/Template/task_list/show.php +++ b/app/Template/task_list/show.php @@ -4,7 +4,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No tasks found.') ?></p> <?php elseif (! $paginator->isEmpty()): ?> - <table class="table-fixed table-small"> + <table class="table-striped table-scrolling table-small"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> <th class="column-10"><?= $paginator->order(t('Swimlane'), 'tasks.swimlane_id') ?></th> diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php deleted file mode 100644 index 339ed036..00000000 --- a/app/Template/task_modification/edit_description.php +++ /dev/null @@ -1,27 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit the description') ?></h2> -</div> - -<form class="popover-form" method="post" action="<?= $this->url->href('TaskModificationController', 'updateDescription', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - - <?= $this->form->textarea( - 'description', - $values, - $errors, - array( - 'autofocus', - 'placeholder="'.t('Leave a description').'"', - 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $task['project_id'])).'"' - ), - 'markdown-editor' - ) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> -</form> diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php deleted file mode 100644 index 0707fd9a..00000000 --- a/app/Template/task_modification/edit_task.php +++ /dev/null @@ -1,38 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit a task') ?></h2> -</div> -<form class="popover-form" method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('project_id', $values) ?> - - <div class="form-column"> - <?= $this->form->label(t('Title'), 'title') ?> - <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - - <?= $this->hook->render('template:task:form:left-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-column"> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> - - <?= $this->hook->render('template:task:form:right-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-clear"> - <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> - </div> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> -</form> diff --git a/app/Template/task_modification/show.php b/app/Template/task_modification/show.php new file mode 100644 index 00000000..734b247a --- /dev/null +++ b/app/Template/task_modification/show.php @@ -0,0 +1,44 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= $this->text->e($task['title']) ?></h2> +</div> +<form class="popover-form" method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> + + <div class="form-columns"> + <div class="form-column"> + <?= $this->task->selectTitle($values, $errors) ?> + <?= $this->task->selectDescription($values, $errors) ?> + <?= $this->task->selectTags($project, $tags) ?> + + <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="form-column"> + <?= $this->task->selectColor($values) ?> + <?= $this->task->selectAssignee($users_list, $values, $errors) ?> + <?= $this->task->selectCategory($categories_list, $values, $errors) ?> + <?= $this->task->selectPriority($project, $values) ?> + <?= $this->task->selectScore($values, $errors) ?> + <?= $this->task->selectReference($values, $errors) ?> + + <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="form-column"> + <?= $this->task->selectTimeEstimated($values, $errors) ?> + <?= $this->task->selectTimeSpent($values, $errors) ?> + <?= $this->task->selectStartDate($values, $errors) ?> + <?= $this->task->selectDueDate($values, $errors) ?> + + <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + </div> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + </div> +</form> diff --git a/app/Template/task_popover/change_assignee.php b/app/Template/task_popover/change_assignee.php deleted file mode 100644 index 02f3e198..00000000 --- a/app/Template/task_popover/change_assignee.php +++ /dev/null @@ -1,20 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Change assignee for the task "%s"', $values['title']) ?></h2> - </div> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskPopoverController', 'updateAssignee', array('task_id' => $values['id'], 'project_id' => $project['id'])) ?>"> - - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->task->selectAssignee($users_list, $values, array(), array('autofocus')) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </form> -</section> diff --git a/app/Template/task_popover/change_category.php b/app/Template/task_popover/change_category.php deleted file mode 100644 index eb6a373d..00000000 --- a/app/Template/task_popover/change_category.php +++ /dev/null @@ -1,20 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Change category for the task "%s"', $values['title']) ?></h2> - </div> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskPopoverController', 'updateCategory', array('task_id' => $values['id'], 'project_id' => $project['id'])) ?>"> - - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->task->selectCategory($categories_list, $values, array(), array('autofocus'), true) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </form> -</section> diff --git a/app/Template/user_creation/local.php b/app/Template/user_creation/local.php index 4c224cec..059a0114 100644 --- a/app/Template/user_creation/local.php +++ b/app/Template/user_creation/local.php @@ -4,37 +4,39 @@ <form class="popover-form" method="post" action="<?= $this->url->href('UserCreationController', 'save') ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <div class="form-column"> - <?= $this->form->label(t('Username'), 'username') ?> - <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <div class="form-columns"> + <div class="form-column"> + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors) ?> + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors) ?> - <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors) ?> + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors) ?> - <?= $this->form->label(t('Password'), 'password') ?> - <?= $this->form->password('password', $values, $errors, array('required')) ?> + <?= $this->form->label(t('Password'), 'password') ?> + <?= $this->form->password('password', $values, $errors, array('required')) ?> - <?= $this->form->label(t('Confirmation'), 'confirmation') ?> - <?= $this->form->password('confirmation', $values, $errors, array('required')) ?> - </div> + <?= $this->form->label(t('Confirmation'), 'confirmation') ?> + <?= $this->form->password('confirmation', $values, $errors, array('required')) ?> + </div> - <div class="form-column"> - <?= $this->form->label(t('Add project member'), 'project_id') ?> - <?= $this->form->select('project_id', $projects, $values, $errors) ?> + <div class="form-column"> + <?= $this->form->label(t('Add project member'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?> - <?= $this->form->label(t('Timezone'), 'timezone') ?> - <?= $this->form->select('timezone', $timezones, $values, $errors) ?> + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors) ?> - <?= $this->form->label(t('Language'), 'language') ?> - <?= $this->form->select('language', $languages, $values, $errors) ?> + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors) ?> - <?= $this->form->label(t('Role'), 'role') ?> - <?= $this->form->select('role', $roles, $values, $errors) ?> + <?= $this->form->label(t('Role'), 'role') ?> + <?= $this->form->select('role', $roles, $values, $errors) ?> - <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + </div> </div> <div class="form-actions"> diff --git a/app/Template/user_creation/remote.php b/app/Template/user_creation/remote.php index dc4981a4..41d0d3c7 100644 --- a/app/Template/user_creation/remote.php +++ b/app/Template/user_creation/remote.php @@ -2,38 +2,39 @@ <h2><?= t('New remote user') ?></h2> </div> <form class="popover-form" method="post" action="<?= $this->url->href('UserCreationController', 'save') ?>" autocomplete="off"> - <?= $this->form->csrf() ?> <?= $this->form->hidden('is_ldap_user', array('is_ldap_user' => 1)) ?> - <div class="form-column"> - <?= $this->form->label(t('Username'), 'username') ?> - <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - - <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors) ?> + <div class="form-columns"> + <div class="form-column"> + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors) ?> - <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors) ?> + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors) ?> - <?= $this->hook->render('template:user:create-remote:form', array('values' => $values, 'errors' => $errors)) ?> - </div> + <?= $this->hook->render('template:user:create-remote:form', array('values' => $values, 'errors' => $errors)) ?> + </div> - <div class="form-column"> - <?= $this->form->label(t('Add project member'), 'project_id') ?> - <?= $this->form->select('project_id', $projects, $values, $errors) ?> + <div class="form-column"> + <?= $this->form->label(t('Add project member'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?> - <?= $this->form->label(t('Timezone'), 'timezone') ?> - <?= $this->form->select('timezone', $timezones, $values, $errors) ?> + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors) ?> - <?= $this->form->label(t('Language'), 'language') ?> - <?= $this->form->select('language', $languages, $values, $errors) ?> + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors) ?> - <?= $this->form->label(t('Role'), 'role') ?> - <?= $this->form->select('role', $roles, $values, $errors) ?> + <?= $this->form->label(t('Role'), 'role') ?> + <?= $this->form->select('role', $roles, $values, $errors) ?> - <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> - <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + </div> </div> <div class="form-actions"> diff --git a/app/Template/user_list/show.php b/app/Template/user_list/show.php index b2bd9377..5e285c89 100644 --- a/app/Template/user_list/show.php +++ b/app/Template/user_list/show.php @@ -12,7 +12,7 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No user') ?></p> <?php else: ?> - <table class="table-stripped"> + <table class="table-scrolling table-striped"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th> <th class="column-18"><?= $paginator->order(t('Username'), 'username') ?></th> diff --git a/app/Template/user_modification/show.php b/app/Template/user_modification/show.php index 396d550d..506c9161 100644 --- a/app/Template/user_modification/show.php +++ b/app/Template/user_modification/show.php @@ -11,16 +11,16 @@ <?= $this->form->text('username', $values, $errors, array('required', isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?> <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors) ?> + <?= $this->form->text('name', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_name') ? '' : 'readonly')) ?> <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors) ?> + <?= $this->form->email('email', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_email') ? '' : 'readonly')) ?> <?= $this->form->label(t('Timezone'), 'timezone') ?> - <?= $this->form->select('timezone', $timezones, $values, $errors) ?> + <?= $this->form->select('timezone', $timezones, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_timezone') ? '' : 'disabled')) ?> <?= $this->form->label(t('Language'), 'language') ?> - <?= $this->form->select('language', $languages, $values, $errors) ?> + <?= $this->form->select('language', $languages, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_language') ? '' : 'disabled')) ?> <?php if ($this->user->isAdmin()): ?> <?= $this->form->label(t('Role'), 'role') ?> diff --git a/app/Template/user_view/last.php b/app/Template/user_view/last.php index 3de4d5e2..72f59bf6 100644 --- a/app/Template/user_view/last.php +++ b/app/Template/user_view/last.php @@ -5,7 +5,7 @@ <?php if (empty($last_logins)): ?> <p class="alert"><?= t('Never connected.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Login date') ?></th> <th class="column-15"><?= t('Authentication method') ?></th> @@ -21,4 +21,4 @@ </tr> <?php endforeach ?> </table> -<?php endif ?>
\ No newline at end of file +<?php endif ?> diff --git a/app/Template/user_view/password_reset.php b/app/Template/user_view/password_reset.php index 1371ce11..de7047e0 100644 --- a/app/Template/user_view/password_reset.php +++ b/app/Template/user_view/password_reset.php @@ -5,7 +5,7 @@ <?php if (empty($tokens)): ?> <p class="alert"><?= t('The password has never been reinitialized.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Creation') ?></th> <th class="column-20"><?= t('Expiration') ?></th> @@ -23,4 +23,4 @@ </tr> <?php endforeach ?> </table> -<?php endif ?>
\ No newline at end of file +<?php endif ?> diff --git a/app/Template/user_view/sessions.php b/app/Template/user_view/sessions.php index eda3ef7f..10497e4f 100644 --- a/app/Template/user_view/sessions.php +++ b/app/Template/user_view/sessions.php @@ -5,7 +5,7 @@ <?php if (empty($sessions)): ?> <p class="alert"><?= t('No session.') ?></p> <?php else: ?> - <table class="table-small table-fixed"> + <table class="table-small table-fixed table-scrolling table-striped"> <tr> <th class="column-20"><?= t('Creation date') ?></th> <th class="column-20"><?= t('Expiration date') ?></th> diff --git a/app/Template/user_view/sidebar.php b/app/Template/user_view/sidebar.php index d200a7f5..a80daefa 100644 --- a/app/Template/user_view/sidebar.php +++ b/app/Template/user_view/sidebar.php @@ -1,5 +1,7 @@ <div class="sidebar"> - <h2><?= t('Information') ?></h2> + <div class="sidebar-title"> + <h2><?= t('Information') ?></h2> + </div> <ul> <?php if ($this->user->hasAccess('UserViewController', 'show')): ?> <li <?= $this->app->checkMenuSelection('UserViewController', 'show') ?>> @@ -12,24 +14,34 @@ </li> <?php endif ?> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'timesheet') ?>> - <?= $this->url->link(t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'lastLogin') ?>> - <?= $this->url->link(t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'sessions') ?>> - <?= $this->url->link(t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'passwordReset') ?>> - <?= $this->url->link(t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> - </li> + <?php if ($this->user->hasAccess('UserViewController', 'timesheet')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'timesheet') ?>> + <?= $this->url->link(t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'lastLogin')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'lastLogin') ?>> + <?= $this->url->link(t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'sessions')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'sessions') ?>> + <?= $this->url->link(t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'passwordReset')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'passwordReset') ?>> + <?= $this->url->link(t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> <?php endif ?> <?= $this->hook->render('template:user:sidebar:information', array('user' => $user)) ?> </ul> - <h2><?= t('Actions') ?></h2> + <div class="sidebar-title"> + <h2><?= t('Actions') ?></h2> + </div> <ul> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> @@ -42,13 +54,13 @@ </li> <?php endif ?> - <?php if ($user['is_ldap_user'] == 0): ?> + <?php if ($user['is_ldap_user'] == 0 && $this->user->hasAccess('UserCredentialController', 'changePassword')): ?> <li <?= $this->app->checkMenuSelection('UserCredentialController', 'changePassword') ?>> <?= $this->url->link(t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?> </li> <?php endif ?> - <?php if ($this->user->isCurrentUser($user['id'])): ?> + <?php if ($this->user->isCurrentUser($user['id']) && $this->user->hasAccess('TwoFactorController', 'index')): ?> <li <?= $this->app->checkMenuSelection('TwoFactorController', 'index') ?>> <?= $this->url->link(t('Two factor authentication'), 'TwoFactorController', 'index', array('user_id' => $user['id'])) ?> </li> @@ -58,18 +70,26 @@ </li> <?php endif ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'share') ?>> - <?= $this->url->link(t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'notifications') ?>> - <?= $this->url->link(t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'external') ?>> - <?= $this->url->link(t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('UserViewController', 'integrations') ?>> - <?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> - </li> + <?php if ($this->user->hasAccess('UserViewController', 'share')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'share') ?>> + <?= $this->url->link(t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'notifications')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'notifications') ?>> + <?= $this->url->link(t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'external')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'external') ?>> + <?= $this->url->link(t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserViewController', 'integrations')): ?> + <li <?= $this->app->checkMenuSelection('UserViewController', 'integrations') ?>> + <?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?> + </li> + <?php endif ?> <?php endif ?> <?php if ($this->user->hasAccess('UserCredentialController', 'changeAuthentication')): ?> diff --git a/app/Template/user_view/timesheet.php b/app/Template/user_view/timesheet.php index 3df57492..aeffd2f4 100644 --- a/app/Template/user_view/timesheet.php +++ b/app/Template/user_view/timesheet.php @@ -6,7 +6,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 table-striped"> <tr> <th class="column-25"><?= $subtask_paginator->order(t('Task'), 'task_title') ?></th> <th class="column-25"><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th> |