summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-02 15:06:41 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-02 15:06:41 -0500
commit37332ae2222706f8fb330dae780dc938512edcf5 (patch)
tree9161d539cc289179339162d6922c4d9dd2c30e63 /app
parent8fe5df39d97ef851d11931fcf7e906ec08838ef7 (diff)
Change layout (experimental)
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Action.php4
-rw-r--r--app/Controller/App.php1
-rw-r--r--app/Controller/Base.php5
-rw-r--r--app/Controller/Board.php7
-rw-r--r--app/Controller/Category.php5
-rw-r--r--app/Controller/Comment.php6
-rw-r--r--app/Controller/Config.php12
-rw-r--r--app/Controller/File.php4
-rw-r--r--app/Controller/Project.php19
-rw-r--r--app/Controller/Subtask.php10
-rw-r--r--app/Controller/Task.php43
-rw-r--r--app/Controller/User.php10
-rw-r--r--app/Locale/da_DK/translations.php3
-rw-r--r--app/Locale/de_DE/translations.php3
-rw-r--r--app/Locale/es_ES/translations.php3
-rw-r--r--app/Locale/fi_FI/translations.php3
-rw-r--r--app/Locale/fr_FR/translations.php3
-rw-r--r--app/Locale/it_IT/translations.php3
-rw-r--r--app/Locale/ja_JP/translations.php3
-rw-r--r--app/Locale/pl_PL/translations.php3
-rw-r--r--app/Locale/pt_BR/translations.php3
-rw-r--r--app/Locale/ru_RU/translations.php3
-rw-r--r--app/Locale/sv_SE/translations.php3
-rw-r--r--app/Locale/th_TH/translations.php3
-rw-r--r--app/Locale/zh_CN/translations.php3
-rw-r--r--app/Template/app_index.php12
-rw-r--r--app/Template/board_index.php24
-rw-r--r--app/Template/board_show.php14
-rw-r--r--app/Template/config_layout.php7
-rw-r--r--app/Template/config_sidebar.php38
-rw-r--r--app/Template/layout.php35
-rw-r--r--app/Template/project_activity.php8
-rw-r--r--app/Template/project_index.php5
-rw-r--r--app/Template/project_layout.php9
-rw-r--r--app/Template/project_new.php3
-rw-r--r--app/Template/project_search.php13
-rw-r--r--app/Template/project_sidebar.php88
-rw-r--r--app/Template/project_tasks.php8
-rw-r--r--app/Template/task_layout.php7
-rw-r--r--app/Template/task_new.php6
-rw-r--r--app/Template/task_sidebar.php44
-rw-r--r--app/Template/user_index.php7
-rw-r--r--app/Template/user_layout.php9
-rw-r--r--app/Template/user_new.php7
-rw-r--r--app/Template/user_sidebar.php41
-rw-r--r--app/helpers.php5
46 files changed, 244 insertions, 311 deletions
diff --git a/app/Controller/Action.php b/app/Controller/Action.php
index 714c87f3..63f72e1f 100644
--- a/app/Controller/Action.php
+++ b/app/Controller/Action.php
@@ -31,7 +31,6 @@ class Action extends Base
'projects_list' => $this->project->getList(false),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($project['id']),
- 'menu' => 'projects',
'title' => t('Automatic actions')
)));
}
@@ -54,7 +53,6 @@ class Action extends Base
'values' => $values,
'project' => $project,
'events' => $this->action->getCompatibleEvents($values['action_name']),
- 'menu' => 'projects',
'title' => t('Automatic actions')
)));
}
@@ -92,7 +90,6 @@ class Action extends Base
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($project['id']),
'project' => $project,
- 'menu' => 'projects',
'title' => t('Automatic actions')
)));
}
@@ -145,7 +142,6 @@ class Action extends Base
'available_events' => $this->action->getAvailableEvents(),
'available_actions' => $this->action->getAvailableActions(),
'project' => $project,
- 'menu' => 'projects',
'title' => t('Remove an action')
)));
}
diff --git a/app/Controller/App.php b/app/Controller/App.php
index feec4221..193c2583 100644
--- a/app/Controller/App.php
+++ b/app/Controller/App.php
@@ -26,7 +26,6 @@ class App extends Base
'board_selector' => $projects,
'events' => $this->projectActivity->getProjects(array_keys($projects), 10),
'tasks' => $this->taskFinder->getAllTasksByUser($user_id),
- 'menu' => 'dashboard',
'title' => t('Dashboard'),
)));
}
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index a8e22fd8..c0483aa1 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -245,6 +245,8 @@ abstract class Base
$content = $this->template->load($template, $params);
$params['task_content_for_layout'] = $content;
+ $params['title'] = $params['task']['project_name'].' &gt; '.$params['task']['title'];
+ $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());
return $this->template->layout('task_layout', $params);
}
@@ -261,7 +263,8 @@ abstract class Base
{
$content = $this->template->load($template, $params);
$params['project_content_for_layout'] = $content;
- $params['menu'] = 'projects';
+ $params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'].' &gt; '.$params['title'];
+ $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());
return $this->template->layout('project_layout', $params);
}
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index d49ad021..0cd8f169 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -59,7 +59,6 @@ class Board extends Base
else {
$this->response->html($this->template->layout('board_assignee', $params + array(
- 'menu' => 'boards',
'title' => t('Change assignee').' - '.$task['title'],
)));
}
@@ -113,7 +112,6 @@ class Board extends Base
else {
$this->response->html($this->template->layout('board_category', $params + array(
- 'menu' => 'boards',
'title' => t('Change category').' - '.$task['title'],
)));
}
@@ -222,7 +220,6 @@ class Board extends Base
'current_project_name' => $project['name'],
'board' => $this->board->get($project['id']),
'categories' => $this->category->getList($project['id'], true, true),
- 'menu' => 'boards',
'title' => $project['name'],
'board_selector' => $board_selector,
'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'),
@@ -251,7 +248,6 @@ class Board extends Base
'values' => $values + array('project_id' => $project['id']),
'columns' => $columns,
'project' => $project,
- 'menu' => 'projects',
'title' => t('Edit board')
)));
}
@@ -292,7 +288,6 @@ class Board extends Base
'values' => $values + array('project_id' => $project['id']),
'columns' => $columns,
'project' => $project,
- 'menu' => 'projects',
'title' => t('Edit board')
)));
}
@@ -331,7 +326,6 @@ class Board extends Base
'values' => $values + $data,
'columns' => $columns,
'project' => $project,
- 'menu' => 'projects',
'title' => t('Edit board')
)));
}
@@ -362,7 +356,6 @@ class Board extends Base
$this->response->html($this->projectLayout('board_remove', array(
'column' => $this->board->getColumn($this->request->getIntegerParam('column_id')),
'project' => $project,
- 'menu' => 'projects',
'title' => t('Remove a column from a board')
)));
}
diff --git a/app/Controller/Category.php b/app/Controller/Category.php
index 38322294..4a0128f3 100644
--- a/app/Controller/Category.php
+++ b/app/Controller/Category.php
@@ -43,7 +43,6 @@ class Category extends Base
'values' => array('project_id' => $project['id']),
'errors' => array(),
'project' => $project,
- 'menu' => 'projects',
'title' => t('Categories')
)));
}
@@ -76,7 +75,6 @@ class Category extends Base
'values' => $values,
'errors' => $errors,
'project' => $project,
- 'menu' => 'projects',
'title' => t('Categories')
)));
}
@@ -95,7 +93,6 @@ class Category extends Base
'values' => $category,
'errors' => array(),
'project' => $project,
- 'menu' => 'projects',
'title' => t('Categories')
)));
}
@@ -127,7 +124,6 @@ class Category extends Base
'values' => $values,
'errors' => $errors,
'project' => $project,
- 'menu' => 'projects',
'title' => t('Categories')
)));
}
@@ -145,7 +141,6 @@ class Category extends Base
$this->response->html($this->projectLayout('category_remove', array(
'project' => $project,
'category' => $category,
- 'menu' => 'projects',
'title' => t('Remove a category')
)));
}
diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php
index a9032ed8..efa7e066 100644
--- a/app/Controller/Comment.php
+++ b/app/Controller/Comment.php
@@ -26,7 +26,6 @@ class Comment extends Base
if (! $this->acl->isAdminUser() && $comment['user_id'] != $this->acl->getUserId()) {
$this->response->html($this->template->layout('comment_forbidden', array(
- 'menu' => 'tasks',
'title' => t('Access Forbidden')
)));
}
@@ -50,7 +49,6 @@ class Comment extends Base
),
'errors' => array(),
'task' => $task,
- 'menu' => 'tasks',
'title' => t('Add a comment')
)));
}
@@ -83,7 +81,6 @@ class Comment extends Base
'values' => $values,
'errors' => $errors,
'task' => $task,
- 'menu' => 'tasks',
'title' => t('Add a comment')
)));
}
@@ -103,7 +100,6 @@ class Comment extends Base
'errors' => array(),
'comment' => $comment,
'task' => $task,
- 'menu' => 'tasks',
'title' => t('Edit a comment')
)));
}
@@ -138,7 +134,6 @@ class Comment extends Base
'errors' => $errors,
'comment' => $comment,
'task' => $task,
- 'menu' => 'tasks',
'title' => t('Edit a comment')
)));
}
@@ -156,7 +151,6 @@ class Comment extends Base
$this->response->html($this->taskLayout('comment_remove', array(
'comment' => $comment,
'task' => $task,
- 'menu' => 'tasks',
'title' => t('Remove a comment')
)));
}
diff --git a/app/Controller/Config.php b/app/Controller/Config.php
index 7c8373c3..3e0b290b 100644
--- a/app/Controller/Config.php
+++ b/app/Controller/Config.php
@@ -20,9 +20,9 @@ class Config extends Base
*/
private function layout($template, array $params)
{
+ $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());
$params['values'] = $this->config->getAll();
$params['errors'] = array();
- $params['menu'] = 'config';
$params['config_content_for_layout'] = $this->template->load($template, $params);
return $this->template->layout('config_layout', $params);
@@ -61,7 +61,7 @@ class Config extends Base
{
$this->response->html($this->layout('config_about', array(
'db_size' => $this->config->getDatabaseSize(),
- 'title' => t('About'),
+ 'title' => t('Settings').' &gt; '.t('About'),
)));
}
@@ -75,10 +75,10 @@ class Config extends Base
$this->common('application');
$this->response->html($this->layout('config_application', array(
- 'title' => t('Application settings'),
'languages' => $this->config->getLanguages(),
'timezones' => $this->config->getTimezones(),
'date_formats' => $this->dateParser->getAvailableFormats(),
+ 'title' => t('Settings').' &gt; '.t('Application settings'),
)));
}
@@ -92,8 +92,8 @@ class Config extends Base
$this->common('board');
$this->response->html($this->layout('config_board', array(
- 'title' => t('Board settings'),
'default_columns' => implode(', ', $this->board->getDefaultColumns()),
+ 'title' => t('Settings').' &gt; '.t('Board settings'),
)));
}
@@ -107,7 +107,7 @@ class Config extends Base
$this->common('webhook');
$this->response->html($this->layout('config_webhook', array(
- 'title' => t('Webhook settings'),
+ 'title' => t('Settings').' &gt; '.t('Webhook settings'),
)));
}
@@ -119,7 +119,7 @@ class Config extends Base
public function api()
{
$this->response->html($this->layout('config_api', array(
- 'title' => t('API'),
+ 'title' => t('Settings').' &gt; '.t('API'),
)));
}
diff --git a/app/Controller/File.php b/app/Controller/File.php
index 3c8c32d1..24db7565 100644
--- a/app/Controller/File.php
+++ b/app/Controller/File.php
@@ -23,9 +23,7 @@ class File extends Base
$this->response->html($this->taskLayout('file_new', array(
'task' => $task,
- 'menu' => 'tasks',
'max_size' => ini_get('upload_max_filesize'),
- 'title' => t('Attach a document')
)));
}
@@ -137,8 +135,6 @@ class File extends Base
$this->response->html($this->taskLayout('file_remove', array(
'task' => $task,
'file' => $file,
- 'menu' => 'tasks',
- 'title' => t('Remove a file')
)));
}
}
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index c5f16496..becdd135 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -34,10 +34,10 @@ class Project extends Base
}
$this->response->html($this->template->layout('project_index', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'active_projects' => $active_projects,
'inactive_projects' => $inactive_projects,
'nb_projects' => $nb_projects,
- 'menu' => 'projects',
'title' => t('Projects').' ('.$nb_projects.')'
)));
}
@@ -405,7 +405,6 @@ class Project extends Base
$this->response->html($this->template->layout('project_activity', array(
'events' => $this->projectActivity->getProject($project['id']),
- 'menu' => 'projects',
'project' => $project,
'title' => t('%s\'s activity', $project['name'])
)));
@@ -452,10 +451,9 @@ class Project extends Base
'project_id' => $project['id'],
),
'project' => $project,
- 'menu' => 'projects',
'columns' => $this->board->getColumnsList($project['id']),
'categories' => $this->category->getList($project['id'], false),
- 'title' => $project['name'].($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '')
+ 'title' => t('Search in the project "%s"', $project['name']).($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '')
)));
}
@@ -487,12 +485,11 @@ class Project extends Base
'limit' => $limit,
),
'project' => $project,
- 'menu' => 'projects',
'columns' => $this->board->getColumnsList($project['id']),
'categories' => $this->category->getList($project['id'], false),
'tasks' => $tasks,
'nb_tasks' => $nb_tasks,
- 'title' => $project['name'].' ('.$nb_tasks.')'
+ 'title' => t('Completed tasks for "%s"', $project['name']).' ('.$nb_tasks.')'
)));
}
@@ -503,12 +500,15 @@ class Project extends Base
*/
public function create()
{
+ $is_private = $this->request->getIntegerParam('private', $this->acl->isRegularUser());
+
$this->response->html($this->template->layout('project_new', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'errors' => array(),
'values' => array(
- 'is_private' => $this->request->getIntegerParam('private', $this->acl->isRegularUser()),
+ 'is_private' => $is_private,
),
- 'title' => t('New project')
+ 'title' => $is_private ? t('New private project') : t('New project'),
)));
}
@@ -534,9 +534,10 @@ class Project extends Base
}
$this->response->html($this->template->layout('project_new', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'errors' => $errors,
'values' => $values,
- 'title' => t('New Project')
+ 'title' => ! empty($values['is_private']) ? t('New private project') : t('New project'),
)));
}
}
diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php
index 48f0d6e2..5db7471a 100644
--- a/app/Controller/Subtask.php
+++ b/app/Controller/Subtask.php
@@ -44,8 +44,6 @@ class Subtask extends Base
'errors' => array(),
'users_list' => $this->projectPermission->getUsersList($task['project_id']),
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Add a sub-task')
)));
}
@@ -82,8 +80,6 @@ class Subtask extends Base
'errors' => $errors,
'users_list' => $this->projectPermission->getUsersList($task['project_id']),
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Add a sub-task')
)));
}
@@ -104,8 +100,6 @@ class Subtask extends Base
'status_list' => $this->subTask->getStatusList(),
'subtask' => $subtask,
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Edit a sub-task')
)));
}
@@ -141,8 +135,6 @@ class Subtask extends Base
'status_list' => $this->subTask->getStatusList(),
'subtask' => $subtask,
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Edit a sub-task')
)));
}
@@ -159,8 +151,6 @@ class Subtask extends Base
$this->response->html($this->taskLayout('subtask_remove', array(
'subtask' => $subtask,
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Remove a sub-task')
)));
}
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index 1b20cf15..70fda556 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -77,8 +77,7 @@ class Task extends Base
'colors_list' => $this->color->getList(),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
- 'menu' => 'tasks',
- 'title' => $task['title'],
+ 'title' => $task['project_name'].' &gt; '.$task['title'],
)));
}
@@ -89,27 +88,25 @@ class Task extends Base
*/
public function create()
{
- $project_id = $this->request->getIntegerParam('project_id');
- $this->checkProjectPermissions($project_id);
+ $project = $this->getProject();
$this->response->html($this->template->layout('task_new', array(
'errors' => array(),
'values' => array(
- 'project_id' => $project_id,
+ 'project_id' => $project['id'],
'column_id' => $this->request->getIntegerParam('column_id'),
'color_id' => $this->request->getStringParam('color_id'),
'owner_id' => $this->request->getIntegerParam('owner_id'),
'another_task' => $this->request->getIntegerParam('another_task'),
),
'projects_list' => $this->project->getListByStatus(ProjectModel::ACTIVE),
- 'columns_list' => $this->board->getColumnsList($project_id),
- 'users_list' => $this->projectPermission->getUsersList($project_id),
+ 'columns_list' => $this->board->getColumnsList($project['id']),
+ 'users_list' => $this->projectPermission->getUsersList($project['id']),
'colors_list' => $this->color->getList(),
- 'categories_list' => $this->category->getList($project_id),
+ 'categories_list' => $this->category->getList($project['id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
- 'menu' => 'tasks',
- 'title' => t('New task')
+ 'title' => $project['name'].' &gt; '.t('New task')
)));
}
@@ -120,6 +117,7 @@ class Task extends Base
*/
public function save()
{
+ $project = $this->getProject();
$values = $this->request->getValues();
$values['creator_id'] = $this->acl->getUserId();
@@ -150,14 +148,13 @@ class Task extends Base
'errors' => $errors,
'values' => $values,
'projects_list' => $this->project->getListByStatus(ProjectModel::ACTIVE),
- 'columns_list' => $this->board->getColumnsList($values['project_id']),
- 'users_list' => $this->projectPermission->getUsersList($values['project_id']),
+ 'columns_list' => $this->board->getColumnsList($project['id']),
+ 'users_list' => $this->projectPermission->getUsersList($project['id']),
'colors_list' => $this->color->getList(),
- 'categories_list' => $this->category->getList($values['project_id']),
+ 'categories_list' => $this->category->getList($project['id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
- 'menu' => 'tasks',
- 'title' => t('New task')
+ 'title' => $project['name'].' &gt; '.t('New task')
)));
}
@@ -183,8 +180,6 @@ class Task extends Base
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'ajax' => $ajax,
- 'menu' => 'tasks',
- 'title' => t('Edit a task')
);
if ($ajax) {
@@ -234,8 +229,6 @@ class Task extends Base
'categories_list' => $this->category->getList($values['project_id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
- 'menu' => 'tasks',
- 'title' => t('Edit a task'),
'ajax' => $this->request->isAjax(),
)));
}
@@ -286,8 +279,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_close', array(
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Close a task')
)));
}
@@ -315,8 +306,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_open', array(
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Open a task')
)));
}
@@ -348,8 +337,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_remove', array(
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Remove a task')
)));
}
@@ -378,8 +365,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_duplicate', array(
'task' => $task,
- 'menu' => 'tasks',
- 'title' => t('Duplicate a task')
)));
}
@@ -426,8 +411,6 @@ class Task extends Base
'errors' => $errors,
'task' => $task,
'ajax' => $ajax,
- 'menu' => 'tasks',
- 'title' => t('Edit the description'),
);
if ($ajax) {
@@ -494,8 +477,6 @@ class Task extends Base
'errors' => $errors,
'task' => $task,
'projects_list' => $projects_list,
- 'menu' => 'tasks',
- 'title' => t(ucfirst($action).' the task to another project')
)));
}
}
diff --git a/app/Controller/User.php b/app/Controller/User.php
index e757fa84..0a4d66f2 100644
--- a/app/Controller/User.php
+++ b/app/Controller/User.php
@@ -84,10 +84,10 @@ class User extends Base
{
$content = $this->template->load($template, $params);
$params['user_content_for_layout'] = $content;
- $params['menu'] = 'users';
+ $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());
if (isset($params['user'])) {
- $params['title'] = $params['user']['name'] ?: $params['user']['username'];
+ $params['title'] = ($params['user']['name'] ?: $params['user']['username']).' (#'.$params['user']['id'].')';
}
return $this->template->layout('user_layout', $params);
@@ -131,10 +131,10 @@ class User extends Base
$this->response->html(
$this->template->layout('user_index', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'projects' => $this->project->getList(),
'nb_users' => $nb_users,
'users' => $users,
- 'menu' => 'users',
'title' => t('Users').' ('.$nb_users.')',
'pagination' => array(
'controller' => 'user',
@@ -157,10 +157,10 @@ class User extends Base
public function create()
{
$this->response->html($this->template->layout('user_new', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'projects' => $this->project->getList(),
'errors' => array(),
'values' => array(),
- 'menu' => 'users',
'title' => t('New user')
)));
}
@@ -187,10 +187,10 @@ class User extends Base
}
$this->response->html($this->template->layout('user_new', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),
'projects' => $this->project->getList(),
'errors' => $errors,
'values' => $values,
- 'menu' => 'users',
'title' => t('New user')
)));
}
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php
index 5c8fb07f..6a403bbe 100644
--- a/app/Locale/da_DK/translations.php
+++ b/app/Locale/da_DK/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Kompleksitet',
'limit' => 'Begrænsning',
'Task limit' => 'Opgave begrænsning',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Denne værdi skal være større end %d',
'Edit project access list' => 'Rediger adgangstilladelser for projektet',
'Edit users access' => 'Rediger brugertilladelser',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 74463480..4afd7180 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Komplexität',
'limit' => 'Limit',
'Task limit' => 'Maximale Anzahl von Aufgaben',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Dieser Wert muss größer sein als %d',
'Edit project access list' => 'Zugriffsberechtigungen des Projektes bearbeiten',
'Edit users access' => 'Benutzerzugriff ändern',
@@ -558,4 +559,6 @@ return array(
'Help on Github webhook' => 'Hilfe bei einem Github Webhook',
'Create a comment from an external provider' => 'Kommentar eines externen Providers hinzufügen',
'Github issue comment created' => 'Github Fehler Kommentar hinzugefügt',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php
index 479983e7..ed8ea5b1 100644
--- a/app/Locale/es_ES/translations.php
+++ b/app/Locale/es_ES/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Complejidad',
'limit' => 'límite',
'Task limit' => 'Número máximo de tareas',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Este valor no debe de ser más grande que %d',
'Edit project access list' => 'Editar los permisos del proyecto',
'Edit users access' => 'Editar los permisos de usuario',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php
index 78a7c84e..33f3629b 100644
--- a/app/Locale/fi_FI/translations.php
+++ b/app/Locale/fi_FI/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Monimutkaisuus',
'limit' => 'raja',
'Task limit' => 'Tehtävien maksimimäärä',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Arvon täytyy olla suurempi kuin %d',
'Edit project access list' => 'Muuta projektin käyttäjiä',
'Edit users access' => 'Muuta käyttäjien pääsyä',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 5f7e7935..42c03288 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Complexité',
'limit' => 'limite',
'Task limit' => 'Nombre maximum de tâches',
+ 'Task count' => 'Nombre de tâches',
'This value must be greater than %d' => 'Cette valeur doit être plus grande que %d',
'Edit project access list' => 'Modifier l\'accès au projet',
'Edit users access' => 'Modifier les utilisateurs autorisés',
@@ -558,4 +559,6 @@ return array(
'Help on Github webhook' => 'Aide sur les webhooks Github',
'Create a comment from an external provider' => 'Créer un commentaire depuis un fournisseur externe',
'Github issue comment created' => 'Commentaire créé sur un ticket Github',
+ 'Configure' => 'Configurer',
+ 'Project management' => 'Gestion des projets',
);
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index e0b2b895..c3613e81 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -187,6 +187,7 @@ return array(
// 'Complexity' => '',
'limit' => 'limite',
'Task limit' => 'Numero massimo di compiti',
+ // 'Task count' => '',
'This value must be greater than %d' => 'questo valore deve essere maggiore di %d',
'Edit project access list' => 'Modificare i permessi del progetto',
'Edit users access' => 'Modificare i permessi degli utenti',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php
index 440c1e8a..02ca8364 100644
--- a/app/Locale/ja_JP/translations.php
+++ b/app/Locale/ja_JP/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => '複雑さ',
'limit' => '制限',
'Task limit' => 'タスク数制限',
+ // 'Task count' => '',
'This value must be greater than %d' => '%d より大きな値を入力してください',
'Edit project access list' => 'プロジェクトのアクセス許可を変更',
'Edit users access' => 'ユーザのアクセス許可を変更',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php
index a294de75..2637a3a6 100644
--- a/app/Locale/pl_PL/translations.php
+++ b/app/Locale/pl_PL/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Poziom trudności',
'limit' => 'limit',
'Task limit' => 'Limit zadań',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Wartość musi być większa niż %d',
'Edit project access list' => 'Edycja list dostępu dla projektu',
'Edit users access' => 'Edytuj dostęp',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php
index 6986e785..b3780815 100644
--- a/app/Locale/pt_BR/translations.php
+++ b/app/Locale/pt_BR/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Complexidade',
'limit' => 'limite',
'Task limit' => 'Limite da tarefa',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Este valor deve ser maior que %d',
'Edit project access list' => 'Editar lista de acesso ao projeto',
'Edit users access' => 'Editar acesso de usuários',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index ae752520..b6bf887b 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Сложность',
'limit' => 'лимит',
'Task limit' => 'Лимит задач',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Это значение должно быть больше %d',
'Edit project access list' => 'Изменить доступ к проекту',
'Edit users access' => 'Изменить доступ пользователей',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php
index d3a1c5ed..8767e914 100644
--- a/app/Locale/sv_SE/translations.php
+++ b/app/Locale/sv_SE/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'Ungefärligt antal timmar',
'limit' => 'max',
'Task limit' => 'Uppgiftsbegränsning',
+ // 'Task count' => '',
'This value must be greater than %d' => 'Värdet måste vara större än %d',
'Edit project access list' => 'Ändra projektåtkomst lista',
'Edit users access' => 'Användaråtkomst',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php
index 65ea09ba..d92a7af7 100644
--- a/app/Locale/th_TH/translations.php
+++ b/app/Locale/th_TH/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => 'ความซับซ้อน',
'limit' => 'จำกัด',
'Task limit' => 'จำกัดงาน',
+ // 'Task count' => '',
'This value must be greater than %d' => 'ค่าต้องมากกว่า %d',
'Edit project access list' => 'แก้ไขการเข้าถึงรายชื่อโปรเจค',
'Edit users access' => 'แก้ไขการเข้าถึงผู้ใช้',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php
index 11f45f7d..1464d050 100644
--- a/app/Locale/zh_CN/translations.php
+++ b/app/Locale/zh_CN/translations.php
@@ -187,6 +187,7 @@ return array(
'Complexity' => '复杂度',
'limit' => '限制',
'Task limit' => '任务限制',
+ // 'Task count' => '',
'This value must be greater than %d' => '该数值必须大于%d',
'Edit project access list' => '编辑项目存取列表',
'Edit users access' => '编辑用户存取权限',
@@ -558,4 +559,6 @@ return array(
// 'Help on Github webhook' => '',
// 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
+ // 'Configure' => '',
+ // 'Project management' => '',
);
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&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;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&amp;action=logout<?= Helper\param_csrf() ?>"><?= t('Logout') ?></a>
- <span class="username">(<a href="?controller=user&amp;action=show&amp;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&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Summary') ?></a>
- </li>
+ <ul>
+ <li>
+ <a href="?controller=project&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Summary') ?></a>
+ </li>
- <?php if (Helper\is_admin() || $project['is_private']): ?>
- <li>
- <a href="?controller=project&amp;action=export&amp;project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a>
- </li>
- <li>
- <a href="?controller=project&amp;action=share&amp;project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a>
- </li>
- <li>
- <a href="?controller=project&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a>
- </li>
- <li>
- <a href="?controller=board&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a>
- </li>
- <li>
- <a href="?controller=category&amp;action=index&amp;project_id=<?= $project['id'] ?>"><?= t('Category management') ?></a>
- </li>
- <?php if (Helper\is_admin()): ?>
- <li>
- <a href="?controller=project&amp;action=users&amp;project_id=<?= $project['id'] ?>"><?= t('User management') ?></a>
- </li>
- <?php endif ?>
- <li>
- <a href="?controller=action&amp;action=index&amp;project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a>
- </li>
- <li>
- <a href="?controller=project&amp;action=duplicate&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Duplicate') ?></a>
- </li>
- <li>
- <?php if ($project['is_active']): ?>
- <a href="?controller=project&amp;action=disable&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Disable') ?></a>
- <?php else: ?>
- <a href="?controller=project&amp;action=enable&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Enable') ?></a>
- <?php endif ?>
- </li>
- <li>
- <a href="?controller=project&amp;action=remove&amp;project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a>
- </li>
+ <?php if (Helper\is_admin() || $project['is_private']): ?>
+ <li>
+ <a href="?controller=project&amp;action=export&amp;project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a>
+ </li>
+ <li>
+ <a href="?controller=project&amp;action=share&amp;project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a>
+ </li>
+ <li>
+ <a href="?controller=project&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a>
+ </li>
+ <li>
+ <a href="?controller=board&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a>
+ </li>
+ <li>
+ <a href="?controller=category&amp;action=index&amp;project_id=<?= $project['id'] ?>"><?= t('Category management') ?></a>
+ </li>
+ <?php if (Helper\is_admin()): ?>
+ <li>
+ <a href="?controller=project&amp;action=users&amp;project_id=<?= $project['id'] ?>"><?= t('User management') ?></a>
+ </li>
+ <?php endif ?>
+ <li>
+ <a href="?controller=action&amp;action=index&amp;project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a>
+ </li>
+ <li>
+ <a href="?controller=project&amp;action=duplicate&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Duplicate') ?></a>
+ </li>
+ <li>
+ <?php if ($project['is_active']): ?>
+ <a href="?controller=project&amp;action=disable&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Disable') ?></a>
+ <?php else: ?>
+ <a href="?controller=project&amp;action=enable&amp;project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Enable') ?></a>
<?php endif ?>
- </ul>
- </div>
+ </li>
+ <li>
+ <a href="?controller=project&amp;action=remove&amp;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&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
- <li><a href="?controller=project&amp;action=search&amp;project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li>
- <li><a href="?controller=project&amp;action=activity&amp;project_id=<?= $project['id'] ?>"><?= t('Activity') ?></a></li>
- <li><a href="?controller=project&amp;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']) ?> &gt; <?= t('Task #%d', $task['id']) ?></h2>
<ul>
- <li><a href="?controller=board&amp;action=show&amp;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) ?> &gt; <?= 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&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('Summary') ?></a></li>
- <li><a href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>"><?= t('Edit the task') ?></a></li>
- <li><a href="?controller=task&amp;action=description&amp;task_id=<?= $task['id'] ?>"><?= t('Edit the description') ?></a></li>
- <li><a href="?controller=subtask&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Add a sub-task') ?></a></li>
- <li><a href="?controller=comment&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Add a comment') ?></a></li>
- <li><a href="?controller=file&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Attach a document') ?></a></li>
- <li><a href="?controller=task&amp;action=duplicate&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li>
- <li><a href="?controller=task&amp;action=copy&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Duplicate to another project') ?></a></li>
- <li><a href="?controller=task&amp;action=move&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Move to another project') ?></a></li>
- <li>
- <?php if ($task['is_active'] == 1): ?>
- <a href="?controller=task&amp;action=close&amp;task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a>
- <?php else: ?>
- <a href="?controller=task&amp;action=open&amp;task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a>
- <?php endif ?>
- </li>
- <?php if (! $hide_remove_menu): ?>
- <li><a href="?controller=task&amp;action=remove&amp;task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li>
+ <ul>
+ <li><a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('Summary') ?></a></li>
+ <li><a href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>"><?= t('Edit the task') ?></a></li>
+ <li><a href="?controller=task&amp;action=description&amp;task_id=<?= $task['id'] ?>"><?= t('Edit the description') ?></a></li>
+ <li><a href="?controller=subtask&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Add a sub-task') ?></a></li>
+ <li><a href="?controller=comment&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Add a comment') ?></a></li>
+ <li><a href="?controller=file&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Attach a document') ?></a></li>
+ <li><a href="?controller=task&amp;action=duplicate&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li>
+ <li><a href="?controller=task&amp;action=copy&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Duplicate to another project') ?></a></li>
+ <li><a href="?controller=task&amp;action=move&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Move to another project') ?></a></li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <a href="?controller=task&amp;action=close&amp;task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a>
+ <?php else: ?>
+ <a href="?controller=task&amp;action=open&amp;task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a>
<?php endif ?>
- </ul>
- </div>
+ </li>
+ <?php if (! $hide_remove_menu): ?>
+ <li><a href="?controller=task&amp;action=remove&amp;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&amp;action=index"><?= t('All users') ?></a></li>
- <li><a href="?controller=user&amp;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&amp;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&amp;action=show&amp;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&amp;action=edit&amp;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&amp;action=password&amp;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&amp;action=notifications&amp;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&amp;action=external&amp;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&amp;action=last&amp;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&amp;action=sessions&amp;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&amp;action=remove&amp;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
diff --git a/app/helpers.php b/app/helpers.php
index f9415582..b58f706f 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -6,7 +6,6 @@ namespace Helper;
* Template helpers
*
*/
-
use Core\Security;
use Core\Template;
use Core\Tool;
@@ -568,9 +567,9 @@ function form_numeric($name, $values = array(), array $errors = array(), array $
* @param string $class CSS class attribute
* @return string
*/
-function a($label, $controller, $action, array $params = array(), $csrf = false, $class = '')
+function a($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '')
{
- return '<a href="'.u($controller, $action, $params, $csrf).'" class="'.$class.'">'.$label.'</a>';
+ return '<a href="'.u($controller, $action, $params, $csrf).'" class="'.$class.'" title="'.$title.'">'.$label.'</a>';
}
/**