diff options
author | Teamjungla{CODE} <junglacode@gmail.com> | 2016-08-20 13:47:12 -0500 |
---|---|---|
committer | Teamjungla{CODE} <junglacode@gmail.com> | 2016-08-20 13:47:12 -0500 |
commit | fe8e9cdcfe3afc1475c7e7f4392d2b2cc601a12b (patch) | |
tree | 001403874e9e3716de7c6d51a9f536e9b3c3be5e /app/Template | |
parent | b1e795fc5b45369f7b9b565b1e106d2673361977 (diff) | |
parent | 98efcf21e355ed6ac3827058b99df86ca67c75bb (diff) |
Merge branch 'stable' of https://github.com/kanboard/kanboard
Diffstat (limited to 'app/Template')
69 files changed, 691 insertions, 500 deletions
diff --git a/app/Template/analytic/compare_hours.php b/app/Template/analytic/compare_hours.php index 70d8d02b..e4a0b60e 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"> 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/board/table_column.php b/app/Template/board/table_column.php index f7a9f6ad..75a6eb4c 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -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/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/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/dashboard/notifications.php b/app/Template/dashboard/notifications.php index e0e9b878..3b70b49f 100644 --- a/app/Template/dashboard/notifications.php +++ b/app/Template/dashboard/notifications.php @@ -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..3a7f1d86 100644 --- a/app/Template/dashboard/projects.php +++ b/app/Template/dashboard/projects.php @@ -6,8 +6,8 @@ <?php else: ?> <table class="table-fixed table-small"> <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> diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php index 86cc20f8..df4e91a5 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'])) ?> diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php index 8e0aa3ce..ca550e4c 100644 --- a/app/Template/dashboard/subtasks.php +++ b/app/Template/dashboard/subtasks.php @@ -6,10 +6,10 @@ <?php else: ?> <table class="table-fixed table-small"> <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..d9cb4f9e 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -6,12 +6,12 @@ <?php else: ?> <table class="table-fixed table-small"> <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-5"><?= $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_delete.php b/app/Template/event/comment_delete.php new file mode 100644 index 00000000..ead7d56a --- /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'])) + ) ?> + <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> +</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..5be598ac 100644 --- a/app/Template/event/comment_update.php +++ b/app/Template/event/comment_update.php @@ -7,4 +7,7 @@ </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_delete.php b/app/Template/event/subtask_delete.php new file mode 100644 index 00000000..8ac11853 --- /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'])) + ) ?> + <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> +</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/task_assignee_change.php b/app/Template/event/task_assignee_change.php index 7c962223..7539cd0b 100644 --- a/app/Template/event/task_assignee_change.php +++ b/app/Template/event/task_assignee_change.php @@ -8,7 +8,7 @@ $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> </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..de257977 --- /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'])) + ) ?> + <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> +</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..e537bf81 --- /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'])) + ) ?> + <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span> +</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/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/header.php b/app/Template/header.php index 13521ae7..a2b3fcb3 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -5,7 +5,7 @@ <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?> </span> <span class="title"> - <?php if (isset($project) && ! empty($project)): ?> + <?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) ?> @@ -59,6 +59,7 @@ <?= $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/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_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..8e8dd96c --- /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"> + <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/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_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..667a576c 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -54,9 +54,10 @@ </div> <table class="table-stripped"> <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/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..2a495eb3 --- /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"> + <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/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..695957f9 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -4,146 +4,157 @@ <?= $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') ?> - <?php endif ?> - </span> - </li> - <li> - <strong><?= t('Priority:') ?></strong> <span><?= $task['priority'] ?></span> - </li> - <?php if (! empty($task['reference'])): ?> + <div class="task-summary-columns"> + <div class="task-summary-column"> + <ul class="no-bullet"> <li> - <strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span> + <strong><?= t('Status:') ?></strong> + <span> + <?php if ($task['is_active'] == 1): ?> + <?= t('open') ?> + <?php else: ?> + <?= t('closed') ?> + <?php endif ?> + </span> </li> - <?php endif ?> - <?php if (! empty($task['score'])): ?> <li> - <strong><?= t('Complexity:') ?></strong> <span><?= $this->text->e($task['score']) ?></span> + <strong><?= t('Priority:') ?></strong> <span><?= $task['priority'] ?></span> </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 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 ?> + <?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"> - <?= $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'])): ?> 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..b18c2bca 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -2,13 +2,17 @@ <?= $this->render('task/details', array( 'task' => $task, + 'tags' => $tags, 'project' => $project, 'editable' => $this->user->hasProjectAccess('TaskModificationController', 'edit', $project['id']), )) ?> +<?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 ?> +<?php if(!empty($subtasks)): ?> <?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> <?= $this->render('subtask/show', array( 'task' => $task, @@ -16,7 +20,9 @@ 'project' => $project, 'editable' => true, )) ?> +<?php endif ?> +<?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, @@ -26,21 +32,27 @@ 'editable' => true, 'is_public' => false, )) ?> +<?php endif ?> +<?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 ?> +<?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 ?> +<?php if (!empty($comments)): ?> <?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> <?= $this->render('comments/show', array( 'task' => $task, @@ -48,5 +60,6 @@ '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_bulk/show.php b/app/Template/task_bulk/show.php index 1391c2c1..e9b138d5 100644 --- a/app/Template/task_bulk/show.php +++ b/app/Template/task_bulk/show.php @@ -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..57e77f37 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -3,47 +3,43 @@ </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_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php index 683bc8c8..7521d805 100644 --- a/app/Template/task_gantt_creation/show.php +++ b/app/Template/task_gantt_creation/show.php @@ -7,24 +7,35 @@ <?= $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_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..cc38582c --- /dev/null +++ b/app/Template/task_modification/show.php @@ -0,0 +1,44 @@ +<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-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_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/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')): ?> |