diff options
author | Imbasaur <yarrusg@gmail.com> | 2016-04-13 17:05:59 +0200 |
---|---|---|
committer | Imbasaur <yarrusg@gmail.com> | 2016-04-13 17:05:59 +0200 |
commit | 99f275e5bb033cca33eee87b0e914645730f13d1 (patch) | |
tree | ad845419d56304f2bf014744f0878186f7155a3c /app/Template | |
parent | 13d5bd8e48bd6c0109d1272da58a8879bf9a6737 (diff) | |
parent | cd5bf9d4d214ec9282b706c26bb27cabf150ee63 (diff) |
Merge pull request #1 from fguillot/master
Diffstat (limited to 'app/Template')
31 files changed, 132 insertions, 242 deletions
diff --git a/app/Template/activity/filter_dropdown.php b/app/Template/activity/filter_dropdown.php new file mode 100644 index 00000000..8d7a7de3 --- /dev/null +++ b/app/Template/activity/filter_dropdown.php @@ -0,0 +1,14 @@ +<div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Default filters') ?>"><i class="fa fa-filter fa-fw"></i><i class="fa fa-caret-down"></i></a> + <ul> + <li><a href="#" class="filter-helper filter-reset" data-filter="" title="<?= t('Keyboard shortcut: "%s"', 'r') ?>"><?= t('Reset filters') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="creator:me"><?= t('My activities') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="created:<=<?= date('Y-m-d', strtotime('yesterday')) ?>"><?= t('Activity until yesterday') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="created:<=<?= date('Y-m-d')?>"><?= t('Activity until today') ?></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> + <?= $this->url->doc(t('View advanced search syntax'), 'search') ?> + </li> + </ul> +</div>
\ No newline at end of file diff --git a/app/Template/activity/project.php b/app/Template/activity/project.php index ba6d6629..176d9b99 100644 --- a/app/Template/activity/project.php +++ b/app/Template/activity/project.php @@ -1,40 +1,14 @@ <section id="main"> - <div class="page-header"> + <?= $this->projectHeader->render($project, 'Analytic', $this->app->getRouterAction()) ?> + + <?php if ($project['is_public']): ?> + <div class="menu-inline pull-right"> <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-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->hasProjectAccess('ProjectEdit', 'edit', $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> - <?php if ($project['is_public']): ?> - <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-calendar fa-fw"></i><?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li> - <?php endif ?> + <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-calendar fa-fw"></i><?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li> </ul> </div> + <?php endif ?> <?= $this->render('event/events', array('events' => $events)) ?> </section>
\ No newline at end of file diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index f1dba552..35793cbb 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -1,36 +1,5 @@ <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-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->hasProjectAccess('ProjectEdit', 'edit', $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> - </ul> - </div> + <?= $this->projectHeader->render($project, 'Listing', 'show') ?> <section class="sidebar-container"> <?= $this->render($sidebar_template, array('project' => $project)) ?> diff --git a/app/Template/app/layout.php b/app/Template/app/layout.php index 200cb0d7..2a32ac02 100644 --- a/app/Template/app/layout.php +++ b/app/Template/app/layout.php @@ -1,5 +1,5 @@ <section id="main"> - <div class="page-header page-header-mobile"> + <div class="page-header"> <ul> <?php if ($this->user->hasAccess('ProjectCreation', 'create')): ?> <li> diff --git a/app/Template/avatar_file/show.php b/app/Template/avatar_file/show.php new file mode 100644 index 00000000..266a2ccb --- /dev/null +++ b/app/Template/avatar_file/show.php @@ -0,0 +1,20 @@ +<div class="page-header"> + <h2><?= t('Avatar') ?></h2> +</div> + +<?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path'], '') ?> + +<form method="post" enctype="multipart/form-data" action="<?= $this->url->href('AvatarFile', 'upload', array('user_id' => $user['id'])) ?>"> + <?= $this->form->csrf() ?> + <?= $this->form->label(t('Upload my avatar image'), 'avatar') ?> + <?= $this->form->file('avatar') ?> + + <div class="form-actions"> + <?php if (! empty($user['avatar_path'])): ?> + <?= $this->url->link(t('Remove my image'), 'AvatarFile', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?> + <?php endif ?> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?> + </div> +</form> diff --git a/app/Template/board/task_avatar.php b/app/Template/board/task_avatar.php index 5630c190..39f6b54d 100644 --- a/app/Template/board/task_avatar.php +++ b/app/Template/board/task_avatar.php @@ -12,6 +12,7 @@ $task['assignee_username'], $task['assignee_name'], $task['assignee_email'], + $task['assignee_avatar_path'], 'avatar-inline' ) ?> </span> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index a8203739..a9d381a3 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -76,6 +76,8 @@ <i class="fa fa-flag flag-milestone"></i> </span> <?php endif ?> + + <?= $this->hook->render('template:board:task:icons', array('task' => $task)) ?> <?= $this->task->formatPriority($project, $task) ?> diff --git a/app/Template/board/view_private.php b/app/Template/board/view_private.php index b5e38c66..13702273 100644 --- a/app/Template/board/view_private.php +++ b/app/Template/board/view_private.php @@ -1,19 +1,12 @@ <section id="main"> - <?= $this->render('project_header/header', array( - 'project' => $project, - 'filters' => $filters, - 'categories_list' => $categories_list, - 'users_list' => $users_list, - 'custom_filters_list' => $custom_filters_list, - 'is_board' => true, - )) ?> + <?= $this->projectHeader->render($project, 'Board', 'show', true) ?> <?= $this->render('board/table_container', array( - 'project' => $project, - 'swimlanes' => $swimlanes, - 'board_private_refresh_interval' => $board_private_refresh_interval, - 'board_highlight_period' => $board_highlight_period, + 'project' => $project, + 'swimlanes' => $swimlanes, + 'board_private_refresh_interval' => $board_private_refresh_interval, + 'board_highlight_period' => $board_highlight_period, )) ?> </section> diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php index 7085b51e..f00e810b 100644 --- a/app/Template/calendar/show.php +++ b/app/Template/calendar/show.php @@ -1,9 +1,5 @@ <section id="main"> - <?= $this->render('project_header/header', array( - 'project' => $project, - 'filters' => $filters, - )) ?> - + <?= $this->projectHeader->render($project, 'Calendar', 'show') ?> <div id="calendar" data-save-url="<?= $this->url->href('calendar', 'save', array('project_id' => $project['id'])) ?>" data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>" diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index ce456c5d..3f45e2e7 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -1,6 +1,6 @@ <div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>"> - <?= $this->avatar->render($comment['user_id'], $comment['username'], $comment['name'], $comment['email']) ?> + <?= $this->avatar->render($comment['user_id'], $comment['username'], $comment['name'], $comment['email'], $comment['avatar_path']) ?> <div class="comment-title"> <?php if (! empty($comment['username'])): ?> diff --git a/app/Template/event/events.php b/app/Template/event/events.php index ef651321..c58376c4 100644 --- a/app/Template/event/events.php +++ b/app/Template/event/events.php @@ -7,7 +7,8 @@ $event['creator_id'], $event['author_username'], $event['author_name'], - $event['email'] + $event['email'], + $event['avatar_path'] ) ?> <div class="activity-content"> diff --git a/app/Template/gantt/project.php b/app/Template/gantt/project.php index fe193c2b..e6c8592f 100644 --- a/app/Template/gantt/project.php +++ b/app/Template/gantt/project.php @@ -1,10 +1,5 @@ <section id="main"> - <?= $this->render('project_header/header', array( - 'project' => $project, - 'filters' => $filters, - 'users_list' => $users_list, - )) ?> - + <?= $this->projectHeader->render($project, 'Gantt', 'project') ?> <div class="menu-inline"> <ul> <li <?= $sorting === 'board' ? 'class="active"' : '' ?>> diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php index 10dcedcc..98b9528a 100644 --- a/app/Template/listing/show.php +++ b/app/Template/listing/show.php @@ -1,11 +1,5 @@ <section id="main"> - <?= $this->render('project_header/header', array( - 'project' => $project, - 'filters' => $filters, - 'custom_filters_list' => $custom_filters_list, - 'users_list' => $users_list, - 'categories_list' => $categories_list, - )) ?> + <?= $this->projectHeader->render($project, 'Listing', 'show') ?> <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('No tasks found.') ?></p> @@ -24,7 +18,11 @@ <?php foreach ($paginator->getCollection() as $task): ?> <tr> <td class="task-table color-<?= $task['color_id'] ?>"> - <?= $this->render('task/dropdown', array('task' => $task)) ?> + <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> + <?= $this->render('task/dropdown', array('task' => $task)) ?> + <?php else: ?> + #<?= $task['id'] ?> + <?php endif ?> </td> <td> <?= $this->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?> diff --git a/app/Template/project/layout.php b/app/Template/project/layout.php index eb391ae5..fcb3e5f3 100644 --- a/app/Template/project/layout.php +++ b/app/Template/project/layout.php @@ -1,30 +1,5 @@ <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-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> - </ul> - </div> + <?= $this->projectHeader->render($project, 'Listing', 'show') ?> <section class="sidebar-container"> <?= $this->render($sidebar_template, array('project' => $project)) ?> diff --git a/app/Template/project_header/dropdown.php b/app/Template/project_header/dropdown.php index bbc033bf..759a5135 100644 --- a/app/Template/project_header/dropdown.php +++ b/app/Template/project_header/dropdown.php @@ -1,7 +1,7 @@ <div class="dropdown"> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> + <a href="#" class="dropdown-menu action-menu"><?= t('Menu') ?> <i class="fa fa-caret-down"></i></a> <ul> - <?php if ($is_board): ?> + <?php if ($board_view): ?> <li> <span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>> <i class="fa fa-expand fa-fw"></i> diff --git a/app/Template/project_header/header.php b/app/Template/project_header/header.php index f6e5af9e..aaa8137b 100644 --- a/app/Template/project_header/header.php +++ b/app/Template/project_header/header.php @@ -1,7 +1,7 @@ <div class="project-header"> <?= $this->hook->render('template:project:header:before', array('project' => $project)) ?> - <?= $this->render('project_header/dropdown', array('project' => $project, 'is_board' => isset($is_board))) ?> + <?= $this->render('project_header/dropdown', array('project' => $project, 'board_view' => $board_view)) ?> <?= $this->render('project_header/views', array('project' => $project, 'filters' => $filters)) ?> <?= $this->render('project_header/search', array( 'project' => $project, diff --git a/app/Template/project_header/views.php b/app/Template/project_header/views.php index f8fdbb02..353e4b62 100644 --- a/app/Template/project_header/views.php +++ b/app/Template/project_header/views.php @@ -1,7 +1,7 @@ <ul class="views"> <li <?= $this->app->getRouterController() === 'ProjectOverview' ? 'class="active"' : '' ?>> <i class="fa fa-eye fa-fw"></i> - <?= $this->url->link(t('Overview'), 'ProjectOverview', 'show', array('project_id' => $project['id']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?> + <?= $this->url->link(t('Overview'), 'ProjectOverview', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?> </li> <li <?= $this->app->getRouterController() === 'Board' ? 'class="active"' : '' ?>> <i class="fa fa-th fa-fw"></i> diff --git a/app/Template/project_overview/description.php b/app/Template/project_overview/description.php index 9895aede..72ccf06a 100644 --- a/app/Template/project_overview/description.php +++ b/app/Template/project_overview/description.php @@ -5,7 +5,7 @@ <div class="accordion-content"> <?php if ($this->user->hasProjectAccess('ProjectEdit', 'description', $project['id'])): ?> <div class="buttons-header"> - <?= $this->url->button('fa-edit', t('Edit Description'), 'ProjectEdit', 'description', array('project_id' => $project['id']), 'popover') ?> + <?= $this->url->button('fa-edit', t('Edit description'), 'ProjectEdit', 'description', array('project_id' => $project['id']), 'popover') ?> </div> <?php endif ?> <article class="markdown"> diff --git a/app/Template/project_overview/show.php b/app/Template/project_overview/show.php index 9a9786e8..6fe815b3 100644 --- a/app/Template/project_overview/show.php +++ b/app/Template/project_overview/show.php @@ -1,9 +1,5 @@ <section id="main"> - <?= $this->render('project_header/header', array( - 'project' => $project, - 'filters' => $filters, - )) ?> - + <?= $this->projectHeader->render($project, 'ProjectOverview', 'show') ?> <?= $this->render('project_overview/columns', array('project' => $project)) ?> <?= $this->render('project_overview/description', array('project' => $project)) ?> <?= $this->render('project_overview/attachments', array('project' => $project, 'images' => $images, 'files' => $files)) ?> diff --git a/app/Template/search/activity.php b/app/Template/search/activity.php new file mode 100644 index 00000000..60362215 --- /dev/null +++ b/app/Template/search/activity.php @@ -0,0 +1,39 @@ +<section id="main"> + <div class="page-header"> + <ul> + <li> + <i class="fa fa-search fa-fw"></i> + <?= $this->url->link(t('Search tasks'), 'search', 'index') ?> + </li> + </ul> + </div> + + <div class="filter-box"> + <form method="get" action="<?= $this->url->dir() ?>" class="search"> + <?= $this->form->hidden('controller', $values) ?> + <?= $this->form->hidden('action', $values) ?> + <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> + <?= $this->render('activity/filter_dropdown') ?> + </form> + </div> + + <?php if (empty($values['search'])): ?> + <div class="listing"> + <h3><?= t('Advanced search') ?></h3> + <p><?= t('Example of query: ') ?><strong>project:"My project" creator:me</strong></p> + <ul> + <li><?= t('Search by project: ') ?><strong>project:"My project"</strong></li> + <li><?= t('Search by creator: ') ?><strong>creator:admin</strong></li> + <li><?= t('Search by creation date: ') ?><strong>created:today</strong></li> + <li><?= t('Search by task status: ') ?><strong>status:open</strong></li> + <li><?= t('Search by task title: ') ?><strong>title:"My task"</strong></li> + </ul> + <p><i class="fa fa-external-link fa-fw"></i><?= $this->url->doc(t('View advanced search syntax'), 'search') ?></p> + </div> + <?php elseif (! empty($values['search']) && $nb_events === 0): ?> + <p class="alert"><?= t('Nothing found.') ?></p> + <?php else: ?> + <?= $this->render('event/events', array('events' => $events)) ?> + <?php endif ?> + +</section>
\ No newline at end of file diff --git a/app/Template/search/index.php b/app/Template/search/index.php index 9231a6f3..d5d07ed6 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -2,8 +2,8 @@ <div class="page-header"> <ul> <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('All projects'), 'project', 'index') ?> + <i class="fa fa-search fa-fw"></i> + <?= $this->url->link(t('Activity stream search'), 'search', 'activity') ?> </li> </ul> </div> diff --git a/app/Template/task/details.php b/app/Template/task/details.php index a7c4ad01..6093c157 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -1,5 +1,6 @@ <section id="task-summary"> <h2><?= $this->text->e($task['title']) ?></h2> + <div class="task-summary-container color-<?= $task['color_id'] ?>"> <div class="task-summary-column"> <ul class="no-bullet"> @@ -134,4 +135,10 @@ </ul> </div> </div> + + <?php if ($editable && empty($task['date_started'])): ?> + <div class="task-summary-buttons"> + <?= $this->url->button('fa-play', t('Set start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </div> + <?php endif ?> </section> diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index ca27fd4f..52db5d1b 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -1,25 +1,5 @@ <section id="main"> - <div class="page-header"> - <ul> - <li> - <?= $this->render('task/menu', array('task' => $task)) ?> - </li> - <li> - <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->hasProjectAccess('ProjectEdit', 'edit', $task['project_id'])): ?> - <li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $task['project_id'])) ?> - </li> - <?php endif ?> - </ul> - </div> + <?= $this->projectHeader->render($project, 'Listing', 'show') ?> <section class="sidebar-container" id="task-view" data-edit-url="<?= $this->url->href('taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php deleted file mode 100644 index fe30d06e..00000000 --- a/app/Template/task/menu.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> -<div class="dropdown"> - <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a> - <ul> - <?php if (empty($task['date_started'])): ?> - <li> - <i class="fa fa-play fa-fw"></i> - <?= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </li> - <?php endif ?> - <li> - <i class="fa fa-pencil-square-o fa-fw"></i> - <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-align-left fa-fw"></i> - <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-refresh fa-rotate-90 fa-fw"></i> - <?= $this->url->link(t('Edit recurrence'), 'TaskRecurrence', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-code-fork fa-fw"></i> - <?= $this->url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-external-link fa-fw"></i> - <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-comment-o fa-fw"></i> - <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-file fa-fw"></i> - <?= $this->url->link(t('Attach a document'), 'TaskFile', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-camera fa-fw"></i> - <?= $this->url->link(t('Add a screenshot'), 'TaskFile', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-files-o fa-fw"></i> - <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-clipboard fa-fw"></i> - <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <i class="fa fa-clone fa-fw"></i> - <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <li> - <?php if ($task['is_active'] == 1): ?> - <i class="fa fa-times fa-fw"></i> - <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - <?php else: ?> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - <?php endif ?> - </li> - <?php if ($this->task->canRemove($task)): ?> - <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> - </li> - <?php endif ?> - - <?= $this->hook->render('template:task:menu') ?> - </ul> -</div> -<?php endif ?> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index d68f6c48..86422941 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -14,7 +14,6 @@ 'task' => $task, 'subtasks' => $subtasks, 'project' => $project, - 'users_list' => isset($users_list) ? $users_list : array(), 'editable' => true, )) ?> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index ee3b1594..773b28dc 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -24,6 +24,8 @@ </li> <?php endif ?> </ul> + + <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> <h2><?= t('Actions') ?></h2> <ul> <li> @@ -90,6 +92,7 @@ </li> <?php endif ?> </ul> + <?php endif ?> <?= $this->hook->render('template:task:sidebar', array('task' => $task)) ?> </div> diff --git a/app/Template/task_creation/form.php b/app/Template/task_creation/form.php index cecba9ef..9bfd839f 100644 --- a/app/Template/task_creation/form.php +++ b/app/Template/task_creation/form.php @@ -28,6 +28,8 @@ <?php if (! isset($duplicate)): ?> <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> <?php endif ?> + + <?= $this->hook->render('template:task:form:left-column', array('values'=>$values, 'errors'=>$errors)) ?> </div> <div class="form-column"> @@ -48,4 +50,4 @@ <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/user/index.php b/app/Template/user/index.php index 364fd965..0b5da17c 100644 --- a/app/Template/user/index.php +++ b/app/Template/user/index.php @@ -14,6 +14,7 @@ <?php else: ?> <table class="table-stripped"> <tr> + <th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th> <th class="column-18"><?= $paginator->order(t('Username'), 'username') ?></th> <th class="column-18"><?= $paginator->order(t('Name'), 'name') ?></th> <th class="column-15"><?= $paginator->order(t('Email'), 'email') ?></th> @@ -26,7 +27,9 @@ <?php foreach ($paginator->getCollection() as $user): ?> <tr> <td> - <?= '#'.$user['id'] ?> + <?= '#'.$user['id'] ?> + </td> + <td> <?= $this->url->link($this->text->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?> </td> <td> diff --git a/app/Template/user/notifications.php b/app/Template/user/notifications.php index 2a5c8152..6e1a0004 100644 --- a/app/Template/user/notifications.php +++ b/app/Template/user/notifications.php @@ -3,11 +3,8 @@ </div> <form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br> - <hr> <h4><?= t('Notification methods:') ?></h4> <?= $this->form->checkboxes('notification_types', $types, $notifications) ?> diff --git a/app/Template/user/profile.php b/app/Template/user/profile.php index 80a633e3..9c9d3282 100644 --- a/app/Template/user/profile.php +++ b/app/Template/user/profile.php @@ -1,5 +1,6 @@ <section id="main"> <br> + <?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path']) ?> <ul class="listing"> <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index 20fd2ad2..5ea2e355 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -37,6 +37,9 @@ <li <?= $this->app->checkMenuSelection('user', 'edit') ?>> <?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?> </li> + <li <?= $this->app->checkMenuSelection('AvatarFile') ?>> + <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?> + </li> <?php endif ?> <?php if ($user['is_ldap_user'] == 0): ?> |