diff options
Diffstat (limited to 'app/Template')
91 files changed, 766 insertions, 550 deletions
diff --git a/app/Template/projectinfo/activity.php b/app/Template/activity/project.php index d458ea3d..480bbadd 100644 --- a/app/Template/projectinfo/activity.php +++ b/app/Template/activity/project.php @@ -12,10 +12,20 @@ </span> </li> <li> - <i class="fa fa-table fa-fw"></i> + <i class="fa fa-th fa-fw"></i> <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> </li> <li> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> + </li> + <?php if ($this->user->isManager($project['id'])): ?> + <li> + <i class="fa fa-cog fa-fw"></i> + <?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?> + </li> + <?php endif ?> + <li> <i class="fa fa-folder fa-fw"></i> <?= $this->url->link(t('All projects'), 'project', 'index') ?> </li> diff --git a/app/Template/task/activity.php b/app/Template/activity/task.php index cc4aad03..cc4aad03 100644 --- a/app/Template/task/activity.php +++ b/app/Template/activity/task.php diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php new file mode 100644 index 00000000..e74e7950 --- /dev/null +++ b/app/Template/analytic/avg_time_columns.php @@ -0,0 +1,29 @@ +<div class="page-header"> + <h2><?= t('Average time spent into each column') ?></h2> +</div> + +<?php if (empty($metrics)): ?> + <p class="alert"><?= t('Not enough data to show the graph.') ?></p> +<?php else: ?> + <section id="analytic-avg-time-column"> + + <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-label="<?= t('Average time spent') ?>"></div> + + <table class="table-stripped"> + <tr> + <th><?= t('Column') ?></th> + <th><?= t('Average time spent') ?></th> + </tr> + <?php foreach ($metrics as $column): ?> + <tr> + <td><?= $this->e($column['title']) ?></td> + <td><?= $this->dt->duration($column['average']) ?></td> + </tr> + <?php endforeach ?> + </table> + + <p class="alert alert-info"> + <?= t('This chart show the average time spent into each column for the last %d tasks.', 1000) ?> + </p> + </section> +<?php endif ?> diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index 41c6a2ab..9d6bf77c 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -12,10 +12,20 @@ </span> </li> <li> - <i class="fa fa-table fa-fw"></i> + <i class="fa fa-th fa-fw"></i> <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> </li> <li> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> + </li> + <?php if ($this->user->isManager($project['id'])): ?> + <li> + <i class="fa fa-cog fa-fw"></i> + <?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?> + </li> + <?php endif ?> + <li> <i class="fa fa-folder fa-fw"></i> <?= $this->url->link(t('All projects'), 'project', 'index') ?> </li> diff --git a/app/Template/analytic/lead_cycle_time.php b/app/Template/analytic/lead_cycle_time.php new file mode 100644 index 00000000..d96bdcb8 --- /dev/null +++ b/app/Template/analytic/lead_cycle_time.php @@ -0,0 +1,42 @@ +<div class="page-header"> + <h2><?= t('Average Lead and Cycle time') ?></h2> +</div> + +<div class="listing"> + <ul> + <li><?= t('Average lead time: ').'<strong>'.$this->dt->duration($average['avg_lead_time']) ?></strong></li> + <li><?= t('Average cycle time: ').'<strong>'.$this->dt->duration($average['avg_cycle_time']) ?></strong></li> + </ul> +</div> + +<?php if (empty($metrics)): ?> + <p class="alert"><?= t('Not enough data to show the graph.') ?></p> +<?php else: ?> + <section id="analytic-lead-cycle-time"> + + <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-label-cycle="<?= t('Cycle Time') ?>" data-label-lead="<?= t('Lead Time') ?>"></div> + + <form method="post" class="form-inline" action="<?= $this->url->href('analytic', 'leadAndCycleTime', array('project_id' => $project['id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <div class="form-inline-group"> + <?= $this->form->label(t('Start Date'), 'from') ?> + <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + </div> + + <div class="form-inline-group"> + <?= $this->form->label(t('End Date'), 'to') ?> + <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + </div> + + <div class="form-inline-group"> + <input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/> + </div> + </form> + + <p class="alert alert-info"> + <?= t('This chart show the average lead and cycle time for the last %d tasks over the time.', 1000) ?> + </p> + </section> +<?php endif ?> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index 2d1a7c96..59cc1fa6 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -13,5 +13,13 @@ <li> <?= $this->url->link(t('Burndown chart'), 'analytic', 'burndown', array('project_id' => $project['id'])) ?> </li> + <li> + <?= $this->url->link(t('Average time into each column'), 'analytic', 'averageTimeByColumn', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Lead and cycle time'), 'analytic', 'leadAndCycleTime', array('project_id' => $project['id'])) ?> + </li> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file diff --git a/app/Template/app/calendar.php b/app/Template/app/calendar.php index 6acee6ec..a154203b 100644 --- a/app/Template/app/calendar.php +++ b/app/Template/app/calendar.php @@ -1,6 +1,5 @@ -<div id="user-calendar" - data-check-url="<?= $this->url->href('calendar', 'user') ?>" - data-user-id="<?= $user['id'] ?>" +<div id="calendar" + data-check-url="<?= $this->url->href('calendar', 'user', array('user_id' => $user['id'])) ?>" data-save-url="<?= $this->url->href('calendar', 'save') ?>" > </div> diff --git a/app/Template/app/filters_helper.php b/app/Template/app/filters_helper.php new file mode 100644 index 00000000..b4e81130 --- /dev/null +++ b/app/Template/app/filters_helper.php @@ -0,0 +1,21 @@ +<div class="dropdown filters"> + <span> + <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Filters') ?></a> + <ul> + <li><a href="#" class="filter-helper" data-filter="<?= isset($reset) ? $reset : '' ?>"><?= t('Reset filters') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open assignee:me"><?= t('My tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open assignee:me due:tomorrow"><?= t('My tasks due tomorrow') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open due:today"><?= t('Tasks due today') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open due:tomorrow"><?= t('Tasks due tomorrow') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open due:yesterday"><?= t('Tasks due yesterday') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:closed"><?= t('Closed tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open"><?= t('Open tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open assignee:nobody"><?= t('Not assigned') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open category:none"><?= t('No category') ?></a></li> + <li> + <i class="fa fa-external-link"></i> + <a href="http://kanboard.net/documentation/search" target="_blank"><?= t('View advanced search syntax') ?></a> + </li> + </ul> + </span> +</div>
\ No newline at end of file diff --git a/app/Template/app/overview.php b/app/Template/app/overview.php index bd7d28db..1b160496 100644 --- a/app/Template/app/overview.php +++ b/app/Template/app/overview.php @@ -1,3 +1,13 @@ +<div class="search"> + <form method="get" action="<?= $this->url->dir() ?>" class="search"> + <?= $this->form->hidden('controller', array('controller' => 'search')) ?> + <?= $this->form->hidden('action', array('action' => 'index')) ?> + <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'form-input-large') ?> + </form> + + <?= $this->render('app/filters_helper') ?> +</div> + <?= $this->render('app/projects', array('paginator' => $project_paginator)) ?> <?= $this->render('app/tasks', array('paginator' => $task_paginator)) ?> <?= $this->render('app/subtasks', array('paginator' => $subtask_paginator)) ?>
\ No newline at end of file diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php index 61839cee..627ad21b 100644 --- a/app/Template/app/projects.php +++ b/app/Template/app/projects.php @@ -24,7 +24,7 @@ <?= $this->url->link($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?> <?php if (! empty($project['description'])): ?> - <span class="column-tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'> + <span class="tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> diff --git a/app/Template/app/sidebar.php b/app/Template/app/sidebar.php index 40bf6401..4cace15a 100644 --- a/app/Template/app/sidebar.php +++ b/app/Template/app/sidebar.php @@ -20,4 +20,6 @@ <?= $this->url->link(t('My activity stream'), 'app', 'activity', array('user_id' => $user['id'])) ?> </li> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file diff --git a/app/Template/auth/index.php b/app/Template/auth/index.php index 8801a512..ca303df9 100644 --- a/app/Template/auth/index.php +++ b/app/Template/auth/index.php @@ -4,7 +4,8 @@ <p class="alert alert-error"><?= $this->e($errors['login']) ?></p> <?php endif ?> - <form method="post" action="<?= $this->url->href('auth', 'check', array('redirect_query' => $redirect_query)) ?>"> + <?php if (! HIDE_LOGIN_FORM): ?> + <form method="post" action="<?= $this->url->href('auth', 'check') ?>"> <?= $this->form->csrf() ?> @@ -14,19 +15,24 @@ <?= $this->form->label(t('Password'), 'password') ?> <?= $this->form->password('password', $values, $errors, array('required')) ?> - <?= $this->form->checkbox('remember_me', t('Remember Me'), 1) ?><br/> + <?= $this->form->checkbox('remember_me', t('Remember Me'), 1, true) ?><br/> + <div class="form-actions"> + <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/> + </div> + </form> + <?php endif ?> + + <?php if (GOOGLE_AUTH || GITHUB_AUTH): ?> + <ul class="no-bullet"> <?php if (GOOGLE_AUTH): ?> - <?= $this->url->link(t('Login with my Google Account'), 'user', 'google') ?> + <li><?= $this->url->link(t('Login with my Google Account'), 'oauth', 'google') ?></li> <?php endif ?> <?php if (GITHUB_AUTH): ?> - <?= $this->url->link(t('Login with my GitHub Account'), 'user', 'gitHub') ?> + <li><?= $this->url->link(t('Login with my Github Account'), 'oauth', 'gitHub') ?></li> <?php endif ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/> - </div> - </form> + </ul> + <?php endif ?> </div>
\ No newline at end of file diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php deleted file mode 100644 index b80234a0..00000000 --- a/app/Template/board/filters.php +++ /dev/null @@ -1,43 +0,0 @@ -<div class="page-header"> - <ul class="board-filters"> - <li> - <span class="dropdown"> - <span> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> - <ul> - <li> - <span class="filter-collapse"> - <i class="fa fa-compress fa-fw"></i> <a href="#" class="filter-collapse-link"><?= t('Collapse tasks') ?></a> - </span> - <span class="filter-expand" style="display: none"> - <i class="fa fa-expand fa-fw"></i> <a href="#" class="filter-expand-link"><?= t('Expand tasks') ?></a> - </span> - </li> - <li> - <span class="filter-compact"> - <i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling"><?= t('Compact view') ?></a> - </span> - <span class="filter-wide" style="display: none"> - <i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling"><?= t('Horizontal scrolling') ?></a> - </span> - </li> - <?= $this->render('project/dropdown', array('project' => $project)) ?> - </ul> - </span> - </span> - </li> - <li> - <?= $this->form->select('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"', 'data-notfound="'.t('No results match:').'"', 'tabindex=="-1"'), 'apply-filters chosen-select') ?> - </li> - <li> - <?= $this->form->select('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"', 'data-notfound="'.t('No results match:').'"', 'tabindex=="-1"'), 'apply-filters chosen-select') ?> - </li> - <li> - <select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" data-notfound="<?= t('No results match:') ?>" class="apply-filters hide-mobile" tabindex="-1"> - <option value=""></option> - <option value="filter-due-date"><?= t('Filter by due date') ?></option> - <option value="filter-recent"><?= t('Filter recently updated') ?></option> - </select> - </li> - </ul> -</div>
\ No newline at end of file diff --git a/app/Template/board/assignee.php b/app/Template/board/popover_assignee.php index 4af19cf7..4af19cf7 100644 --- a/app/Template/board/assignee.php +++ b/app/Template/board/popover_assignee.php diff --git a/app/Template/board/category.php b/app/Template/board/popover_category.php index b38758d3..f391f492 100644 --- a/app/Template/board/category.php +++ b/app/Template/board/popover_category.php @@ -9,7 +9,7 @@ <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Category'), 'category_id') ?> - <?= $this->form->select('category_id', $categories_list, $values) ?><br/> + <?= $this->form->select('category_id', $categories_list, $values, array(), array('autofocus')) ?><br/> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> @@ -18,5 +18,4 @@ </div> </form> </section> - </section>
\ No newline at end of file diff --git a/app/Template/board/index.php b/app/Template/board/private_view.php index 6f6fddbe..5fdaa7fc 100644 --- a/app/Template/board/index.php +++ b/app/Template/board/private_view.php @@ -1,12 +1,12 @@ <section id="main"> - <?= $this->render('board/filters', array( - 'categories' => $categories_listing, - 'users' => $users, + <?= $this->render('project/filters', array( 'project' => $project, + 'filters' => $filters, + 'is_board' => true, )) ?> - <?= $this->render('board/show', array( + <?= $this->render('board/table_container', array( 'project' => $project, 'swimlanes' => $swimlanes, 'board_private_refresh_interval' => $board_private_refresh_interval, diff --git a/app/Template/board/public.php b/app/Template/board/public_view.php index ad7515db..aea72031 100644 --- a/app/Template/board/public.php +++ b/app/Template/board/public_view.php @@ -1,6 +1,6 @@ <section id="main" class="public-board"> - <?= $this->render('board/show', array( + <?= $this->render('board/table_container', array( 'project' => $project, 'swimlanes' => $swimlanes, 'board_private_refresh_interval' => $board_private_refresh_interval, diff --git a/app/Template/board/show.php b/app/Template/board/table_container.php index c0aa5d36..65ccdc4f 100644 --- a/app/Template/board/show.php +++ b/app/Template/board/table_container.php @@ -8,7 +8,7 @@ data-check-interval="<?= $board_private_refresh_interval ?>" data-save-url="<?= $this->url->href('board', 'save', array('project_id' => $project['id'])) ?>" data-check-url="<?= $this->url->href('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>" - data-task-creation-url="<?= $this->url->href('task', 'create', array('project_id' => $project['id'])) ?>" + data-task-creation-url="<?= $this->url->href('taskcreation', 'create', array('project_id' => $project['id'])) ?>" > <?php endif ?> @@ -17,7 +17,7 @@ <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> <?php break ?> <?php else: ?> - <?= $this->render('board/swimlane', array( + <?= $this->render('board/table_swimlane', array( 'project' => $project, 'swimlane' => $swimlane, 'board_highlight_period' => $board_highlight_period, diff --git a/app/Template/board/swimlane.php b/app/Template/board/table_swimlane.php index b86fc446..4cd137cb 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/table_swimlane.php @@ -15,14 +15,14 @@ <th class="board-column"> <?php if (! $not_editable): ?> <div class="board-add-icon"> - <?= $this->url->link('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-board-popover', t('Add a new task')) ?> + <?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-board-popover', t('Add a new task')) ?> </div> <?php endif ?> <?= $this->e($column['title']) ?> <?php if (! $not_editable && ! empty($column['description'])): ?> - <span class="column-tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> + <span class="tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 7593c102..69bf97c1 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -10,7 +10,7 @@ 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, - 'task-board-popover' . (! empty($task['category_description']) ? ' column-tooltip' : ''), + 'task-board-popover' . (! empty($task['category_description']) ? ' tooltip' : ''), ! empty($task['category_description']) ? $this->text->markdown($task['category_description']) : t('Change category') ) ?> <?php endif ?> @@ -21,7 +21,8 @@ <div class="task-board-icons"> <?php if (! empty($task['date_due'])): ?> <span class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>"> - <i class="fa fa-calendar"></i> <?= dt('%b %e', $task['date_due']) ?> + <i class="fa fa-calendar"></i> + <?= (date('Y') === date('Y', $task['date_due']) ? dt('%b %e', $task['date_due']) : dt('%b %e %Y', $task['date_due'])) ?> </span> <?php endif ?> diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php index 97c0f8dc..71963b5e 100644 --- a/app/Template/board/task_menu.php +++ b/app/Template/board/task_menu.php @@ -4,13 +4,12 @@ <ul> <li><i class="fa fa-user"></i> <?= $this->url->link(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-tag"></i> <?= $this->url->link(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-align-left"></i> <?= $this->url->link(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-pencil-square-o"></i> <?= $this->url->link(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-align-left"></i> <?= $this->url->link(t('Change description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> + <li><i class="fa fa-pencil-square-o"></i> <?= $this->url->link(t('Edit this task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-comment-o"></i> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-code-fork"></i> <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-camera"></i> <?= $this->url->link(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-close"></i> <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li> + <li><i class="fa fa-close"></i> <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li> </ul> </span> </span> diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index 44ce9d97..7eaff580 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -1,4 +1,7 @@ -<div class="task-board draggable-item color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" +<div class=" + task-board + <?= $task['is_active'] == 1 ? 'draggable-item task-board-status-open '.($task['date_modification'] > (time() - $board_highlight_period) ? 'task-board-recent' : '') : 'task-board-status-closed' ?> + color-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" data-category-id="<?= $task['category_id'] ?>" @@ -7,42 +10,55 @@ <?= $this->render('board/task_menu', array('task' => $task)) ?> - <div class="task-board-collapsed" style="display: none"> - <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?> - </div> + <?php if ($this->board->isCollapsed($project['id'])): ?> + <div class="task-board-collapsed"> + <?php if (! empty($task['assignee_username'])): ?> + <span title="<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>"> + <?= $this->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?> + </span> - + <?php endif ?> + <span class="tooltip" title="<?= $this->e($task['title']) ?>" + <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?> + </span> + </div> + <?php else: ?> + <div class="task-board-expanded"> - <div class="task-board-expanded"> + <?php if ($task['reference']): ?> + <span class="task-board-reference" title="<?= t('Reference') ?>"> + (<?= $task['reference'] ?>) + </span> + <?php endif ?> - <?php if ($task['reference']): ?> - <span class="task-board-reference" title="<?= t('Reference') ?>"> - (<?= $task['reference'] ?>) - </span> - <?php endif ?> + <span class="task-board-user <?= $this->user->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>"> + <?= $this->url->link( + (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')), + 'board', + 'changeAssignee', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + false, + 'task-board-popover', + t('Change assignee') + ) ?> + </span> - <span class="task-board-user <?= $this->user->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>"> - <?= $this->url->link( - (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')), - 'board', - 'changeAssignee', - array('task_id' => $task['id'], 'project_id' => $task['project_id']), - false, - 'task-board-popover', - t('Change assignee') - ) ?> - </span> + <?php if ($task['is_active'] == 1): ?> + <div class="task-board-days"> + <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->dt->age($task['date_creation']) ?></span> + <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->dt->age($task['date_moved']) ?></span> + </div> + <?php else: ?> + <div class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></div> + <?php endif ?> - <div class="task-board-days"> - <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->datetime->age($task['date_creation']) ?></span> - <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->datetime->age($task['date_moved']) ?></span> - </div> + <div class="task-board-title"> + <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + </div> - <div class="task-board-title"> - <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + <?= $this->render('board/task_footer', array( + 'task' => $task, + 'not_editable' => $not_editable, + )) ?> </div> - - <?= $this->render('board/task_footer', array( - 'task' => $task, - 'not_editable' => $not_editable, - )) ?> - </div> + <?php endif ?> </div> diff --git a/app/Template/board/comments.php b/app/Template/board/tooltip_comments.php index 2e2c0c1e..2e2c0c1e 100644 --- a/app/Template/board/comments.php +++ b/app/Template/board/tooltip_comments.php diff --git a/app/Template/board/description.php b/app/Template/board/tooltip_description.php index 7e0e3430..7e0e3430 100644 --- a/app/Template/board/description.php +++ b/app/Template/board/tooltip_description.php diff --git a/app/Template/board/files.php b/app/Template/board/tooltip_files.php index 81136659..81136659 100644 --- a/app/Template/board/files.php +++ b/app/Template/board/tooltip_files.php diff --git a/app/Template/board/subtasks.php b/app/Template/board/tooltip_subtasks.php index 950da925..950da925 100644 --- a/app/Template/board/subtasks.php +++ b/app/Template/board/tooltip_subtasks.php diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tooltip_tasklinks.php index 25aa91aa..25aa91aa 100644 --- a/app/Template/board/tasklinks.php +++ b/app/Template/board/tooltip_tasklinks.php diff --git a/app/Template/budget/sidebar.php b/app/Template/budget/sidebar.php index 7740cf00..0fdb8612 100644 --- a/app/Template/budget/sidebar.php +++ b/app/Template/budget/sidebar.php @@ -11,4 +11,6 @@ <?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?> </li> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php index cf2a20ec..0406414c 100644 --- a/app/Template/calendar/show.php +++ b/app/Template/calendar/show.php @@ -1,46 +1,13 @@ <section id="main"> - <div class="page-header"> - <ul> - <li> - <span class="dropdown"> - <span> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> - <ul> - <?= $this->render('project/dropdown', array('project' => $project)) ?> - </ul> - </span> - </span> - </li> - <li> - <i class="fa fa-table fa-fw"></i> - <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> - </li> - <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('All projects'), 'project', 'index') ?> - </li> - </ul> - </div> - <section class="sidebar-container"> - - <?= $this->render('calendar/sidebar', array( - 'project' => $project, - 'users_list' => $users_list, - 'categories_list' => $categories_list, - 'columns_list' => $columns_list, - 'swimlanes_list' => $swimlanes_list, - 'colors_list' => $colors_list, - 'status_list' => $status_list - )) ?> + <?= $this->render('project/filters', array( + 'project' => $project, + 'filters' => $filters, + )) ?> - <div class="sidebar-content"> - <div id="calendar" - data-project-id="<?= $project['id'] ?>" - data-save-url="<?= $this->url->href('calendar', 'save') ?>" - data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>" - data-check-interval="<?= $check_interval ?>" - > - </div> - </div> - </section> + <div id="calendar" + data-save-url="<?= $this->url->href('calendar', 'save') ?>" + data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>" + data-check-interval="<?= $check_interval ?>" + > + </div> </section>
\ No newline at end of file diff --git a/app/Template/calendar/sidebar.php b/app/Template/calendar/sidebar.php deleted file mode 100644 index 6c4fb5b0..00000000 --- a/app/Template/calendar/sidebar.php +++ /dev/null @@ -1,40 +0,0 @@ -<div class="sidebar"> - <ul class="no-bullet"> - <li> - <?= t('Filter by user') ?> - </li> - <li> - <?= $this->form->select('owner_id', $users_list, array(), array(), array(), 'calendar-filter') ?> - </li> - <li> - <?= t('Filter by category') ?> - </li> - <li> - <?= $this->form->select('category_id', $categories_list, array(), array(), array(), 'calendar-filter') ?> - </li> - <li> - <?= t('Filter by column') ?> - </li> - <li> - <?= $this->form->select('column_id', $columns_list, array(), array(), array(), 'calendar-filter') ?> - </li> - <li> - <?= t('Filter by swimlane') ?> - </li> - <li> - <?= $this->form->select('swimlane_id', $swimlanes_list, array(), array(), array(), 'calendar-filter') ?> - </li> - <li> - <?= t('Filter by color') ?> - </li> - <li> - <?= $this->form->select('color_id', $colors_list, array(), array(), array(), 'calendar-filter') ?> - </li> - <li> - <?= t('Filter by status') ?> - </li> - <li> - <?= $this->form->select('is_active', $status_list, array(), array(), array(), 'calendar-filter') ?> - </li> - </ul> -</div> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 18e7f284..a394ee67 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -18,7 +18,7 @@ <tr> <td class="column-60"><?= $this->e($column['title']) ?> <?php if (! empty($column['description'])): ?> - <span class="column-tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> + <span class="tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> diff --git a/app/Template/config/about.php b/app/Template/config/about.php index a7098c1b..03a66c3f 100644 --- a/app/Template/config/about.php +++ b/app/Template/config/about.php @@ -42,6 +42,12 @@ <h2><?= t('Keyboard shortcuts') ?></h2> </div> <div class="listing"> + <h3><?= t('Board/Calendar/List view') ?></h3> + <ul> + <li><?= t('Switch to the board view') ?> = <strong>v b</strong></li> + <li><?= t('Switch to the calendar view') ?> = <strong>v c</strong></li> + <li><?= t('Switch to the list view') ?> = <strong>v l</strong></li> + </ul> <h3><?= t('Board view') ?></h3> <ul> <li><?= t('New task') ?> = <strong>n</strong></li> @@ -51,6 +57,7 @@ <h3><?= t('Application') ?></h3> <ul> <li><?= t('Open board switcher') ?> = <strong>b</strong></li> + <li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li> <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> diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php index a1299806..47b45149 100644 --- a/app/Template/config/integrations.php +++ b/app/Template/config/integrations.php @@ -6,30 +6,42 @@ <?= $this->form->csrf() ?> - <h3><img src="assets/img/mailgun-icon.png"/> <?= t('Mailgun (incoming emails)') ?></h3> + <h3><i class="fa fa-google"></i> <?= t('Google Authentication') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'mailgun', array('token' => $values['webhook_token'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('oauth', 'google', array(), false, '', true) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/google-authentication" target="_blank"><?= t('Help on Google authentication') ?></a></p> + </div> + + <h3><i class="fa fa-github"></i> <?= t('Github Authentication') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('oauth', 'github', array(), false, '', true) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/github-authentication" target="_blank"><?= t('Help on Github authentication') ?></a></p> + </div> + + <h3><img src="<?= $this->url->dir() ?>assets/img/mailgun-icon.png"/> <?= t('Mailgun (incoming emails)') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'mailgun', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/mailgun" target="_blank"><?= t('Help on Mailgun integration') ?></a></p> </div> - <h3><img src="assets/img/sendgrid-icon.png"/> <?= t('Sendgrid (incoming emails)') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/sendgrid-icon.png"/> <?= t('Sendgrid (incoming emails)') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'sendgrid', array('token' => $values['webhook_token'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'sendgrid', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/sendgrid" target="_blank"><?= t('Help on Sendgrid integration') ?></a></p> </div> - <h3><img src="assets/img/postmark-icon.png"/> <?= t('Postmark (incoming emails)') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/postmark-icon.png"/> <?= t('Postmark (incoming emails)') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'postmark', array('token' => $values['webhook_token'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'postmark', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/postmark" target="_blank"><?= t('Help on Postmark integration') ?></a></p> </div> - <h3><img src="assets/img/gravatar-icon.png"/> <?= t('Gravatar') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/gravatar-icon.png"/> <?= t('Gravatar') ?></h3> <div class="listing"> <?= $this->form->checkbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?> </div> - <h3><img src="assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3> <div class="listing"> <?= $this->form->checkbox('integration_jabber', t('Send notifications to Jabber'), 1, $values['integration_jabber'] == 1) ?> @@ -55,7 +67,7 @@ <p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p> </div> - <h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> <div class="listing"> <?= $this->form->checkbox('integration_hipchat', t('Send notifications to Hipchat'), 1, $values['integration_hipchat'] == 1) ?> @@ -77,6 +89,8 @@ <?= $this->form->label(t('Webhook URL'), 'integration_slack_webhook_url') ?> <?= $this->form->text('integration_slack_webhook_url', $values, $errors) ?> + <?= $this->form->label(t('Channel/Group/User (Optional)'), 'integration_slack_webhook_channel') ?> + <?= $this->form->text('integration_slack_webhook_channel', $values, $errors) ?> <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p> </div> diff --git a/app/Template/config/project.php b/app/Template/config/project.php index 1ab69e26..b762de24 100644 --- a/app/Template/config/project.php +++ b/app/Template/config/project.php @@ -6,6 +6,9 @@ <?= $this->form->csrf() ?> + <?= $this->form->label(t('Default task color'), 'default_color') ?> + <?= $this->form->select('default_color', $colors, $values, $errors) ?> + <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> <?= $this->form->text('board_columns', $values, $errors) ?><br/> <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p> diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 7f946dee..05ec4094 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -32,4 +32,6 @@ <?= $this->url->link(t('API'), 'config', 'api') ?> </li> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php index 73ca3598..f1a98f8b 100644 --- a/app/Template/config/webhook.php +++ b/app/Template/config/webhook.php @@ -26,7 +26,7 @@ </li> <li> <?= t('URL for task creation:') ?> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'task', array('token' => $values['webhook_token'])) ?>"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'task', array('token' => $values['webhook_token']), false, '', true) ?>"> </li> <li> <?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?> diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php index f93dcafb..f3bcf44d 100644 --- a/app/Template/export/sidebar.php +++ b/app/Template/export/sidebar.php @@ -14,4 +14,6 @@ <?= $this->url->link(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?> </li> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file diff --git a/app/Template/feed/project.php b/app/Template/feed/project.php index 60b7ee96..76cf6cf0 100644 --- a/app/Template/feed/project.php +++ b/app/Template/feed/project.php @@ -2,15 +2,15 @@ <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->base().$this->url->href('feed', 'project', array('token' => $project['token'])) ?>"/> + <link rel="self" type="application/atom+xml" href="<?= $this->url->href('feed', 'project', array('token' => $project['token']), false, '', true) ?>"/> <updated><?= date(DATE_ATOM) ?></updated> - <id><?= $this->url->base().$this->url->href('feed', 'project', array('token' => $project['token'])) ?></id> + <id><?= $this->url->href('feed', '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->base().$this->url->href('task', 'show', array('task_id' => $e['task_id'])) ?>"/> + <link rel="alternate" href="<?= $this->url->href('task', '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> diff --git a/app/Template/feed/user.php b/app/Template/feed/user.php index b3279a0c..3e9606c6 100644 --- a/app/Template/feed/user.php +++ b/app/Template/feed/user.php @@ -2,15 +2,15 @@ <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->base().$this->url->href('feed', 'user', array('token' => $user['token'])) ?>"/> + <link rel="self" type="application/atom+xml" href="<?= $this->url->href('feed', 'user', array('token' => $user['token']), false, '', true) ?>"/> <updated><?= date(DATE_ATOM) ?></updated> - <id><?= $this->url->base().$this->url->href('feed', 'user', array('token' => $user['token'])) ?></id> + <id><?= $this->url->href('feed', '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->base().$this->url->href('task', 'show', array('task_id' => $e['task_id'])) ?>"/> + <link rel="alternate" href="<?= $this->url->href('task', '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> diff --git a/app/Template/file/screenshot.php b/app/Template/file/screenshot.php index 89d9324c..73b72eae 100644 --- a/app/Template/file/screenshot.php +++ b/app/Template/file/screenshot.php @@ -15,3 +15,5 @@ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> </form> + +<p class="alert alert-info"><?= t('This feature does not work with all browsers.') ?></p>
\ No newline at end of file diff --git a/app/Template/file/show.php b/app/Template/file/show.php index 7d5dc96f..9281c352 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -16,7 +16,7 @@ <?php endif ?> <p> <?= $this->e($file['name']) ?> - <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'> + <span class="tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'> <i class="fa fa-info-circle"></i> </span> </p> @@ -38,7 +38,7 @@ <td><i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i></td> <td> <?= $this->e($file['name']) ?> - <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'> + <span class="tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'> <i class="fa fa-info-circle"></i> </span> </td> diff --git a/app/Template/layout.php b/app/Template/layout.php index c630132d..d02ba08d 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -15,16 +15,16 @@ <?= $this->asset->js('assets/js/app.js', true) ?> <?php endif ?> + <?= $this->asset->colorCss() ?> <?= $this->asset->css('assets/css/app.css') ?> <?= $this->asset->css('assets/css/print.css', true, 'print') ?> - <?= $this->asset->colorCss() ?> <?= $this->asset->customCss() ?> - <link rel="icon" type="image/png" href="assets/img/favicon.png"> - <link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png"> - <link rel="apple-touch-icon" sizes="72x72" href="assets/img/touch-icon-ipad.png"> - <link rel="apple-touch-icon" sizes="114x114" href="assets/img/touch-icon-iphone-retina.png"> - <link rel="apple-touch-icon" sizes="144x144" href="assets/img/touch-icon-ipad-retina.png"> + <link rel="icon" type="image/png" href="<?= $this->url->dir() ?>assets/img/favicon.png"> + <link rel="apple-touch-icon" href="<?= $this->url->dir() ?>assets/img/touch-icon-iphone.png"> + <link rel="apple-touch-icon" sizes="72x72" href="<?= $this->url->dir() ?>assets/img/touch-icon-ipad.png"> + <link rel="apple-touch-icon" sizes="114x114" href="<?= $this->url->dir() ?>assets/img/touch-icon-iphone-retina.png"> + <link rel="apple-touch-icon" sizes="144x144" href="<?= $this->url->dir() ?>assets/img/touch-icon-ipad-retina.png"> <title><?= isset($title) ? $this->e($title) : 'Kanboard' ?></title> </head> @@ -40,7 +40,7 @@ <nav> <h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->e($title) ?> <?php if (! empty($description)): ?> - <span class="column-tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'> + <span class="tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> @@ -48,7 +48,7 @@ <ul> <?php if (isset($board_selector) && ! empty($board_selector)): ?> <li> - <select id="board-selector" tabindex=="-1" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> + <select id="board-selector" tabindex="-1" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> <option value=""></option> <?php foreach($board_selector as $board_id => $board_name): ?> <option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option> diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php new file mode 100644 index 00000000..fc8a607b --- /dev/null +++ b/app/Template/listing/show.php @@ -0,0 +1,61 @@ +<section id="main"> + <?= $this->render('project/filters', array( + 'project' => $project, + 'filters' => $filters, + )) ?> + + <?php if (! empty($values['search']) && $paginator->isEmpty()): ?> + <p class="alert"><?= t('No tasks found.') ?></p> + <?php elseif (! $paginator->isEmpty()): ?> + <table class="table-fixed 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> + <th class="column-10"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th> + <th class="column-10"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th> + <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> + <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th> + <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th> + <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> + </tr> + <?php foreach ($paginator->getCollection() as $task): ?> + <tr> + <td class="task-table color-<?= $task['color_id'] ?>"> + <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + </td> + <td> + <?= $this->e($task['swimlane_name'] ?: $task['default_swimlane']) ?> + </td> + <td> + <?= $this->e($task['column_name']) ?> + </td> + <td> + <?= $this->e($task['category_name']) ?> + </td> + <td> + <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + </td> + <td> + <?php if ($task['assignee_username']): ?> + <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?> + <?php else: ?> + <?= t('Unassigned') ?> + <?php endif ?> + </td> + <td> + <?= dt('%B %e, %Y', $task['date_due']) ?> + </td> + <td> + <?php if ($task['is_active'] == \Model\Task::STATUS_OPEN): ?> + <?= t('Open') ?> + <?php else: ?> + <?= t('Closed') ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </table> + + <?= $paginator ?> + <?php endif ?> +</section>
\ No newline at end of file diff --git a/app/Template/notification/footer.php b/app/Template/notification/footer.php index 69d2cf82..c3b37884 100644 --- a/app/Template/notification/footer.php +++ b/app/Template/notification/footer.php @@ -2,6 +2,6 @@ Kanboard <?php if (isset($application_url) && ! empty($application_url)): ?> - - <a href="<?= $application_url.$this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= t('view the task on Kanboard') ?></a> - - <a href="<?= $application_url.$this->url->href('board', 'show', array('project_id' => $task['project_id'])) ?>"><?= t('view the board on Kanboard') ?></a> + - <a href="<?= $this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', true) ?>"><?= t('view the task on Kanboard') ?></a> + - <a href="<?= $this->url->href('board', 'show', array('project_id' => $task['project_id']), false, '', true) ?>"><?= t('view the board on Kanboard') ?></a> <?php endif ?> diff --git a/app/Template/notification/task_overdue.php b/app/Template/notification/task_overdue.php index dc2659dc..a231937b 100644 --- a/app/Template/notification/task_overdue.php +++ b/app/Template/notification/task_overdue.php @@ -5,7 +5,7 @@ <li> (<strong>#<?= $task['id'] ?></strong>) <?php if ($application_url): ?> - <a href="<?= $application_url.$this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $this->e($task['title']) ?></a> + <a href="<?= $this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', true) ?>"><?= $this->e($task['title']) ?></a> <?php else: ?> <?= $this->e($task['title']) ?> <?php endif ?> diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index 2e2650a7..aa4322e6 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -1,18 +1,6 @@ <li> - <i class="fa fa-search fa-fw"></i> - <?= $this->url->link(t('Search'), 'projectinfo', 'search', array('project_id' => $project['id'])) ?> -</li> -<li> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Completed tasks'), 'projectinfo', 'tasks', array('project_id' => $project['id'])) ?> -</li> -<li> <i class="fa fa-dashboard fa-fw"></i> - <?= $this->url->link(t('Activity'), 'projectinfo', 'activity', array('project_id' => $project['id'])) ?> -</li> -<li> - <i class="fa fa-calendar fa-fw"></i> - <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('Activity'), 'activity', 'project', array('project_id' => $project['id'])) ?> </li> <?php if ($project['is_public']): ?> diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php new file mode 100644 index 00000000..e2fdc751 --- /dev/null +++ b/app/Template/project/filters.php @@ -0,0 +1,51 @@ +<div class="page-header"> + <div class="dropdown"> + <span> + <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> + <ul> + <?php if (isset($is_board)): ?> + <li> + <span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>> + <i class="fa fa-expand fa-fw"></i> + <?= $this->url->link(t('Expand tasks'), 'board', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> + </span> + <span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? 'style="display: none;"' : '' ?>> + <i class="fa fa-compress fa-fw"></i> + <?= $this->url->link(t('Collapse tasks'), 'board', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> + </span> + </li> + <li> + <span class="filter-compact"> + <i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Compact view') ?></a> + </span> + <span class="filter-wide" style="display: none"> + <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> + <?php endif ?> + <?= $this->render('project/dropdown', array('project' => $project)) ?> + </ul> + </span> + </div> + <ul class="views"> + <li <?= $filters['controller'] === 'board' ? 'class="active"' : '' ?>> + <i class="fa fa-th fa-fw"></i> + <?= $this->url->link(t('Board'), 'board', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?> + </li> + <li <?= $filters['controller'] === 'calendar' ? 'class="active"' : '' ?>> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?> + </li> + <li <?= $filters['controller'] === 'listing' ? 'class="active"' : '' ?>> + <i class="fa fa-list fa-fw"></i> + <?= $this->url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> + </li> + </ul> + <form method="get" action="<?= $this->url->dir() ?>" class="search"> + <?= $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').'"'), 'form-input-large') ?> + </form> + <?= $this->render('app/filters_helper', array('reset' => 'status:open')) ?> +</div>
\ No newline at end of file diff --git a/app/Template/project/index.php b/app/Template/project/index.php index 1080968e..971ba2ae 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -35,7 +35,7 @@ <?= $this->e($project['identifier']) ?> </td> <td> - <?= $this->url->link('<i class="fa fa-table"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?> + <?= $this->url->link('<i class="fa fa-th"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?> <?php if ($project['is_public']): ?> <i class="fa fa-share-alt fa-fw"></i> @@ -46,7 +46,7 @@ <?= $this->url->link($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> <?php if (! empty($project['description'])): ?> - <span class="column-tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'> + <span class="tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php index 698e438c..12a7ee4e 100644 --- a/app/Template/project/integrations.php +++ b/app/Template/project/integrations.php @@ -8,26 +8,26 @@ <h3><i class="fa fa-github fa-fw"></i> <?= t('Github webhooks') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p> </div> - <h3><img src="assets/img/gitlab-icon.png"/> <?= t('Gitlab webhooks') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/gitlab-icon.png"/> <?= t('Gitlab webhooks') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p> </div> <h3><i class="fa fa-bitbucket fa-fw"></i> <?= t('Bitbucket webhooks') ?></h3> <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/bitbucket-webhooks" target="_blank"><?= t('Help on Bitbucket webhooks') ?></a></p> </div> - <h3><img src="assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3> <div class="listing"> <?= $this->form->checkbox('jabber', t('Send notifications to Jabber'), 1, isset($values['jabber']) && $values['jabber'] == 1) ?> @@ -58,7 +58,7 @@ </div> - <h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> + <h3><img src="<?= $this->url->dir() ?>assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> <div class="listing"> <?= $this->form->checkbox('hipchat', t('Send notifications to Hipchat'), 1, isset($values['hipchat']) && $values['hipchat'] == 1) ?> @@ -85,6 +85,8 @@ <?= $this->form->label(t('Webhook URL'), 'slack_webhook_url') ?> <?= $this->form->text('slack_webhook_url', $values, $errors) ?> + <?= $this->form->label(t('Channel/Group/User (Optional)'), 'slack_webhook_channel') ?> + <?= $this->form->text('slack_webhook_channel', $values, $errors) ?> <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p> diff --git a/app/Template/project/layout.php b/app/Template/project/layout.php index 7bb3d478..8ba92ef9 100644 --- a/app/Template/project/layout.php +++ b/app/Template/project/layout.php @@ -12,10 +12,14 @@ </span> </li> <li> - <i class="fa fa-table fa-fw"></i> + <i class="fa fa-th fa-fw"></i> <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> </li> <li> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> + </li> + <li> <i class="fa fa-folder fa-fw"></i> <?= $this->url->link(t('All projects'), 'project', 'index') ?> </li> diff --git a/app/Template/project/show.php b/app/Template/project/show.php index beb5a1fa..969dda17 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -51,7 +51,7 @@ <td> <?= $this->e($column['title']) ?> <?php if (! empty($column['description'])): ?> - <span class="column-tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> + <span class="tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 3762f1ff..7ee39f53 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -6,47 +6,49 @@ </li> <?php if ($this->user->isManager($project['id'])): ?> - <li> - <?= $this->url->link(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Integrations'), 'project', 'integration', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Columns'), 'column', 'index', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Categories'), 'category', 'index', array('project_id' => $project['id'])) ?> - </li> - <?php if ($this->user->isAdmin() || $project['is_private'] == 0): ?> - <li> - <?= $this->url->link(t('Users'), 'project', 'users', array('project_id' => $project['id'])) ?> - </li> - <?php endif ?> - <li> - <?= $this->url->link(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> - </li> - <li> - <?= $this->url->link(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?> - </li> - <li> - <?php if ($project['is_active']): ?> - <?= $this->url->link(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?> - <?php else: ?> - <?= $this->url->link(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> + <li> + <?= $this->url->link(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Integrations'), 'project', 'integration', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Columns'), 'column', 'index', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> + </li> + <li> + <?= $this->url->link(t('Categories'), 'category', 'index', array('project_id' => $project['id'])) ?> + </li> + <?php if ($this->user->isAdmin() || $project['is_private'] == 0): ?> + <li> + <?= $this->url->link(t('Users'), 'project', 'users', array('project_id' => $project['id'])) ?> + </li> <?php endif ?> - </li> - <?php if ($this->user->isAdmin()): ?> <li> - <?= $this->url->link(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> </li> - <?php endif ?> + <li> + <?= $this->url->link(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?> + </li> + <li> + <?php if ($project['is_active']): ?> + <?= $this->url->link(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?> + <?php else: ?> + <?= $this->url->link(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> + <?php endif ?> + </li> + <?php if ($this->user->isAdmin()): ?> + <li> + <?= $this->url->link(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> + </li> + <?php endif ?> <?php endif ?> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div> diff --git a/app/Template/projectinfo/search.php b/app/Template/projectinfo/search.php deleted file mode 100644 index 4b7c8f70..00000000 --- a/app/Template/projectinfo/search.php +++ /dev/null @@ -1,43 +0,0 @@ -<section id="main"> - <div class="page-header"> - <ul> - <li> - <span class="dropdown"> - <span> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> - <ul> - <?= $this->render('project/dropdown', array('project' => $project)) ?> - </ul> - </span> - </span> - </li> - <li> - <i class="fa fa-table fa-fw"></i> - <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> - </li> - <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('All projects'), 'project', 'index') ?> - </li> - </ul> - </div> - - <form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->text('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> - <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> - </form> - - <?php if (! empty($values['search']) && $paginator->isEmpty()): ?> - <p class="alert"><?= t('Nothing found.') ?></p> - <?php elseif (! $paginator->isEmpty()): ?> - <?= $this->render('task/table', array( - 'paginator' => $paginator, - 'categories' => $categories, - 'columns' => $columns, - )) ?> - <?php endif ?> - -</section>
\ No newline at end of file diff --git a/app/Template/projectinfo/tasks.php b/app/Template/projectinfo/tasks.php deleted file mode 100644 index 41884783..00000000 --- a/app/Template/projectinfo/tasks.php +++ /dev/null @@ -1,33 +0,0 @@ -<section id="main"> - <div class="page-header"> - <ul> - <li> - <span class="dropdown"> - <span> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> - <ul> - <?= $this->render('project/dropdown', array('project' => $project)) ?> - </ul> - </span> - </span> - </li> - <li> - <i class="fa fa-table fa-fw"></i> - <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?> - </li> - <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('All projects'), 'project', 'index') ?> - </li> - </ul> - </div> - <?php if ($paginator->isEmpty()): ?> - <p class="alert"><?= t('There is no completed tasks at the moment.') ?></p> - <?php else: ?> - <?= $this->render('task/table', array( - 'paginator' => $paginator, - 'categories' => $categories, - 'columns' => $columns, - )) ?> - <?php endif ?> -</section>
\ No newline at end of file diff --git a/app/Template/search/index.php b/app/Template/search/index.php index 47a926f4..8940a24e 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -8,12 +8,15 @@ </ul> </div> - <form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> - <?= $this->form->text('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> - <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> - </form> + <div class="search"> + <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') ?> + </form> + + <?= $this->render('app/filters_helper') ?> + </div> <?php if (empty($values['search'])): ?> <div class="listing"> @@ -28,7 +31,7 @@ <li><?= t('Search by description: ') ?><strong>description:"Something to find"</strong></li> <li><?= t('Search by due date: ') ?><strong>due:2015-07-01</strong></li> </ul> - <p><a href="http://kanboard.net/documentation/search" target="_blank"><?= t('More examples in the documentation') ?></a></p> + <p><i class="fa fa-external-link fa-fw"></i><a href="http://kanboard.net/documentation/search" target="_blank"><?= t('View advanced search syntax') ?></a></p> </div> <?php elseif (! empty($values['search']) && $paginator->isEmpty()): ?> <p class="alert"><?= t('Nothing found.') ?></p> diff --git a/app/Template/search/results.php b/app/Template/search/results.php index 1d8cc6e2..04cb6a19 100644 --- a/app/Template/search/results.php +++ b/app/Template/search/results.php @@ -1,14 +1,13 @@ <table class="table-fixed table-small"> <tr> <th class="column-8"><?= $paginator->order(t('Project'), 'tasks.project_id') ?></th> - <th class="column-8"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> - <th class="column-8"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th> - <th class="column-8"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th> + <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> + <th class="column-10"><?= $paginator->order(t('Swimlane'), 'tasks.swimlane_id') ?></th> + <th class="column-10"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th> + <th class="column-10"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th> <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th> <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th> - <th class="column-10"><?= $paginator->order(t('Date created'), 'tasks.date_creation') ?></th> - <th class="column-10"><?= $paginator->order(t('Date completed'), 'tasks.date_completed') ?></th> <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> </tr> <?php foreach ($paginator->getCollection() as $task): ?> @@ -20,6 +19,9 @@ <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> </td> <td> + <?= $this->e($task['swimlane_name'] ?: $task['default_swimlane']) ?> + </td> + <td> <?= $this->e($task['column_name']) ?> </td> <td> @@ -39,14 +41,6 @@ <?= dt('%B %e, %Y', $task['date_due']) ?> </td> <td> - <?= dt('%B %e, %Y', $task['date_creation']) ?> - </td> - <td> - <?php if ($task['date_completed']): ?> - <?= dt('%B %e, %Y', $task['date_completed']) ?> - <?php endif ?> - </td> - <td> <?php if ($task['is_active'] == \Model\Task::STATUS_OPEN): ?> <?= t('Open') ?> <?php else: ?> diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index b91e830f..1f0f9bba 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -29,7 +29,11 @@ </td> <td> <?php if (! empty($subtask['username'])): ?> - <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?> + <?php if (! isset($not_editable)): ?> + <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?> + <?php else: ?> + <?= $this->e($subtask['name'] ?: $subtask['username']) ?> + <?php endif ?> <?php endif ?> </td> <td> @@ -48,7 +52,7 @@ <?php if ($subtask['is_timer_started']): ?> <i class="fa fa-pause"></i> <?= $this->url->link(t('Stop timer'), 'timer', 'subtask', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?> - (<?= $this->datetime->age($subtask['timer_start_date']) ?>) + (<?= $this->dt->age($subtask['timer_start_date']) ?>) <?php else: ?> <i class="fa fa-play-circle-o"></i> <?= $this->url->link(t('Start timer'), 'timer', 'subtask', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?> @@ -88,6 +92,8 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> <?= $this->form->text('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?> + <?= $this->form->numeric('time_estimated', array(), array(), array('placeholder="'.t('Original estimate').'"')) ?> + <?= $this->form->select('user_id', $users_list, array(), array(), array('placeholder="'.t('Assignee').'"')) ?> <input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/> </form> <?php endif ?> diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php new file mode 100644 index 00000000..3b1d2855 --- /dev/null +++ b/app/Template/task/analytics.php @@ -0,0 +1,36 @@ +<div class="page-header"> + <h2><?= t('Analytics') ?></h2> +</div> + +<div class="listing"> + <ul> + <li><?= t('Lead time: ').'<strong>'.$this->dt->duration($lead_time) ?></strong></li> + <li><?= t('Cycle time: ').'<strong>'.$this->dt->duration($cycle_time) ?></strong></li> + </ul> +</div> + +<h3 id="analytic-task-time-column"><?= t('Time spent into each column') ?></h3> +<div id="chart" data-metrics='<?= json_encode($time_spent_columns) ?>' data-label="<?= t('Time spent') ?>"></div> +<table class="table-stripped"> + <tr> + <th><?= t('Column') ?></th> + <th><?= t('Time spent') ?></th> + </tr> + <?php foreach ($time_spent_columns as $column): ?> + <tr> + <td><?= $this->e($column['title']) ?></td> + <td><?= $this->dt->duration($column['time_spent']) ?></td> + </tr> + <?php endforeach ?> +</table> + +<div class="alert alert-info"> + <ul> + <li><?= t('The lead time is the duration between the task creation and the completion.') ?></li> + <li><?= t('The cycle time is the duration between the start date and the completion.') ?></li> + <li><?= t('If the task is not closed the current time is used instead of the completion date.') ?></li> + </ul> +</div> + +<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?> +<?= $this->asset->js('assets/js/vendor/c3.min.js') ?>
\ No newline at end of file diff --git a/app/Template/task/show_description.php b/app/Template/task/description.php index f823e7d6..f823e7d6 100644 --- a/app/Template/task/show_description.php +++ b/app/Template/task/description.php diff --git a/app/Template/task/duplicate_project.php b/app/Template/task/duplicate_project.php deleted file mode 100644 index 9a8e3c4a..00000000 --- a/app/Template/task/duplicate_project.php +++ /dev/null @@ -1,24 +0,0 @@ -<div class="page-header"> - <h2><?= t('Duplicate the task to another project') ?></h2> -</div> - -<?php if (empty($projects_list)): ?> - <p class="alert"><?= t('No project') ?></p> -<?php else: ?> - - <form method="post" action="<?= $this->url->href('task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->label(t('Project'), 'project_id') ?> - <?= $this->form->select('project_id', $projects_list, $values, $errors) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </div> - </form> - -<?php endif ?>
\ No newline at end of file diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index 5a14fb39..bbccf177 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -2,8 +2,12 @@ <div class="page-header"> <ul> <li> - <i class="fa fa-table fa-fw"></i> - <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, 'swimlane-'.$task['swimlane_id']) ?> + <i class="fa fa-th fa-fw"></i> + <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, $task['swimlane_id'] != 0 ? 'swimlane-'.$task['swimlane_id'] : '') ?> + </li> + <li> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?> </li> <?php if ($this->user->isManager($task['project_id'])): ?> <li> @@ -11,10 +15,6 @@ <?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $task['project_id'])) ?> </li> <?php endif ?> - <li> - <i class="fa fa-calendar fa-fw"></i> - <?= $this->url->link(t('Project calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?> - </li> </ul> </div> <section class="sidebar-container" id="task-section"> diff --git a/app/Template/task/move_project.php b/app/Template/task/move_project.php deleted file mode 100644 index b0b33f81..00000000 --- a/app/Template/task/move_project.php +++ /dev/null @@ -1,24 +0,0 @@ -<div class="page-header"> - <h2><?= t('Move the task to another project') ?></h2> -</div> - -<?php if (empty($projects_list)): ?> - <p class="alert"><?= t('No project') ?></p> -<?php else: ?> - - <form method="post" action="<?= $this->url->href('task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->label(t('Project'), 'project_id') ?> - <?= $this->form->select('project_id', $projects_list, $values, $errors) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </div> - </form> - -<?php endif ?>
\ No newline at end of file diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 73116de9..e3105488 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -4,7 +4,7 @@ <p class="pull-right"><?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p> - <?= $this->render('task/show_description', array( + <?= $this->render('task/description', array( 'task' => $task, 'project' => $project, 'is_public' => true diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 54c124f6..68d63c58 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -6,10 +6,10 @@ 'recurrence_basedate_list' => $this->task->recurrenceBasedates(), )) ?> -<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> -<?= $this->render('task/show_description', array('task' => $task)) ?> +<?= $this->render('task_modification/edit_time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> +<?= $this->render('task/description', array('task' => $task)) ?> <?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?> -<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project)) ?> -<?= $this->render('task/timesheet', array('task' => $task)) ?> +<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array())) ?> +<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?> <?= $this->render('file/show', array('task' => $task, 'files' => $files, 'images' => $images)) ?> <?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index bb137ac9..1116040a 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -5,27 +5,30 @@ <?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Activity stream'), 'task', 'activites', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Activity stream'), 'activity', 'task', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> <?= $this->url->link(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> + <li> + <?= $this->url->link(t('Analytics'), 'task', 'analytics', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> <li> - <?= $this->url->link(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> </ul> <h2><?= t('Actions') ?></h2> <ul> <li> - <?= $this->url->link(t('Edit the task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Edit the description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit recurrence'), 'taskmodification', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> @@ -43,19 +46,19 @@ <?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Duplicate'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Duplicate to another project'), 'task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->url->link(t('Move to another project'), 'task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> <?php if ($task['is_active'] == 1): ?> - <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php else: ?> - <?= $this->url->link(t('Open this task'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php endif ?> </li> <?php if ($this->task->canRemove($task)): ?> @@ -64,4 +67,6 @@ </li> <?php endif ?> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div> diff --git a/app/Template/task/table.php b/app/Template/task/table.php deleted file mode 100644 index d06bc7b7..00000000 --- a/app/Template/task/table.php +++ /dev/null @@ -1,56 +0,0 @@ -<table class="table-fixed table-small"> - <tr> - <th class="column-8"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> - <th class="column-8"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th> - <th class="column-8"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th> - <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> - <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th> - <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th> - <th class="column-10"><?= $paginator->order(t('Date created'), 'tasks.date_creation') ?></th> - <th class="column-10"><?= $paginator->order(t('Date completed'), 'tasks.date_completed') ?></th> - <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> - </tr> - <?php foreach ($paginator->getCollection() as $task): ?> - <tr> - <td class="task-table color-<?= $task['color_id'] ?>"> - <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - </td> - <td> - <?= $this->text->in($task['column_id'], $columns) ?> - </td> - <td> - <?= $this->text->in($task['category_id'], $categories, '') ?> - </td> - <td> - <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - </td> - <td> - <?php if ($task['assignee_username']): ?> - <?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?> - <?php else: ?> - <?= t('Unassigned') ?> - <?php endif ?> - </td> - <td> - <?= dt('%B %e, %Y', $task['date_due']) ?> - </td> - <td> - <?= dt('%B %e, %Y', $task['date_creation']) ?> - </td> - <td> - <?php if ($task['date_completed']): ?> - <?= dt('%B %e, %Y', $task['date_completed']) ?> - <?php endif ?> - </td> - <td> - <?php if ($task['is_active'] == \Model\Task::STATUS_OPEN): ?> - <?= t('Open') ?> - <?php else: ?> - <?= t('Closed') ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> -</table> - -<?= $paginator ?> diff --git a/app/Template/task/time_tracking.php b/app/Template/task/time_tracking_details.php index 441cb585..faa07cb8 100644 --- a/app/Template/task/time_tracking.php +++ b/app/Template/task/time_tracking_details.php @@ -1,4 +1,4 @@ -<?= $this->render('task/timesheet', array('task' => $task)) ?> +<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?> <h3><?= t('Subtask timesheet') ?></h3> <?php if ($subtask_paginator->isEmpty()): ?> diff --git a/app/Template/task/timesheet.php b/app/Template/task/time_tracking_summary.php index 0210be7e..0210be7e 100644 --- a/app/Template/task/timesheet.php +++ b/app/Template/task/time_tracking_summary.php diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php index 6455fd66..2ca2387f 100644 --- a/app/Template/task/transitions.php +++ b/app/Template/task/transitions.php @@ -19,7 +19,7 @@ <td><?= $this->e($transition['src_column']) ?></td> <td><?= $this->e($transition['dst_column']) ?></td> <td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td> - <td><?= n(round($transition['time_spent'] / 3600, 2)).' '.t('hours') ?></td> + <td><?= $this->dt->duration($transition['time_spent']) ?></td> </tr> <?php endforeach ?> </table> diff --git a/app/Template/task/new.php b/app/Template/task_creation/form.php index 181b82bf..84f28a1e 100644 --- a/app/Template/task/new.php +++ b/app/Template/task_creation/form.php @@ -1,7 +1,7 @@ <?php if (! $ajax): ?> <div class="page-header"> <ul> - <li><i class="fa fa-table fa-fw"></i><?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $values['project_id'])) ?></li> + <li><i class="fa fa-th fa-fw"></i><?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $values['project_id'])) ?></li> </ul> </div> <?php else: ?> @@ -11,7 +11,7 @@ <?php endif ?> <section id="task-section"> -<form method="post" action="<?= $this->url->href('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('taskcreation', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> diff --git a/app/Template/task_duplication/copy.php b/app/Template/task_duplication/copy.php new file mode 100644 index 00000000..f9106c1d --- /dev/null +++ b/app/Template/task_duplication/copy.php @@ -0,0 +1,43 @@ +<div class="page-header"> + <h2><?= t('Duplicate the task to another project') ?></h2> +</div> + +<?php if (empty($projects_list)): ?> + <p class="alert"><?= t('There is no destination project available.') ?></p> +<?php else: ?> + + <form method="post" action="<?= $this->url->href('taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + + <?= $this->form->label(t('Project'), 'project_id') ?> + <?= $this->form->select( + 'project_id', + $projects_list, + $values, + array(), + array('data-redirect="'.$this->url->href('taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')).'"'), + 'task-reload-project-destination' + ) ?> + + <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?> + <?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?> + + <?= $this->form->label(t('Column'), 'column_id') ?> + <?= $this->form->select('column_id', $columns_list, $values) ?> + + <?= $this->form->label(t('Category'), 'category_id') ?> + <?= $this->form->select('category_id', $categories_list, $values) ?> + + <?= $this->form->label(t('Assignee'), 'owner_id') ?> + <?= $this->form->select('owner_id', $users_list, $values) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </div> + </form> + +<?php endif ?>
\ No newline at end of file diff --git a/app/Template/task/duplicate.php b/app/Template/task_duplication/duplicate.php index e74d2906..4b50d9ca 100644 --- a/app/Template/task/duplicate.php +++ b/app/Template/task_duplication/duplicate.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> diff --git a/app/Template/task_duplication/move.php b/app/Template/task_duplication/move.php new file mode 100644 index 00000000..e90424a2 --- /dev/null +++ b/app/Template/task_duplication/move.php @@ -0,0 +1,43 @@ +<div class="page-header"> + <h2><?= t('Move the task to another project') ?></h2> +</div> + +<?php if (empty($projects_list)): ?> + <p class="alert"><?= t('There is no destination project available.') ?></p> +<?php else: ?> + + <form method="post" action="<?= $this->url->href('taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + + <?= $this->form->label(t('Project'), 'project_id') ?> + <?= $this->form->select( + 'project_id', + $projects_list, + $values, + array(), + array('data-redirect="'.$this->url->href('taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')).'"'), + 'task-reload-project-destination' + ) ?> + + <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?> + <?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?> + + <?= $this->form->label(t('Column'), 'column_id') ?> + <?= $this->form->select('column_id', $columns_list, $values) ?> + + <?= $this->form->label(t('Category'), 'category_id') ?> + <?= $this->form->select('category_id', $categories_list, $values) ?> + + <?= $this->form->label(t('Assignee'), 'owner_id') ?> + <?= $this->form->select('owner_id', $users_list, $values) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </div> + </form> + +<?php endif ?>
\ No newline at end of file diff --git a/app/Template/task/edit_description.php b/app/Template/task_modification/edit_description.php index 84f0cebd..3168f7a3 100644 --- a/app/Template/task/edit_description.php +++ b/app/Template/task_modification/edit_description.php @@ -2,7 +2,7 @@ <h2><?= t('Edit the description') ?></h2> </div> -<form method="post" action="<?= $this->url->href('task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -17,7 +17,7 @@ </li> </ul> <div class="write-area"> - <?= $this->form->textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?> + <?= $this->form->textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'task-show-description-textarea') ?> </div> <div class="preview-area"> <div class="markdown"></div> diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task_modification/edit_recurrence.php index c261e368..f63f1516 100644 --- a/app/Template/task/edit_recurrence.php +++ b/app/Template/task_modification/edit_recurrence.php @@ -15,7 +15,7 @@ <?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?> - <form method="post" action="<?= $this->url->href('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('taskmodification', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -40,12 +40,7 @@ <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> - - <?php if ($ajax): ?> - <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> - <?php else: ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - <?php endif ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> </form> diff --git a/app/Template/task/edit.php b/app/Template/task_modification/edit_task.php index 359df779..fe4696d6 100644 --- a/app/Template/task/edit.php +++ b/app/Template/task_modification/edit_task.php @@ -2,7 +2,7 @@ <h2><?= t('Edit a task') ?></h2> </div> <section id="task-section"> -<form method="post" action="<?= $this->url->href('task', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -30,8 +30,6 @@ </ul> </div> - <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> - </div> <div class="form-column"> diff --git a/app/Template/task/time.php b/app/Template/task_modification/edit_time.php index 6682a08d..8e7f9b42 100644 --- a/app/Template/task/time.php +++ b/app/Template/task_modification/edit_time.php @@ -1,9 +1,14 @@ -<form method="post" action="<?= $this->url->href('task', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off"> +<form method="post" action="<?= $this->url->href('taskmodification', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off"> + + <?php if (empty($values['date_started'])): ?> + <?= $this->url->link('<i class="fa fa-play"></i>', 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-show-start-link', t('Set automatically the start date')) ?> + <?php endif ?> + <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->label(t('Start date'), 'date_started') ?> - <?= $this->form->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + <?= $this->form->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-datetime') ?> <?= $this->form->label(t('Time estimated'), 'time_estimated') ?> <?= $this->form->numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?> diff --git a/app/Template/task/close.php b/app/Template/task_status/close.php index 160d5400..4de3dcb2 100644 --- a/app/Template/task/close.php +++ b/app/Template/task_status/close.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> diff --git a/app/Template/task/open.php b/app/Template/task_status/open.php index fbcc1111..0043fdae 100644 --- a/app/Template/task/open.php +++ b/app/Template/task_status/open.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> diff --git a/app/Template/timetable_day/index.php b/app/Template/timetable_day/index.php index d2877816..386ceec2 100644 --- a/app/Template/timetable_day/index.php +++ b/app/Template/timetable_day/index.php @@ -30,10 +30,10 @@ <?= $this->form->csrf() ?> <?= $this->form->label(t('Start time'), 'start') ?> - <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('start', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('End time'), 'end') ?> - <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('end', $this->dt->getDayHours(), $values, $errors) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/timetable_extra/index.php b/app/Template/timetable_extra/index.php index d3224ae6..e9982335 100644 --- a/app/Template/timetable_extra/index.php +++ b/app/Template/timetable_extra/index.php @@ -42,10 +42,10 @@ <?= $this->form->checkbox('all_day', t('All day'), 1) ?> <?= $this->form->label(t('Start time'), 'start') ?> - <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('start', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('End time'), 'end') ?> - <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('end', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('Comment'), 'comment') ?> <?= $this->form->text('comment', $values, $errors) ?> diff --git a/app/Template/timetable_off/index.php b/app/Template/timetable_off/index.php index 75e02dbd..615c2b8d 100644 --- a/app/Template/timetable_off/index.php +++ b/app/Template/timetable_off/index.php @@ -42,10 +42,10 @@ <?= $this->form->checkbox('all_day', t('All day'), 1) ?> <?= $this->form->label(t('Start time'), 'start') ?> - <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('start', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('End time'), 'end') ?> - <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('end', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('Comment'), 'comment') ?> <?= $this->form->text('comment', $values, $errors) ?> diff --git a/app/Template/timetable_week/index.php b/app/Template/timetable_week/index.php index 552e9302..d58c6cfb 100644 --- a/app/Template/timetable_week/index.php +++ b/app/Template/timetable_week/index.php @@ -13,7 +13,7 @@ </tr> <?php foreach ($timetable as $slot): ?> <tr> - <td><?= $this->datetime->getWeekDay($slot['day']) ?></td> + <td><?= $this->dt->getWeekDay($slot['day']) ?></td> <td><?= $slot['start'] ?></td> <td><?= $slot['end'] ?></td> <td> @@ -32,13 +32,13 @@ <?= $this->form->csrf() ?> <?= $this->form->label(t('Day'), 'day') ?> - <?= $this->form->select('day', $this->datetime->getWeekDays(), $values, $errors) ?> + <?= $this->form->select('day', $this->dt->getWeekDays(), $values, $errors) ?> <?= $this->form->label(t('Start time'), 'start') ?> - <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('start', $this->dt->getDayHours(), $values, $errors) ?> <?= $this->form->label(t('End time'), 'end') ?> - <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?> + <?= $this->form->select('end', $this->dt->getDayHours(), $values, $errors) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/user/authentication.php b/app/Template/user/authentication.php new file mode 100644 index 00000000..a62c8f93 --- /dev/null +++ b/app/Template/user/authentication.php @@ -0,0 +1,32 @@ +<div class="page-header"> + <h2><?= t('Edit Authentication') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('user', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('username', $values) ?> + + <?= $this->form->label(t('Google Id'), 'google_id') ?> + <?= $this->form->text('google_id', $values, $errors) ?> + + <?= $this->form->label(t('Github Id'), 'github_id') ?> + <?= $this->form->text('github_id', $values, $errors) ?> + + <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?> + </div> + + <div class="alert alert-info"> + <ul> + <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li> + <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li> + </ul> + </div> +</form>
\ No newline at end of file diff --git a/app/Template/user/new.php b/app/Template/user/create_local.php index 0db1e824..aeec300f 100644 --- a/app/Template/user/new.php +++ b/app/Template/user/create_local.php @@ -2,6 +2,7 @@ <div class="page-header"> <ul> <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> </div> <section> diff --git a/app/Template/user/create_remote.php b/app/Template/user/create_remote.php new file mode 100644 index 00000000..52661585 --- /dev/null +++ b/app/Template/user/create_remote.php @@ -0,0 +1,57 @@ +<section id="main"> + <div class="page-header"> + <ul> + <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + </ul> + </div> + <form method="post" action="<?= $this->url->href('user', '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"')) ?><br/> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors) ?><br/> + + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors) ?><br/> + + <?= $this->form->label(t('Google Id'), 'google_id') ?> + <?= $this->form->password('google_id', $values, $errors) ?><br/> + + <?= $this->form->label(t('Github Id'), 'github_id') ?> + <?= $this->form->password('github_id', $values, $errors) ?><br/> + </div> + + <div class="form-column"> + <?= $this->form->label(t('Add project member'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?><br/> + + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/> + + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors) ?><br/> + + <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 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 class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'user', 'index') ?> + </div> + </form> + <div class="alert alert-info"> + <ul> + <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li> + <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li> + </ul> + </div> +</section>
\ No newline at end of file diff --git a/app/Template/user/edit.php b/app/Template/user/edit.php index 2462308f..ea7e3875 100644 --- a/app/Template/user/edit.php +++ b/app/Template/user/edit.php @@ -6,7 +6,6 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('is_ldap_user', $values) ?> <?= $this->form->label(t('Username'), 'username') ?> <?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/> @@ -23,13 +22,9 @@ <?= $this->form->label(t('Language'), 'language') ?> <?= $this->form->select('language', $languages, $values, $errors) ?><br/> - <div class="alert alert-error"> - <?= $this->form->checkbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/> - - <?php if ($this->user->isAdmin()): ?> - <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/> - <?php endif ?> - </div> + <?php if ($this->user->isAdmin()): ?> + <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/> + <?php endif ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/user/external.php b/app/Template/user/external.php index df85ace7..3b872e85 100644 --- a/app/Template/user/external.php +++ b/app/Template/user/external.php @@ -8,9 +8,9 @@ <p class="listing"> <?php if ($this->user->isCurrentUser($user['id'])): ?> <?php if (empty($user['google_id'])): ?> - <?= $this->url->link(t('Link my Google Account'), 'user', 'google', array(), true) ?> + <?= $this->url->link(t('Link my Google Account'), 'oauth', 'google', array(), true) ?> <?php else: ?> - <?= $this->url->link(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?> + <?= $this->url->link(t('Unlink my Google Account'), 'oauth', 'unlink', array('backend' => 'google'), true) ?> <?php endif ?> <?php else: ?> <?= empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?> @@ -24,9 +24,9 @@ <p class="listing"> <?php if ($this->user->isCurrentUser($user['id'])): ?> <?php if (empty($user['github_id'])): ?> - <?= $this->url->link(t('Link my GitHub Account'), 'user', 'github', array(), true) ?> + <?= $this->url->link(t('Link my Github Account'), 'oauth', 'github', array(), true) ?> <?php else: ?> - <?= $this->url->link(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?> + <?= $this->url->link(t('Unlink my Github Account'), 'oauth', 'unlink', array('backend' => 'github'), true) ?> <?php endif ?> <?php else: ?> <?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?> diff --git a/app/Template/user/index.php b/app/Template/user/index.php index fc575466..edf043a6 100644 --- a/app/Template/user/index.php +++ b/app/Template/user/index.php @@ -2,7 +2,8 @@ <div class="page-header"> <?php if ($this->user->isAdmin()): ?> <ul> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> <?php endif ?> </div> diff --git a/app/Template/user/layout.php b/app/Template/user/layout.php index e60ab77d..a27f359b 100644 --- a/app/Template/user/layout.php +++ b/app/Template/user/layout.php @@ -3,7 +3,8 @@ <?php if ($this->user->isAdmin()): ?> <ul> <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> <?php endif ?> </div> diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index e61a43bf..213b3209 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -58,6 +58,9 @@ <?php if ($this->user->isAdmin()): ?> <li> + <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?> + </li> + <li> <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> </li> <li> @@ -71,4 +74,6 @@ </li> <?php endif ?> </ul> + <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> + <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> </div>
\ No newline at end of file |