diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/app_index.php | 12 | ||||
-rw-r--r-- | app/Template/board_index.php | 24 | ||||
-rw-r--r-- | app/Template/board_show.php | 14 | ||||
-rw-r--r-- | app/Template/config_layout.php | 7 | ||||
-rw-r--r-- | app/Template/config_sidebar.php | 38 | ||||
-rw-r--r-- | app/Template/layout.php | 35 | ||||
-rw-r--r-- | app/Template/project_activity.php | 8 | ||||
-rw-r--r-- | app/Template/project_index.php | 5 | ||||
-rw-r--r-- | app/Template/project_layout.php | 9 | ||||
-rw-r--r-- | app/Template/project_new.php | 3 | ||||
-rw-r--r-- | app/Template/project_search.php | 13 | ||||
-rw-r--r-- | app/Template/project_sidebar.php | 88 | ||||
-rw-r--r-- | app/Template/project_tasks.php | 8 | ||||
-rw-r--r-- | app/Template/task_layout.php | 7 | ||||
-rw-r--r-- | app/Template/task_new.php | 6 | ||||
-rw-r--r-- | app/Template/task_sidebar.php | 44 | ||||
-rw-r--r-- | app/Template/user_index.php | 7 | ||||
-rw-r--r-- | app/Template/user_layout.php | 9 | ||||
-rw-r--r-- | app/Template/user_new.php | 7 | ||||
-rw-r--r-- | app/Template/user_sidebar.php | 41 |
20 files changed, 166 insertions, 219 deletions
diff --git a/app/Template/app_index.php b/app/Template/app_index.php index 91eecce4..d60638d0 100644 --- a/app/Template/app_index.php +++ b/app/Template/app_index.php @@ -1,6 +1,16 @@ <section id="main"> <div class="page-header"> - <h2><?= t('Dashboard') ?></h2> + <ul> + <?php if (Helper\is_admin()): ?> + <li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New project'), 'project', 'create') ?></li> + <?php endif ?> + <li><i class="fa fa-lock fa-fw"></i><?= Helper\a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> + <li><i class="fa fa-folder fa-fw"></i><?= Helper\a(t('Project management'), 'project', 'index') ?></li> + <?php if (Helper\is_admin()): ?> + <li><i class="fa fa-user fa-fw"></i><?= Helper\a(t('User management'), 'user', 'index') ?></li> + <li><i class="fa fa-cog fa-fw"></i><?= Helper\a(t('Settings'), 'config', 'index') ?></li> + <?php endif ?> + </ul> </div> <section id="dashboard"> <div class="dashboard-left-column"> diff --git a/app/Template/board_index.php b/app/Template/board_index.php index 4fd3d326..d15d455f 100644 --- a/app/Template/board_index.php +++ b/app/Template/board_index.php @@ -1,22 +1,12 @@ <section id="main"> - - <div class="page-header board"> - <h2> - <?php if (Helper\is_admin()): ?> - <?= Helper\a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $current_project_id)) ?> - <?php endif ?> - <?= t('Project "%s"', $current_project_name) ?> - </h2> - </div> - - <div class="project-menu"> + <div class="page-header"> <ul> <li> - <span class="hide-tablet"><?= t('Filter by user') ?></span> + <?= t('Filter by user') ?> <?= Helper\form_select('user_id', $users, $filters) ?> </li> <li> - <span class="hide-tablet"><?= t('Filter by category') ?></span> + <?= t('Filter by category') ?> <?= Helper\form_select('category_id', $categories, $filters) ?> </li> <li> @@ -27,16 +17,16 @@ <?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $current_project_id)) ?> </li> <li> - <i class="fa fa-check-square-o"></i> + <i class="fa fa-check-square-o fa-fw"></i> <?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $current_project_id)) ?> </li> <li> - <i class="fa fa-dashboard"></i> + <i class="fa fa-dashboard fa-fw"></i> <?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $current_project_id)) ?> </li> <?php if (Helper\is_admin()): ?> - <li><i class="fa fa-cog"></i> - <?= Helper\a(t('Edit board'), 'board', 'edit', array('project_id' => $current_project_id)) ?> + <li><i class="fa fa-cog fa-fw"></i> + <?= Helper\a(t('Configure'), 'project', 'show', array('project_id' => $current_project_id)) ?> <?php endif ?> </ul> </div> diff --git a/app/Template/board_show.php b/app/Template/board_show.php index e8c3c1ba..4865ce5c 100644 --- a/app/Template/board_show.php +++ b/app/Template/board_show.php @@ -1,19 +1,19 @@ -<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= $board_private_refresh_interval ?>" data-csrf-token=<?= \Core\Security::getCSRFToken() ?>> +<table id="board" + data-project-id="<?= $current_project_id ?>" + data-time="<?= time() ?>" + data-check-interval="<?= $board_private_refresh_interval ?>" + data-csrf-token=<?= \Core\Security::getCSRFToken() ?>> <tr> <?php $column_with = round(100 / count($board), 2); ?> <?php foreach ($board as $column): ?> <th width="<?= $column_with ?>%"> <div class="board-add-icon"> - <a href="?controller=task&action=create&project_id=<?= $column['project_id'] ?>&column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a> + <?= Helper\a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id']), false, '', t('Add a new task')) ?> </div> <?= Helper\escape($column['title']) ?> <?php if ($column['task_limit']): ?> <span title="<?= t('Task limit') ?>" class="task-limit"> - ( - <span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span> - / - <?= Helper\escape($column['task_limit']) ?> - ) + (<span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span>/<?= Helper\escape($column['task_limit']) ?>) </span> <?php else: ?> <span title="<?= t('Task count') ?>" class="task-count"> diff --git a/app/Template/config_layout.php b/app/Template/config_layout.php index 3aacb9b7..bafad6bb 100644 --- a/app/Template/config_layout.php +++ b/app/Template/config_layout.php @@ -1,12 +1,9 @@ <section id="main"> - <div class="page-header"> - <h2><?= t('Settings') ?></h2> - </div> - <section class="config-show" id="config-section"> + <section class="sidebar-container" id="config-section"> <?= Helper\template('config_sidebar') ?> - <div class="config-show-main"> + <div class="sidebar-content"> <?= $config_content_for_layout ?> </div> </section> diff --git a/app/Template/config_sidebar.php b/app/Template/config_sidebar.php index d96159b8..5870ca81 100644 --- a/app/Template/config_sidebar.php +++ b/app/Template/config_sidebar.php @@ -1,22 +1,20 @@ -<div class="config-show-sidebar"> +<div class="sidebar"> <h2><?= t('Actions') ?></h2> - <div class="config-show-actions"> - <ul> - <li> - <?= Helper\a(t('About'), 'config', 'index') ?> - </li> - <li> - <?= Helper\a(t('Application settings'), 'config', 'application') ?> - </li> - <li> - <?= Helper\a(t('Board settings'), 'config', 'board') ?> - </li> - <li> - <?= Helper\a(t('Webhooks'), 'config', 'webhook') ?> - </li> - <li> - <?= Helper\a(t('API'), 'config', 'api') ?> - </li> - </ul> - </div> + <ul> + <li> + <?= Helper\a(t('About'), 'config', 'index') ?> + </li> + <li> + <?= Helper\a(t('Application settings'), 'config', 'application') ?> + </li> + <li> + <?= Helper\a(t('Board settings'), 'config', 'board') ?> + </li> + <li> + <?= Helper\a(t('Webhooks'), 'config', 'webhook') ?> + </li> + <li> + <?= Helper\a(t('API'), 'config', 'api') ?> + </li> + </ul> </div>
\ No newline at end of file diff --git a/app/Template/layout.php b/app/Template/layout.php index a86d613b..58761414 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -7,21 +7,14 @@ <meta name="robots" content="noindex,nofollow"> <?php if (isset($board_public_refresh_interval)): ?> - <meta http-equiv="refresh" content="<?= $board_public_refresh_interval ?>" > + <meta http-equiv="refresh" content="<?= $board_public_refresh_interval ?>"> <?php endif ?> <?php if (! isset($not_editable)): ?> - <?= Helper\js('assets/js/jquery-1.11.1.min.js') ?> - <?= Helper\js('assets/js/jquery-ui-1.10.4.custom.min.js') ?> - <?= Helper\js('assets/js/jquery.ui.touch-punch.min.js') ?> - <?= Helper\js('assets/js/chosen.jquery.min.js') ?> <?= Helper\js('assets/js/app.js') ?> <?php endif ?> <?= Helper\css('assets/css/app.css') ?> - <?= Helper\css('assets/css/font-awesome.min.css') ?> - <?= Helper\css('assets/css/jquery-ui-1.10.4.custom.css'); ?> - <?= Helper\css('assets/css/chosen.min.css'); ?> <link rel="icon" type="image/png" href="assets/img/favicon.png"> <link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png"> @@ -29,7 +22,7 @@ <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"> - <title><?= isset($title) ? Helper\escape($title).' - Kanboard' : 'Kanboard' ?></title> + <title><?= isset($title) ? Helper\escape($title) : 'Kanboard' ?></title> </head> <body> <?php if (isset($no_layout) && $no_layout): ?> @@ -37,8 +30,7 @@ <?php else: ?> <header> <nav> - <a class="logo" href="?">kanboard</a> - + <h1><?= Helper\a('<i class="fa fa-home fa-fw"></i>', 'app', 'index', array(), false, 'home-link', t('Dashboard')).' '.Helper\summary(Helper\escape($title)) ?></h1> <ul> <?php if (isset($board_selector) && ! empty($board_selector)): ?> <li> @@ -50,26 +42,9 @@ </select> </li> <?php endif ?> - <li <?= isset($menu) && $menu === 'dashboard' ? 'class="active"' : '' ?>> - <a href="?controller=app"><?= t('Dashboard') ?></a> - </li> - <li <?= isset($menu) && $menu === 'boards' ? 'class="active"' : '' ?>> - <a href="?controller=board"><?= t('Boards') ?></a> - </li> - <li <?= isset($menu) && $menu === 'projects' ? 'class="active"' : '' ?>> - <a href="?controller=project"><?= t('Projects') ?></a> - </li> - <?php if (Helper\is_admin()): ?> - <li <?= isset($menu) && $menu === 'users' ? 'class="active"' : '' ?>> - <a href="?controller=user"><?= t('Users') ?></a> - </li> - <li class="hide-tablet <?= isset($menu) && $menu === 'config' ? 'active' : '' ?>"> - <a href="?controller=config"><?= t('Settings') ?></a> - </li> - <?php endif ?> <li> - <a href="?controller=user&action=logout<?= Helper\param_csrf() ?>"><?= t('Logout') ?></a> - <span class="username">(<a href="?controller=user&action=show&user_id=<?= Helper\get_user_id() ?>"><?= Helper\escape(Helper\get_username()) ?></a>)</span> + <?= Helper\a(t('Logout'), 'user', 'logout', array(), true) ?> + <span class="username">(<?= Helper\a(Helper\escape(Helper\get_username()), 'user', 'show', array('user_id' => Helper\get_user_id())) ?>)</span> </li> </ul> </nav> diff --git a/app/Template/project_activity.php b/app/Template/project_activity.php index d07ba86a..d60dfb8f 100644 --- a/app/Template/project_activity.php +++ b/app/Template/project_activity.php @@ -1,11 +1,9 @@ <section id="main"> <div class="page-header"> - <h2><?= t('%s\'s activity', $project['name']) ?></h2> <ul> - <li><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('List of projects'), 'project', 'index') ?></li> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-search fa-fw"></i><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-check-square-o fa-fw"></i><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> </ul> </div> <section> diff --git a/app/Template/project_index.php b/app/Template/project_index.php index b575e958..6c04449e 100644 --- a/app/Template/project_index.php +++ b/app/Template/project_index.php @@ -1,11 +1,10 @@ <section id="main"> <div class="page-header"> - <h2><?= t('Projects') ?><span id="page-counter"> (<?= $nb_projects ?>)</span></h2> <ul> <?php if (Helper\is_admin()): ?> - <li><?= Helper\a(t('New project'), 'project', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New project'), 'project', 'create') ?></li> <?php endif ?> - <li><?= Helper\a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> + <li><i class="fa fa-lock fa-fw"></i><?= Helper\a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> </ul> </div> <section> diff --git a/app/Template/project_layout.php b/app/Template/project_layout.php index d69bbd53..3608df58 100644 --- a/app/Template/project_layout.php +++ b/app/Template/project_layout.php @@ -1,16 +1,15 @@ <section id="main"> <div class="page-header"> - <h2><?= t('Project "%s"', $project['name']) ?> (#<?= $project['id'] ?>)</h2> <ul> - <li><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('All projects'), 'project', 'index') ?></li> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-folder fa-fw"></i><?= Helper\a(t('All projects'), 'project', 'index') ?></li> </ul> </div> - <section class="project-show" id="project-section"> + <section class="sidebar-container" id="project-section"> <?= Helper\template('project_sidebar', array('project' => $project)) ?> - <div class="project-show-main"> + <div class="sidebar-content"> <?= $project_content_for_layout ?> </div> </section> diff --git a/app/Template/project_new.php b/app/Template/project_new.php index e1ea5af7..f3926a65 100644 --- a/app/Template/project_new.php +++ b/app/Template/project_new.php @@ -1,8 +1,7 @@ <section id="main"> <div class="page-header"> - <h2><?= empty($values['is_private']) ? t('New project') : t('New private project') ?></h2> <ul> - <li><?= Helper\a(t('All projects'), 'project', 'index') ?></li> + <li><i class="fa fa-folder fa-fw"></i><?= Helper\a(t('All projects'), 'project', 'index') ?></li> </ul> </div> <section> diff --git a/app/Template/project_search.php b/app/Template/project_search.php index 7d5d8795..d028a104 100644 --- a/app/Template/project_search.php +++ b/app/Template/project_search.php @@ -1,16 +1,9 @@ <section id="main"> <div class="page-header"> - <h2> - <?= t('Search in the project "%s"', $project['name']) ?> - <?php if (! empty($nb_tasks)): ?> - <span id="page-counter"> (<?= $nb_tasks ?>)</span> - <?php endif ?> - </h2> <ul> - <li><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> - <li><?= Helper\a(t('List of projects'), 'project', 'index') ?></li> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-check-square-o fa-fw"></i><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-dashboard fa-fw"></i><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> </ul> </div> <section> diff --git a/app/Template/project_sidebar.php b/app/Template/project_sidebar.php index 7bad1f0e..7d6e0bfb 100644 --- a/app/Template/project_sidebar.php +++ b/app/Template/project_sidebar.php @@ -1,49 +1,47 @@ -<div class="project-show-sidebar"> +<div class="sidebar"> <h2><?= t('Actions') ?></h2> - <div class="project-show-actions"> - <ul> - <li> - <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('Summary') ?></a> - </li> + <ul> + <li> + <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('Summary') ?></a> + </li> - <?php if (Helper\is_admin() || $project['is_private']): ?> - <li> - <a href="?controller=project&action=export&project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a> - </li> - <li> - <a href="?controller=project&action=share&project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a> - </li> - <li> - <a href="?controller=project&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a> - </li> - <li> - <a href="?controller=board&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a> - </li> - <li> - <a href="?controller=category&action=index&project_id=<?= $project['id'] ?>"><?= t('Category management') ?></a> - </li> - <?php if (Helper\is_admin()): ?> - <li> - <a href="?controller=project&action=users&project_id=<?= $project['id'] ?>"><?= t('User management') ?></a> - </li> - <?php endif ?> - <li> - <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a> - </li> - <li> - <a href="?controller=project&action=duplicate&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Duplicate') ?></a> - </li> - <li> - <?php if ($project['is_active']): ?> - <a href="?controller=project&action=disable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Disable') ?></a> - <?php else: ?> - <a href="?controller=project&action=enable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Enable') ?></a> - <?php endif ?> - </li> - <li> - <a href="?controller=project&action=remove&project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a> - </li> + <?php if (Helper\is_admin() || $project['is_private']): ?> + <li> + <a href="?controller=project&action=export&project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a> + </li> + <li> + <a href="?controller=project&action=share&project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a> + </li> + <li> + <a href="?controller=project&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a> + </li> + <li> + <a href="?controller=board&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a> + </li> + <li> + <a href="?controller=category&action=index&project_id=<?= $project['id'] ?>"><?= t('Category management') ?></a> + </li> + <?php if (Helper\is_admin()): ?> + <li> + <a href="?controller=project&action=users&project_id=<?= $project['id'] ?>"><?= t('User management') ?></a> + </li> + <?php endif ?> + <li> + <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a> + </li> + <li> + <a href="?controller=project&action=duplicate&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Duplicate') ?></a> + </li> + <li> + <?php if ($project['is_active']): ?> + <a href="?controller=project&action=disable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Disable') ?></a> + <?php else: ?> + <a href="?controller=project&action=enable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Enable') ?></a> <?php endif ?> - </ul> - </div> + </li> + <li> + <a href="?controller=project&action=remove&project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a> + </li> + <?php endif ?> + </ul> </div>
\ No newline at end of file diff --git a/app/Template/project_tasks.php b/app/Template/project_tasks.php index 7b6f2d9c..638e4c31 100644 --- a/app/Template/project_tasks.php +++ b/app/Template/project_tasks.php @@ -1,11 +1,9 @@ <section id="main"> <div class="page-header"> - <h2><?= t('Completed tasks for "%s"', $project['name']) ?><span id="page-counter"> (<?= $nb_tasks ?>)</span></h2> <ul> - <li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li> - <li><a href="?controller=project&action=search&project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li> - <li><a href="?controller=project&action=activity&project_id=<?= $project['id'] ?>"><?= t('Activity') ?></a></li> - <li><a href="?controller=project&action=index"><?= t('List of projects') ?></a></li> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-search fa-fw"></i><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-dashboard fa-fw"></i><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> </ul> </div> <section> diff --git a/app/Template/task_layout.php b/app/Template/task_layout.php index ca0a413f..0f8a6f2b 100644 --- a/app/Template/task_layout.php +++ b/app/Template/task_layout.php @@ -1,15 +1,14 @@ <section id="main"> <div class="page-header"> - <h2><?= Helper\escape($task['project_name']) ?> > <?= t('Task #%d', $task['id']) ?></h2> <ul> - <li><a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id'])) ?></li> </ul> </div> - <section class="task-show" id="task-section"> + <section class="sidebar-container" id="task-section"> <?= Helper\template('task_sidebar', array('task' => $task, 'hide_remove_menu' => isset($hide_remove_menu))) ?> - <div class="task-show-main"> + <div class="sidebar-content"> <?= $task_content_for_layout ?> </div> </section> diff --git a/app/Template/task_new.php b/app/Template/task_new.php index f8e14119..de24f6e1 100644 --- a/app/Template/task_new.php +++ b/app/Template/task_new.php @@ -1,9 +1,11 @@ <section id="main"> <div class="page-header"> - <h2><?= Helper\in_list($values['project_id'], $projects_list) ?> > <?= t('New task') ?></h2> + <ul> + <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $values['project_id'])) ?></li> + </ul> </div> <section id="task-section"> - <form method="post" action="<?= Helper\u('task', 'save') ?>" autocomplete="off"> + <form method="post" action="<?= Helper\u('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> <?= Helper\form_csrf() ?> diff --git a/app/Template/task_sidebar.php b/app/Template/task_sidebar.php index 4cffd5fa..ff47e988 100644 --- a/app/Template/task_sidebar.php +++ b/app/Template/task_sidebar.php @@ -1,26 +1,24 @@ -<div class="task-show-sidebar"> +<div class="sidebar"> <h2><?= t('Actions') ?></h2> - <div class="task-show-actions"> - <ul> - <li><a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('Summary') ?></a></li> - <li><a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>"><?= t('Edit the task') ?></a></li> - <li><a href="?controller=task&action=description&task_id=<?= $task['id'] ?>"><?= t('Edit the description') ?></a></li> - <li><a href="?controller=subtask&action=create&task_id=<?= $task['id'] ?>"><?= t('Add a sub-task') ?></a></li> - <li><a href="?controller=comment&action=create&task_id=<?= $task['id'] ?>"><?= t('Add a comment') ?></a></li> - <li><a href="?controller=file&action=create&task_id=<?= $task['id'] ?>"><?= t('Attach a document') ?></a></li> - <li><a href="?controller=task&action=duplicate&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li> - <li><a href="?controller=task&action=copy&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Duplicate to another project') ?></a></li> - <li><a href="?controller=task&action=move&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Move to another project') ?></a></li> - <li> - <?php if ($task['is_active'] == 1): ?> - <a href="?controller=task&action=close&task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a> - <?php else: ?> - <a href="?controller=task&action=open&task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a> - <?php endif ?> - </li> - <?php if (! $hide_remove_menu): ?> - <li><a href="?controller=task&action=remove&task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li> + <ul> + <li><a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('Summary') ?></a></li> + <li><a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>"><?= t('Edit the task') ?></a></li> + <li><a href="?controller=task&action=description&task_id=<?= $task['id'] ?>"><?= t('Edit the description') ?></a></li> + <li><a href="?controller=subtask&action=create&task_id=<?= $task['id'] ?>"><?= t('Add a sub-task') ?></a></li> + <li><a href="?controller=comment&action=create&task_id=<?= $task['id'] ?>"><?= t('Add a comment') ?></a></li> + <li><a href="?controller=file&action=create&task_id=<?= $task['id'] ?>"><?= t('Attach a document') ?></a></li> + <li><a href="?controller=task&action=duplicate&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li> + <li><a href="?controller=task&action=copy&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Duplicate to another project') ?></a></li> + <li><a href="?controller=task&action=move&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Move to another project') ?></a></li> + <li> + <?php if ($task['is_active'] == 1): ?> + <a href="?controller=task&action=close&task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a> + <?php else: ?> + <a href="?controller=task&action=open&task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a> <?php endif ?> - </ul> - </div> + </li> + <?php if (! $hide_remove_menu): ?> + <li><a href="?controller=task&action=remove&task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li> + <?php endif ?> + </ul> </div>
\ No newline at end of file diff --git a/app/Template/user_index.php b/app/Template/user_index.php index fc2b6307..73612b0b 100644 --- a/app/Template/user_index.php +++ b/app/Template/user_index.php @@ -1,9 +1,8 @@ <section id="main"> <div class="page-header"> - <h2><?= t('Users') ?><span id="page-counter"> (<?= $nb_users ?>)</span></h2> <?php if (Helper\is_admin()): ?> <ul> - <li><?= Helper\a(t('New user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New user'), 'user', 'create') ?></li> </ul> <?php endif ?> </div> @@ -53,10 +52,10 @@ <td> <ul class="no-bullet"> <?php if ($user['google_id']): ?> - <li><i class="fa fa-google"></i> <?= t('Google account linked') ?></li> + <li><i class="fa fa-google fa-fw"></i><?= t('Google account linked') ?></li> <?php endif ?> <?php if ($user['github_id']): ?> - <li><i class="fa fa-github"></i> <?= t('Github account linked') ?></li> + <li><i class="fa fa-github fa-fw"></i><?= t('Github account linked') ?></li> <?php endif ?> </ul> </td> diff --git a/app/Template/user_layout.php b/app/Template/user_layout.php index 7462b3f0..1fbc1ea0 100644 --- a/app/Template/user_layout.php +++ b/app/Template/user_layout.php @@ -1,18 +1,17 @@ <section id="main"> <div class="page-header"> - <h2><?= Helper\escape($user['name'] ?: $user['username']).' (#'.$user['id'].')' ?></h2> <?php if (Helper\is_admin()): ?> <ul> - <li><a href="?controller=user&action=index"><?= t('All users') ?></a></li> - <li><a href="?controller=user&action=create"><?= t('New user') ?></a></li> + <li><i class="fa fa-user fa-fw"></i><?= Helper\a(t('All users'), 'user', 'index') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New user'), 'user', 'create') ?></li> </ul> <?php endif ?> </div> - <section class="user-show" id="user-section"> + <section class="sidebar-container" id="user-section"> <?= Helper\template('user_sidebar', array('user' => $user)) ?> - <div class="user-show-main"> + <div class="sidebar-content"> <?= $user_content_for_layout ?> </div> </section> diff --git a/app/Template/user_new.php b/app/Template/user_new.php index 158813cb..1e483ade 100644 --- a/app/Template/user_new.php +++ b/app/Template/user_new.php @@ -1,12 +1,11 @@ <section id="main"> <div class="page-header"> - <h2><?= t('New user') ?></h2> <ul> - <li><a href="?controller=user"><?= t('All users') ?></a></li> + <li><i class="fa fa-user fa-fw"></i><?= Helper\a(t('All users'), 'user', 'index') ?></li> </ul> </div> <section> - <form method="post" action="?controller=user&action=save" autocomplete="off"> + <form method="post" action="<?= Helper\u('user', 'save') ?>" autocomplete="off"> <?= Helper\form_csrf() ?> @@ -32,7 +31,7 @@ <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=user"><?= t('cancel') ?></a> + <?= t('or') ?> <?= Helper\a(t('cancel'), 'user', 'index') ?> </div> </form> </section> diff --git a/app/Template/user_sidebar.php b/app/Template/user_sidebar.php index 9d8f8b46..16532143 100644 --- a/app/Template/user_sidebar.php +++ b/app/Template/user_sidebar.php @@ -1,42 +1,39 @@ -<div class="project-show-sidebar"> +<div class="sidebar"> <h2><?= t('Actions') ?></h2> - <div class="user-show-actions"> - <ul> - <li> - <a href="?controller=user&action=show&user_id=<?= $user['id'] ?>"><?= t('Summary') ?></a> - </li> + <ul> + <li> + <?= Helper\a(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?> + </li> - <?php if (Helper\is_admin() || Helper\is_current_user($user['id'])): ?> + <?php if (Helper\is_admin() || Helper\is_current_user($user['id'])): ?> <li> - <a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('Edit profile') ?></a> + <?= Helper\a(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?> </li> <?php if ($user['is_ldap_user'] == 0): ?> - <li> - <a href="?controller=user&action=password&user_id=<?= $user['id'] ?>"><?= t('Change password') ?></a> - </li> + <li> + <?= Helper\a(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?> + </li> <?php endif ?> <li> - <a href="?controller=user&action=notifications&user_id=<?= $user['id'] ?>"><?= t('Email notifications') ?></a> + <?= Helper\a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?> </li> <li> - <a href="?controller=user&action=external&user_id=<?= $user['id'] ?>"><?= t('External accounts') ?></a> + <?= Helper\a(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?> </li> <li> - <a href="?controller=user&action=last&user_id=<?= $user['id'] ?>"><?= t('Last logins') ?></a> + <?= Helper\a(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?> </li> <li> - <a href="?controller=user&action=sessions&user_id=<?= $user['id'] ?>"><?= t('Persistent connections') ?></a> + <?= Helper\a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?> </li> - <?php endif ?> + <?php endif ?> - <?php if (Helper\is_admin()): ?> + <?php if (Helper\is_admin()): ?> <li> - <a href="?controller=user&action=remove&user_id=<?= $user['id'] ?>"><?= t('Remove') ?></a> + <?= Helper\a(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?> </li> - <?php endif ?> - - </ul> - </div> + <?php endif ?> + </ul> </div>
\ No newline at end of file |