From e9fedf3e5cd63aea4da7a71f6647ee427c62fa49 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 5 Dec 2015 20:31:27 -0500 Subject: Rewrite of the authentication and authorization system --- app/Controller/Projectuser.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'app/Controller/Projectuser.php') diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index 18829b3c..34595764 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -4,6 +4,7 @@ namespace Kanboard\Controller; use Kanboard\Model\User as UserModel; use Kanboard\Model\Task as TaskModel; +use Kanboard\Core\Security\Role; /** * Project User overview @@ -23,7 +24,7 @@ class Projectuser extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); $params['content_for_sublayout'] = $this->template->render($template, $params); $params['filter'] = array('user_id' => $params['user_id']); @@ -37,17 +38,17 @@ class Projectuser extends Base if ($this->userSession->isAdmin()) { $project_ids = $this->project->getAllIds(); } else { - $project_ids = $this->projectPermission->getMemberProjectIds($this->userSession->getId()); + $project_ids = $this->projectPermission->getActiveProjectIds($this->userSession->getId()); } return array($user_id, $project_ids, $this->user->getList(true)); } - private function role($is_owner, $action, $title, $title_user) + private function role($role, $action, $title, $title_user) { list($user_id, $project_ids, $users) = $this->common(); - $query = $this->projectPermission->getQueryByRole($project_ids, $is_owner)->callback(array($this->project, 'applyColumnStats')); + $query = $this->projectPermission->getQueryByRole($project_ids, $role)->callback(array($this->project, 'applyColumnStats')); if ($user_id !== UserModel::EVERYBODY_ID) { $query->eq(UserModel::TABLE.'.id', $user_id); @@ -101,7 +102,7 @@ class Projectuser extends Base */ public function managers() { - $this->role(1, 'managers', t('People who are project managers'), 'Projects where "%s" is manager'); + $this->role(Role::PROJECT_MANAGER, 'managers', t('People who are project managers'), 'Projects where "%s" is manager'); } /** @@ -110,7 +111,7 @@ class Projectuser extends Base */ public function members() { - $this->role(0, 'members', t('People who are project members'), 'Projects where "%s" is member'); + $this->role(ROLE::PROJECT_MEMBER, 'members', t('People who are project members'), 'Projects where "%s" is member'); } /** -- cgit v1.2.3 From c83f589b22cd548c6de10bfb0c18f767ba7dffd8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 17 Dec 2015 21:38:13 -0500 Subject: Show only active projects in board selector --- app/Controller/Activity.php | 2 +- app/Controller/Analytic.php | 2 +- app/Controller/App.php | 2 +- app/Controller/Base.php | 6 +++--- app/Controller/Config.php | 2 +- app/Controller/Currency.php | 2 +- app/Controller/Doc.php | 2 +- app/Controller/Gantt.php | 2 +- app/Controller/Group.php | 10 +++++----- app/Controller/Link.php | 2 +- app/Controller/Project.php | 4 ++-- app/Controller/Projectuser.php | 2 +- app/Controller/User.php | 8 ++++---- app/Model/ProjectPermission.php | 2 +- app/Model/ProjectUserRole.php | 14 +++++++++++++- 15 files changed, 37 insertions(+), 25 deletions(-) (limited to 'app/Controller/Projectuser.php') diff --git a/app/Controller/Activity.php b/app/Controller/Activity.php index 71d5e94f..38658345 100644 --- a/app/Controller/Activity.php +++ b/app/Controller/Activity.php @@ -20,7 +20,7 @@ class Activity extends Base $project = $this->getProject(); $this->response->html($this->template->layout('activity/project', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'events' => $this->projectActivity->getProject($project['id']), 'project' => $project, 'title' => t('%s\'s activity', $project['name']) diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php index bebb13fa..b2e27c58 100644 --- a/app/Controller/Analytic.php +++ b/app/Controller/Analytic.php @@ -21,7 +21,7 @@ class Analytic extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['content_for_sublayout'] = $this->template->render($template, $params); return $this->template->layout('analytic/layout', $params); diff --git a/app/Controller/App.php b/app/Controller/App.php index c596b4a8..bdd7fbcf 100644 --- a/app/Controller/App.php +++ b/app/Controller/App.php @@ -22,7 +22,7 @@ class App extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['content_for_sublayout'] = $this->template->render($template, $params); return $this->template->layout('app/layout', $params); diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 35ceee09..6d0ecae9 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -190,7 +190,7 @@ abstract class Base extends \Kanboard\Core\Base $content = $this->template->render($template, $params); $params['task_content_for_layout'] = $content; $params['title'] = $params['task']['project_name'].' > '.$params['task']['title']; - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); return $this->template->layout('task/layout', $params); } @@ -208,7 +208,7 @@ abstract class Base extends \Kanboard\Core\Base $content = $this->template->render($template, $params); $params['project_content_for_layout'] = $content; $params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'].' > '.$params['title']; - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['sidebar_template'] = $sidebar_template; return $this->template->layout('project/layout', $params); @@ -289,7 +289,7 @@ abstract class Base extends \Kanboard\Core\Base { $project = $this->getProject(); $search = $this->request->getStringParam('search', $this->userSession->getFilters($project['id'])); - $board_selector = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $board_selector = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); unset($board_selector[$project['id']]); $filters = array( diff --git a/app/Controller/Config.php b/app/Controller/Config.php index c813c795..c7097da3 100644 --- a/app/Controller/Config.php +++ b/app/Controller/Config.php @@ -20,7 +20,7 @@ class Config extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['values'] = $this->config->getAll(); $params['errors'] = array(); $params['config_content_for_layout'] = $this->template->render($template, $params); diff --git a/app/Controller/Currency.php b/app/Controller/Currency.php index 89e38569..4c5b8ee8 100644 --- a/app/Controller/Currency.php +++ b/app/Controller/Currency.php @@ -20,7 +20,7 @@ class Currency extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['config_content_for_layout'] = $this->template->render($template, $params); return $this->template->layout('config/layout', $params); diff --git a/app/Controller/Doc.php b/app/Controller/Doc.php index 08561aa1..a233b120 100644 --- a/app/Controller/Doc.php +++ b/app/Controller/Doc.php @@ -53,7 +53,7 @@ class Doc extends Base } $this->response->html($this->template->layout('doc/show', $this->readFile($filename) + array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), ))); } } diff --git a/app/Controller/Gantt.php b/app/Controller/Gantt.php index f3954a25..ac0e6fad 100644 --- a/app/Controller/Gantt.php +++ b/app/Controller/Gantt.php @@ -26,7 +26,7 @@ class Gantt extends Base $this->response->html($this->template->layout('gantt/projects', array( 'projects' => $this->projectGanttFormatter->filter($project_ids)->format(), 'title' => t('Gantt chart for all projects'), - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), ))); } diff --git a/app/Controller/Group.php b/app/Controller/Group.php index 3e6505e9..3c9c4a07 100644 --- a/app/Controller/Group.php +++ b/app/Controller/Group.php @@ -25,7 +25,7 @@ class Group extends Base ->calculate(); $this->response->html($this->template->layout('group/index', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => t('Groups').' ('.$paginator->getTotal().')', 'paginator' => $paginator, ))); @@ -49,7 +49,7 @@ class Group extends Base ->calculate(); $this->response->html($this->template->layout('group/users', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => t('Members of %s', $group['name']).' ('.$paginator->getTotal().')', 'paginator' => $paginator, 'group' => $group, @@ -64,7 +64,7 @@ class Group extends Base public function create(array $values = array(), array $errors = array()) { $this->response->html($this->template->layout('group/create', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'errors' => $errors, 'values' => $values, 'title' => t('New group') @@ -105,7 +105,7 @@ class Group extends Base } $this->response->html($this->template->layout('group/edit', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'errors' => $errors, 'values' => $values, 'title' => t('Edit group') @@ -149,7 +149,7 @@ class Group extends Base } $this->response->html($this->template->layout('group/associate', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'users' => $this->user->prepareList($this->groupMember->getNotMembers($group_id)), 'group' => $group, 'errors' => $errors, diff --git a/app/Controller/Link.php b/app/Controller/Link.php index 33ec6688..2ae57b1a 100644 --- a/app/Controller/Link.php +++ b/app/Controller/Link.php @@ -21,7 +21,7 @@ class Link extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['config_content_for_layout'] = $this->template->render($template, $params); return $this->template->layout('config/layout', $params); diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 80c95aa2..5e75db4e 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -33,7 +33,7 @@ class Project extends Base ->calculate(); $this->response->html($this->template->layout('project/index', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'paginator' => $paginator, 'nb_projects' => $nb_projects, 'title' => t('Projects').' ('.$nb_projects.')' @@ -302,7 +302,7 @@ class Project extends Base $is_private = isset($values['is_private']) && $values['is_private'] == 1; $this->response->html($this->template->layout('project/new', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'values' => $values, 'errors' => $errors, 'is_private' => $is_private, diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index 34595764..806ede77 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -24,7 +24,7 @@ class Projectuser extends Base */ private function layout($template, array $params) { - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); $params['content_for_sublayout'] = $this->template->render($template, $params); $params['filter'] = array('user_id' => $params['user_id']); diff --git a/app/Controller/User.php b/app/Controller/User.php index 0968d5a5..8b6df44c 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -26,7 +26,7 @@ class User extends Base { $content = $this->template->render($template, $params); $params['user_content_for_layout'] = $content; - $params['board_selector'] = $this->projectUserRole->getProjectsByUser($this->userSession->getId()); + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); if (isset($params['user'])) { $params['title'] = ($params['user']['name'] ?: $params['user']['username']).' (#'.$params['user']['id'].')'; @@ -51,7 +51,7 @@ class User extends Base $this->response->html( $this->template->layout('user/index', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => t('Users').' ('.$paginator->getTotal().')', 'paginator' => $paginator, ))); @@ -72,7 +72,7 @@ class User extends Base $this->response->html( $this->template->layout('user/profile', array( - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'title' => $user['name'] ?: $user['username'], 'user' => $user, ) @@ -92,7 +92,7 @@ class User extends Base 'timezones' => $this->config->getTimezones(true), 'languages' => $this->config->getLanguages(true), 'roles' => $this->role->getApplicationRoles(), - 'board_selector' => $this->projectUserRole->getProjectsByUser($this->userSession->getId()), + 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'projects' => $this->project->getList(), 'errors' => $errors, 'values' => $values + array('role' => Role::APP_USER), diff --git a/app/Model/ProjectPermission.php b/app/Model/ProjectPermission.php index f74b8587..4ad9bbf1 100644 --- a/app/Model/ProjectPermission.php +++ b/app/Model/ProjectPermission.php @@ -100,7 +100,7 @@ class ProjectPermission extends Base */ public function getActiveProjectIds($user_id) { - return array_keys($this->projectUserRole->getProjectsByUser($user_id, array(Project::ACTIVE))); + return array_keys($this->projectUserRole->getActiveProjectsByUser($user_id)); } /** diff --git a/app/Model/ProjectUserRole.php b/app/Model/ProjectUserRole.php index 28e6c8c6..b2c38622 100644 --- a/app/Model/ProjectUserRole.php +++ b/app/Model/ProjectUserRole.php @@ -20,7 +20,19 @@ class ProjectUserRole extends Base const TABLE = 'project_has_users'; /** - * Get the list of project visible by the given user + * Get the list of active project for the given user + * + * @access public + * @param integer $user_id + * @return array + */ + public function getActiveProjectsByUser($user_id) + { + return $this->getProjectsByUser($user_id, $status = array(Project::ACTIVE)); + } + + /** + * Get the list of project visible for the given user * * @access public * @param integer $user_id -- cgit v1.2.3 From 4fa38bf417dd7f1673f63641460092bd046d57b7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 24 Jan 2016 16:29:14 -0500 Subject: Add project owner --- ChangeLog | 7 ++++ app/Controller/Base.php | 25 ++++++++++++- app/Controller/Board.php | 1 - app/Controller/Project.php | 3 +- app/Controller/Projectuser.php | 13 +++++++ app/Locale/bs_BA/translations.php | 7 +++- app/Locale/cs_CZ/translations.php | 7 +++- app/Locale/da_DK/translations.php | 7 +++- app/Locale/de_DE/translations.php | 7 +++- app/Locale/es_ES/translations.php | 7 +++- app/Locale/fi_FI/translations.php | 7 +++- app/Locale/fr_FR/translations.php | 9 ++++- app/Locale/hu_HU/translations.php | 7 +++- app/Locale/id_ID/translations.php | 7 +++- app/Locale/it_IT/translations.php | 7 +++- app/Locale/ja_JP/translations.php | 7 +++- app/Locale/my_MY/translations.php | 7 +++- app/Locale/nb_NO/translations.php | 7 +++- app/Locale/nl_NL/translations.php | 7 +++- app/Locale/pl_PL/translations.php | 7 +++- app/Locale/pt_BR/translations.php | 7 +++- app/Locale/pt_PT/translations.php | 7 +++- app/Locale/ru_RU/translations.php | 7 +++- app/Locale/sr_Latn_RS/translations.php | 7 +++- app/Locale/sv_SE/translations.php | 7 +++- app/Locale/th_TH/translations.php | 7 +++- app/Locale/tr_TR/translations.php | 7 +++- app/Locale/zh_CN/translations.php | 7 +++- app/Model/Project.php | 57 ++++++++++------------------- app/Schema/Mysql.php | 7 +++- app/Schema/Postgres.php | 7 +++- app/Schema/Sqlite.php | 7 +++- app/Template/project/edit.php | 10 ++++- app/Template/project/index.php | 19 +++++----- app/Template/project/roles.php | 7 ---- app/Template/project/show.php | 4 ++ app/Template/project/sidebar.php | 6 +-- app/Template/project_user/tooltip_users.php | 14 +++++++ assets/css/app.css | 2 +- assets/css/src/header.css | 6 +++ tests/units/Model/ProjectTest.php | 24 ++++++++++++ 41 files changed, 293 insertions(+), 89 deletions(-) delete mode 100644 app/Template/project/roles.php create mode 100644 app/Template/project_user/tooltip_users.php (limited to 'app/Controller/Projectuser.php') diff --git a/ChangeLog b/ChangeLog index 5ae4fb75..6c46bb00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Version 1.0.25 (unreleased) +-------------- + +New features: + +* Add project owner (Directly Responsible Individual) + Version 1.0.24 -------------- diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 66a9e84f..efeab31e 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -248,7 +248,7 @@ abstract class Base extends \Kanboard\Core\Base protected function getProject($project_id = 0) { $project_id = $this->request->getIntegerParam('project_id', $project_id); - $project = $this->project->getById($project_id); + $project = $this->project->getByIdWithOwner($project_id); if (empty($project)) { $this->flash->failure(t('Project not found.')); @@ -308,6 +308,29 @@ abstract class Base extends \Kanboard\Core\Base 'board_selector' => $board_selector, 'filters' => $filters, 'title' => $project['name'], + 'description' => $this->getProjectDescription($project), ); } + + /** + * Get project description + * + * @access protected + * @param array &$project + * @return string + */ + protected function getProjectDescription(array &$project) { + if ($project['owner_id'] > 0) { + $description = t('Project owner: ').'**'.$this->template->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL; + + if (! empty($project['description'])) { + $description .= '***'.PHP_EOL.PHP_EOL; + $description .= $project['description']; + } + } else { + $description = $project['description']; + } + + return $description; + } } diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 06736cce..f64de69a 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -54,7 +54,6 @@ class Board extends Base 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false), 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()), 'swimlanes' => $this->taskFilter->search($params['filters']['search'])->getBoard($params['project']['id']), - 'description' => $params['project']['description'], 'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'), 'board_highlight_period' => $this->config->get('board_highlight_period'), ) + $params)); diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 27c827d1..836bfb45 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -29,7 +29,7 @@ class Project extends Base ->setUrl('project', 'index') ->setMax(20) ->setOrder('name') - ->setQuery($this->project->getQueryProjectDetails($project_ids)) + ->setQuery($this->project->getQueryColumnStats($project_ids)) ->calculate(); $this->response->html($this->template->layout('project/index', array( @@ -145,6 +145,7 @@ class Project extends Base 'values' => empty($values) ? $project : $values, 'errors' => $errors, 'project' => $project, + 'owners' => $this->projectUserRole->getAssignableUsersList($project['id'], true), 'title' => t('Edit project') ))); } diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index 806ede77..78b93ab6 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -131,4 +131,17 @@ class Projectuser extends Base { $this->tasks(TaskModel::STATUS_CLOSED, 'closed', t('Closed tasks'), 'Closed tasks assigned to "%s"'); } + + /** + * Users tooltip + */ + public function users() + { + $project = $this->getProject(); + + return $this->response->html($this->template->render('project_user/tooltip_users', array( + 'users' => $this->projectUserRole->getAllUsersGroupedByRole($project['id']), + 'roles' => $this->role->getProjectRoles(), + ))); + } } diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index 6ad3a783..e1af1c08 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Uzmi sliku ekrana i pritisni CTRL+V ili ⌘+V da zalijepiš ovdje.', 'Screenshot uploaded successfully.' => 'Slika ekrana uspješno dodana.', 'SEK - Swedish Krona' => 'SEK - Švedska kruna', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Identifikator projekta je opcionalni alfanumerički kod koji se koristi za identifikaciju projekta.', 'Identifier' => 'Identifikator', 'Disable two factor authentication' => 'Onemogući faktor-dva autentifikaciju', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Da li zaista želiš onemogućiti faktor-dva autentifikaciju: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 2c6cb7ed..b93b7c23 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Nimm einen Screenshot auf und drücke STRG+V oder ⌘+V um ihn hier einzufügen.', 'Screenshot uploaded successfully.' => 'Screenshot erfolgreich hochgeladen.', 'SEK - Swedish Krona' => 'SEK - Schwedische Kronen', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Identifikátor projektu je volitelný alfanumerický kód používaný k identifikaci vašeho projektu.', 'Identifier' => 'Identifikator', 'Disable two factor authentication' => 'Zrušit dvou stupňovou autorizaci', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Willst du wirklich für folgenden Nutzer die Zwei-Faktor-Authentifizierung deaktivieren: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 820b4d14..63850d70 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index f1c89ca2..ef056972 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Nimm einen Screenshot auf und drücke STRG+V oder ⌘+V um ihn hier einzufügen.', 'Screenshot uploaded successfully.' => 'Screenshot erfolgreich hochgeladen.', 'SEK - Swedish Krona' => 'SEK - Schwedische Kronen', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Der Projektidentifikator ist ein optionaler alphanumerischer Code, der das Projekt identifiziert.', 'Identifier' => 'Identifikator', 'Disable two factor authentication' => 'Deaktiviere Zwei-Faktor-Authentifizierung', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Willst du wirklich für folgenden Nutzer die Zwei-Faktor-Authentifizierung deaktivieren: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 9248943c..91709476 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Capture un patallazo y pulse CTRL+V o ⌘+V para pegar aquí.', 'Screenshot uploaded successfully.' => 'Pantallazo cargado con éxito', 'SEK - Swedish Krona' => 'SEK - Corona sueca', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'El identificador del proyecto us un código opcional alfanumérico que se usa para identificar su proyecto.', 'Identifier' => 'Identificador', 'Disable two factor authentication' => 'Desactivar la autenticación de dos factores', 'Do you really want to disable the two factor authentication for this user: "%s"?' => '¿Realmentes quiere desactuvar la autenticación de dos factores para este usuario: "%s?"', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 18553ec7..c887e02d 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 26490b1b..f36ce104 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -688,7 +688,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Prenez une capture d\'écran et appuyez sur CTRL+V ou ⌘+V pour coller ici.', 'Screenshot uploaded successfully.' => 'Capture d\'écran téléchargée avec succès.', 'SEK - Swedish Krona' => 'SEK - Couronne suédoise', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'L\'identificateur du projet est un code alpha-numérique optionnel pour identifier votre projet.', 'Identifier' => 'Identificateur', 'Disable two factor authentication' => 'Désactiver l\'authentification à deux facteurs', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Voulez-vous vraiment désactiver l\'authentification à deux facteurs pour cet utilisateur : « %s » ?', @@ -701,7 +700,7 @@ return array( 'Score' => 'Complexité', 'The identifier must be unique' => 'L\'identifiant doit être unique', 'This linked task id doesn\'t exists' => 'L\'identifiant de la task liée n\'existe pas', - 'This value must be alphanumeric' => 'Cette valeur doit être alpha-numérique', + 'This value must be alphanumeric' => 'Cette valeur doit être alphanumérique', 'Edit recurrence' => 'Modifier la récurrence', 'Generate recurrent task' => 'Générer une tâche récurrente', 'Trigger to generate recurrent task' => 'Déclencheur pour générer la tâche récurrente', @@ -1107,4 +1106,10 @@ return array( 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => 'Aucun plugin n\'a enregistré une méthode de notification de projet. Vous pouvez toujours configurer les notifications individuelles dans votre profil d\'utilisateur.', 'My dashboard' => 'Mon tableau de bord', 'My profile' => 'Mon profile', + 'Project owner: ' => 'Responsable du projet : ', + 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => 'L\'identifiant du projet est optionnel et doit être alphanumérique, example: MONPROJET.', + 'Project owner' => 'Responsable du projet', + 'Those dates are useful for the project Gantt chart.' => 'Ces dates sont utiles pour le diagramme de Gantt des projets.', + 'Private projects do not have users and groups management.' => 'Les projets privés n\'ont pas de gestion d\'utilisateurs et de groupes.', + 'There is no project member.' => 'Il y a aucun membre du projet.', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 8f93d1c3..e12a7aad 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index 170a5b76..49d61d58 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Mengambil screenshot dan tekan CTRL + V atau ⌘ + V untuk paste di sini.', 'Screenshot uploaded successfully.' => 'Screenshot berhasil diunggah.', 'SEK - Swedish Krona' => 'SEK - Krona Swedia', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Identifier proyek adalah kode alfanumerik opsional digunakan untuk mengidentifikasi proyek Anda.', 'Identifier' => 'Identifier', 'Disable two factor authentication' => 'Matikan dua faktor otentifikasi', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Apakah anda yakin akan mematikan dua faktor otentifikasi untuk pengguna ini : « %s » ?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index cd86c98b..5e2c32a9 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index e91a3bff..f1884b93 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index e83f915d..65aaa4e3 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', 'Screenshot uploaded successfully.' => 'Screenshot berhasil diunggah.', 'SEK - Swedish Krona' => 'SEK - Krona Swedia', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Identifier projek adalah kode alfanumerik opsional digunakan untuk mengidentifikasi projek Anda.', 'Identifier' => 'Identifier', 'Disable two factor authentication' => 'Matikan dua faktor otentifikasi', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Apakah anda yakin akan mematikan dua faktor otentifikasi untuk pengguna ini : « %s » ?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 04f8e6ae..520149d5 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', 'Screenshot uploaded successfully.' => 'Skjermbilde opplastet', // 'SEK - Swedish Krona' => '', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Prosjektkoden er en alfanumerisk kode som kan brukes for å identifisere prosjektet', 'Identifier' => 'Prosjektkode', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 420f8351..87f5323e 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index ecea0909..37dcfe3d 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Zrób zrzut ekranu i wciśnij CTRL+V by dodać go tutaj.', 'Screenshot uploaded successfully.' => 'Zrzut ekranu dodany.', 'SEK - Swedish Krona' => 'SEK - Korona szwedzka', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Identyfikator projektu to opcjonalny kod alfanumeryczny do identyfikacji projektu.', 'Identifier' => 'Identyfikator', 'Disable two factor authentication' => 'Wyłącz uwierzytelnianie dwuetapowe', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Czy na pewno chcesz wyłączyć uwierzytelnianie dwuetapowe dla tego użytkownika: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index e985f90d..6e47c514 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Tire uma captura de tela e pressione CTRL + V ou ⌘ + V para colar aqui.', 'Screenshot uploaded successfully.' => 'Captura de tela enviada com sucesso.', 'SEK - Swedish Krona' => 'SEK - Coroa sueca', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'O identificador de projeto é um código alfanumérico opcional utilizado para identificar o seu projeto.', 'Identifier' => 'Identificador', 'Disable two factor authentication' => 'Desativar autenticação em duas etapas', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Você realmente deseja desativar a autenticação em duas etapas para este usuário: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index bfe98033..f57657ee 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Tire um screenshot e pressione CTRL + V ou ⌘ + V para colar aqui.', 'Screenshot uploaded successfully.' => 'Screenshot enviada com sucesso.', 'SEK - Swedish Krona' => 'SEK - Coroa sueca', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'O identificador de projecto é um código alfanumérico opcional utilizado para identificar o seu projecto.', 'Identifier' => 'Identificador', 'Disable two factor authentication' => 'Desactivar autenticação com dois factores', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Tem a certeza que quer desactivar a autenticação com dois factores para esse utilizador: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 7e406c94..02bf9934 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Сделайте скриншот и нажмите CTRL+V или ⌘+V для вложения', 'Screenshot uploaded successfully.' => 'Скриншет успешно загружен', 'SEK - Swedish Krona' => 'SEK - Шведская крона', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Идентификатор проекта - это опциональный буквенно-цифровой код использующийся для идентификации проекта', 'Identifier' => 'Идентификатор', 'Disable two factor authentication' => 'Выключить двухфакторную авторизацию', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Вы действительно хотите выключить двухфакторную авторизацию для пользователя "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 995cd485..c779cd6c 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index af14409d..ca412273 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Ta en skärmdump och tryck CTRL+V för att klistra in här.', 'Screenshot uploaded successfully.' => 'Skärmdumpen laddades upp.', 'SEK - Swedish Krona' => 'SEK - Svensk Krona', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Projektidentifieraren är en valbar alfanumerisk kod som används för att identifiera ditt projekt.', 'Identifier' => 'Identifierare', 'Disable two factor authentication' => 'Inaktivera två-faktors autentisering', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Vill du verkligen inaktivera två-faktors autentisering för denna användare: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 07733f20..b2b9a55b 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', 'Screenshot uploaded successfully.' => 'อัพโหลด screenshot เรียบร้อยแล้ว', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 8fb2483d..17163f45 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -686,7 +686,6 @@ return array( 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Bir ekran görüntüsü alın ve buraya yapıştırmak için CTRL+V veya ⌘+V tuşlarına basın.', 'Screenshot uploaded successfully.' => 'Ekran görüntüsü başarıyla yüklendi', // 'SEK - Swedish Krona' => '', - 'The project identifier is an optional alphanumeric code used to identify your project.' => 'Proje kimliği, projeyi tanımlamak için kullanılan opsiyonel bir alfanumerik koddur.', 'Identifier' => 'Kimlik', 'Disable two factor authentication' => 'İki kademeli doğrulamayı iptal et', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Bu kullanıcı için iki kademeli doğrulamayı iptal etmek istediğinize emin misiniz: "%s"?', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index c591fa68..e4b732ef 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -686,7 +686,6 @@ return array( // 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => '', // 'Screenshot uploaded successfully.' => '', // 'SEK - Swedish Krona' => '', - // 'The project identifier is an optional alphanumeric code used to identify your project.' => '', // 'Identifier' => '', // 'Disable two factor authentication' => '', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', @@ -1104,4 +1103,10 @@ return array( // 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => '', // 'My dashboard' => '', // 'My profile' => '', + // 'Project owner: ' => '', + // 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => '', + // 'Project owner' => '', + // 'Those dates are useful for the project Gantt chart.' => '', + // 'Private projects do not have users and groups management.' => '', + // 'There is no project member.' => '', ); diff --git a/app/Model/Project.php b/app/Model/Project.php index 63077348..ba0716b0 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -46,6 +46,22 @@ class Project extends Base return $this->db->table(self::TABLE)->eq('id', $project_id)->findOne(); } + /** + * Get a project by id with owner name + * + * @access public + * @param integer $project_id Project id + * @return array + */ + public function getByIdWithOwner($project_id) + { + return $this->db->table(self::TABLE) + ->columns(self::TABLE.'.*', User::TABLE.'.username AS owner_username', User::TABLE.'.name AS owner_name') + ->eq(self::TABLE.'.id', $project_id) + ->join(User::TABLE, 'id', 'owner_id') + ->findOne(); + } + /** * Get a project by the name * @@ -275,23 +291,6 @@ class Project extends Base return $projects; } - /** - * Fetch more information for each project - * - * @access public - * @param array $projects - * @return array - */ - public function applyProjectDetails(array $projects) - { - foreach ($projects as &$project) { - $this->getColumnStats($project); - $project = array_merge($project, $this->projectUserRole->getAllUsersGroupedByRole($project['id'])); - } - - return $projects; - } - /** * Get project summary for a list of project * @@ -307,29 +306,12 @@ class Project extends Base return $this->db ->table(Project::TABLE) - ->in('id', $project_ids) + ->columns(self::TABLE.'.*', User::TABLE.'.username AS owner_username', User::TABLE.'.name AS owner_name') + ->join(User::TABLE, 'id', 'owner_id') + ->in(self::TABLE.'.id', $project_ids) ->callback(array($this, 'applyColumnStats')); } - /** - * Get project details (users + columns) for a list of project - * - * @access public - * @param array $project_ids List of project id - * @return \PicoDb\Table - */ - public function getQueryProjectDetails(array $project_ids) - { - if (empty($project_ids)) { - return $this->db->table(Project::TABLE)->limit(0); - } - - return $this->db - ->table(Project::TABLE) - ->in('id', $project_ids) - ->callback(array($this, 'applyProjectDetails')); - } - /** * Create a project * @@ -346,6 +328,7 @@ class Project extends Base $values['token'] = ''; $values['last_modified'] = time(); $values['is_private'] = empty($values['is_private']) ? 0 : 1; + $values['owner_id'] = $user_id; if (! empty($values['identifier'])) { $values['identifier'] = strtoupper($values['identifier']); diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index c98e083e..ad7f7be1 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 101; +const VERSION = 102; + +function version_102(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN owner_id INT DEFAULT 0"); +} function version_101(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 961d8f4d..d23a7723 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 81; +const VERSION = 82; + +function version_82(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN owner_id INTEGER DEFAULT 0"); +} function version_81(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index f1be0cf1..daa70f54 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,12 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 93; +const VERSION = 94; + +function version_94(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN owner_id INTEGER DEFAULT 0"); +} function version_93(PDO $pdo) { diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php index 188107d1..3a273f32 100644 --- a/app/Template/project/edit.php +++ b/app/Template/project/edit.php @@ -11,18 +11,26 @@ form->label(t('Identifier'), 'identifier') ?> form->text('identifier', $values, $errors, array('maxlength="50"')) ?> -

+

+ form->label(t('Project owner'), 'owner_id') ?> + form->select('owner_id', $owners, $values, $errors) ?> + +
form->label(t('Start date'), 'start_date') ?> form->text('start_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> form->label(t('End date'), 'end_date') ?> form->text('end_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> +

user->hasProjectAccess('project', 'create', $project['id'])): ?> +
form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> +

+
form->label(t('Description'), 'description') ?>
diff --git a/app/Template/project/index.php b/app/Template/project/index.php index c7d74f8b..3d2a33ea 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -23,9 +23,9 @@ order(t('Project'), 'name') ?> order(t('Start date'), 'start_date') ?> order(t('End date'), 'end_date') ?> + order(t('Owner'), 'owner_id') ?> user->hasAccess('projectuser', 'managers')): ?> - - + @@ -66,16 +66,15 @@ + + 0): ?> + e($project['owner_name'] ?: $project['owner_username']) ?> + + user->hasAccess('projectuser', 'managers')): ?> - render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MANAGER)) ?> - - - - - - render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MEMBER)) ?> - + + diff --git a/app/Template/project/roles.php b/app/Template/project/roles.php deleted file mode 100644 index d4cd43cb..00000000 --- a/app/Template/project/roles.php +++ /dev/null @@ -1,7 +0,0 @@ - -
    - $user_name): ?> -
  • url->link($this->e($user_name), 'projectuser', 'opens', array('user_id' => $user_id)) ?>
  • - -
- \ No newline at end of file diff --git a/app/Template/project/show.php b/app/Template/project/show.php index 5a65a26e..5f1aefc1 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -4,6 +4,10 @@
  • + 0): ?> +
  • e($project['owner_name'] ?: $project['owner_username']) ?>
  • + +
  • diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 025c410d..e798195d 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -11,6 +11,9 @@ user->hasProjectAccess('project', 'edit', $project['id'])): ?> +
  • app->checkMenuSelection('project', 'edit') ?>> + url->link(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> +
  • app->checkMenuSelection('project', 'share') ?>> url->link(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?>
  • @@ -20,9 +23,6 @@
  • app->checkMenuSelection('project', 'integrations') ?>> url->link(t('Integrations'), 'project', 'integrations', array('project_id' => $project['id'])) ?>
  • -
  • app->checkMenuSelection('project', 'edit') ?>> - url->link(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> -
  • app->checkMenuSelection('column') ?>> url->link(t('Columns'), 'column', 'index', array('project_id' => $project['id'])) ?>
  • diff --git a/app/Template/project_user/tooltip_users.php b/app/Template/project_user/tooltip_users.php new file mode 100644 index 00000000..7a07caad --- /dev/null +++ b/app/Template/project_user/tooltip_users.php @@ -0,0 +1,14 @@ + +

    + + $role_name): ?> + + +
      + $user): ?> +
    • url->link($this->e($user), 'Projectuser', 'opens', array('user_id' => $user_id)) ?>
    • + +
    + + + \ No newline at end of file diff --git a/assets/css/app.css b/assets/css/app.css index 3a2db1be..58c146bf 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -18,4 +18,4 @@ * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"} -.c3 svg{font:10px sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-item-hidden{opacity:.15}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000}li,ul,ol,table,tr,td,th,p,blockquote,body{margin:0;padding:0;font-size:100%}body{margin-left:10px;margin-right:10px;padding-bottom:10px;color:#333;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}.page{clear:both}ul.no-bullet li{list-style-type:none;margin-left:0}.pull-right{text-align:right}hr{border:0;height:0;border-top:1px solid rgba(0,0,0,0.1);border-bottom:1px solid rgba(255,255,255,0.3)}.chosen-select{min-height:27px}.avatar{float:left;margin-right:10px}#ui-datepicker-div{font-size:.8em}#app-loading-icon{position:fixed;right:3px;bottom:3px}.web-notification-icon{color:#36c}.web-notification-icon:focus,.web-notification-icon:hover{color:#000}a{color:#36c;border:0}a:focus{outline:0;color:#df5353;text-decoration:none;border:1px dotted #aaa}a:hover{color:#333;text-decoration:none}h1,h2,h3{font-weight:normal;color:#333}h2{font-size:1.3em;margin-bottom:10px}h3{margin-top:10px;font-size:1.2em}table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:20px;font-size:.95em}#calendar table{margin-bottom:0}th,td{border:1px solid #eee;padding-top:.5em;padding-bottom:.5em;padding-left:3px;padding-right:3px}td{vertical-align:top}th{background:#fbfbfb;text-align:left}td li{margin-left:20px}.table-small{font-size:.8em}th a{text-decoration:none;color:#333}th a:focus,th a:hover{text-decoration:underline}.table-fixed{table-layout:fixed;white-space:nowrap}.table-fixed th{overflow:hidden}.table-fixed td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-stripped tr:nth-child(odd) td{background:#fefefe}.column-3{width:3%}.column-5{width:5%}.column-8{width:7.5%}.column-10{width:10%}.column-12{width:12%}.column-15{width:15%}.column-18{width:18%}.column-20{width:20%}.column-25{width:25%}.column-30{width:30%}.column-35{width:35%}.column-40{width:40%}.column-50{width:50%}.column-60{width:60%}.column-70{width:70%}form{margin-bottom:20px}label{cursor:pointer;display:block;margin-top:10px}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]{color:#888;border:1px solid #ccc;width:300px;max-width:95%;font-size:100%;height:25px;padding-bottom:0;font-family:sans-serif;margin-top:10px;-webkit-appearance:none;appearance:none}input[type="number"]:focus,input[type="date"]:focus,input[type="email"]:focus,input[type="password"]:focus,input[type="text"]:focus,textarea:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}input.form-numeric,input[type="number"]{width:70px}textarea{border:1px solid #ccc;width:400px;max-width:99%;height:200px;font-size:100%;font-family:sans-serif}select{max-width:95%}select:focus{outline:0}::-webkit-input-placeholder{color:#ddd;padding-top:2px}::-ms-input-placeholder{color:#ddd;padding-top:2px}::-moz-placeholder{color:#ddd;padding-top:2px}.form-actions{padding-top:20px;clear:both}input.form-error,textarea.form-error{border:2px solid #b94a48}input.form-error:focus,textarea.form-error:focus{box-shadow:none;border:2px solid #b94a48}.form-required{color:red;padding-left:5px;font-weight:bold}.form-errors{color:#b94a48;list-style-type:none}ul.form-errors li{margin-left:0}.form-help{font-size:.8em;color:brown;margin-bottom:15px}.form-inline{padding:0;margin:0;border:0}.form-inline label{display:inline}.form-inline input,.form-inline select{margin:0;margin-right:15px}.form-inline .form-required{display:none}.form-inline-group{display:inline}input.form-datetime,input.form-date{width:150px}input.form-input-large{width:400px}.form-row{margin-top:10px;margin-bottom:20px}.form-column{float:left;margin-right:3%;max-width:47%}.form-column ul{margin-top:15px}.form-login{width:350px;margin:0 auto;margin-top:8%}.form-column li,.form-login li{margin-left:25px;line-height:25px}.form-login h2{margin-bottom:30px;font-size:1.5em;font-weight:bold}label+.form-tabs{margin-top:10px}.form-tabs{width:100%;max-width:800px}ul.form-tabs-nav{margin-bottom:8px;margin-top:0}.form-tabs-nav li{margin-left:0;display:inline}.form-tab{margin-right:20px}.form-tab a{color:#ccc;font-weight:bold;text-decoration:none}.form-tab a:focus,.form-tab a:hover{color:#000}.form-tab-selected a{color:#333}.preview-area{border:1px dashed #000;padding-top:5px;padding-left:5px;padding-right:5px;margin-bottom:5px;display:none;overflow:auto}.reset-password{margin-top:20px}.reset-password a{font-size:.8em;color:#999}.btn{-webkit-appearance:none;appearance:none;display:inline-block;color:#333;border:1px solid #ccc;background:#efefef;padding:5px;padding-left:15px;padding-right:15px;font-size:.9em;cursor:pointer;border-radius:2px}a.btn{text-decoration:none;font-weight:bold}.btn-small{padding:2px;padding-left:5px;padding-right:5px}.btn-red{border-color:#b0281a;background:#d14836;color:#fff}a.btn-red:hover,.btn-red:hover,.btn-red:focus{color:#fff;background:#c53727}a.btn-blue,.btn-blue{border-color:#3079ed;background:#4d90fe;color:#fff}a.btn-blue:hover,.btn-blue:hover,a.btn-blue:focus,.btn-blue:focus{border-color:#2f5bb7;background:#357ae8}.btn-blue:disabled{color:#ccc;border:1px solid #ccc;background:#f7f7f7}#main .alert,.page .alert{margin-top:10px}.alert{padding:8px 35px 8px 14px;margin-bottom:10px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-normal{color:#333;background-color:#f0f0f0;border-color:#ddd}.alert ul{margin-top:10px;margin-bottom:10px}.alert li{margin-left:25px}.tooltip-arrow:after{background:#fff;border:1px solid #aaa;box-shadow:0 0 5px #aaa}div.ui-tooltip{min-width:200px;max-width:600px;font-size:.85em}.tooltip-arrow{width:20px;height:10px;overflow:hidden;position:absolute}.tooltip-arrow.top{top:-10px}.tooltip-arrow.bottom{bottom:-10px}.tooltip-arrow.align-left{left:10px}.tooltip-arrow.align-right{right:10px}.tooltip-arrow:after{content:"";position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.tooltip-arrow.bottom:after{top:-10px}.tooltip-arrow.top:after{bottom:-10px}.tooltip-arrow.align-left:after{left:0}.tooltip-arrow.align-right:after{right:0}.tooltip-large{width:550px}.ui-tooltip-content .markdown p{margin-bottom:0}.tooltip .fa-info-circle{color:#999;font-size:.95em}.ui-tooltip ul{margin-left:20px}header{margin-top:10px;padding-bottom:10px;border-bottom:1px solid #dedede}header h1{margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70%;float:left}header ul{text-align:right;font-size:.9em}header li{display:inline;padding-left:30px}header a{color:#777;text-decoration:none}nav .active a{color:#333;font-weight:bold}.logo a{opacity:.5;color:#d40000}.logo span{color:#333}.logo a:hover{opacity:.8;color:#333}.logo a:focus span,.logo a:hover span{color:#d40000}.page-header{margin-bottom:20px}.page-header h2{margin:0;padding:0;font-size:1.4em;font-weight:bold;border-bottom:1px dotted #ccc}.page-header h2 a{color:#333;text-decoration:none}.page-header h2 a:focus,.page-header h2 a:hover{color:#aaa}.page-header ul{text-align:left;margin-top:5px;display:inline-block}.menu-inline li,.page-header li{display:inline;padding-right:10px;font-size:.95em}.menu-inline{margin-bottom:5px}@media only screen and (max-width:640px){.page-header-mobile li{display:block;margin-bottom:5px}}.public-board{margin-top:5px}.public-task{max-width:800px;margin:0 auto;margin-top:5px}#board-container{overflow-x:auto}#board{table-layout:fixed;margin-bottom:0}#board th.board-column-header{width:240px}#board td{vertical-align:top}.board-container-compact{overflow-x:initial}@media all and (-ms-high-contrast:active),(-ms-high-contrast:none){.board-container-compact #board{table-layout:auto}}#board th.board-column-header.board-column-compact{width:initial}.board-column-collapsed{display:none}td.board-column-task-collapsed{font-weight:bold;background-color:#fbfbfb}#board th.board-column-header-collapsed{width:28px;min-width:28px;text-align:center;overflow:hidden}.board-rotation-wrapper{position:relative;padding:8px 4px;min-height:150px;overflow:hidden}.board-rotation{white-space:nowrap;-webkit-backface-visibility:hidden;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%}.board-column-title .dropdown-menu{text-decoration:none}.board-add-icon{float:left;padding:0 5px}.board-add-icon a{text-decoration:none;color:#36c;font-size:150%;line-height:70%}.board-add-icon a:focus,.board-add-icon a:hover{text-decoration:none;color:red}.board-column-header-task-count{color:#999;font-weight:normal}th.board-column-header-collapsed .board-column-header-task-count{font-size:.85em}a.board-swimlane-toggle{font-size:.95em;text-decoration:none}a.board-swimlane-toggle:hover,a.board-swimlane-toggle:focus{color:#000;text-decoration:none;border:0}.board-task-list{overflow:auto;min-height:60px}.board-task-list-limit{background-color:#df5353}.draggable-item{cursor:pointer;user-select:none}.draggable-placeholder{border:2px dashed #000;background:#fafafa;height:70px;margin-bottom:10px}div.draggable-item-selected{border:1px solid #000}.task-board-sort-handle{float:left;padding-right:5px}.task-board-saving-state{opacity:.3}.task-board-saving-icon{position:absolute;margin:auto;width:100%;text-align:center;color:#000}.task-board{position:relative;margin-bottom:4px;border:1px solid #000;padding:2px;font-size:.85em;word-wrap:break-word}div.task-board-recent{box-shadow:2px 2px 3px rgba(0,0,0,0.2)}div.task-board-status-closed{user-select:none;border:1px dotted #555}.task-table a,.task-board a{color:#000;text-decoration:none;font-weight:bold}.task-table a:focus,.task-table a:hover,.task-board a:focus,.task-board a:hover{text-decoration:underline}.task-board-collapsed{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}a.task-board-collapsed-title{font-weight:normal}.task-board .dropdown{font-size:1.1em}.task-board-title{margin-top:5px;margin-bottom:5px;font-size:1.1em}.task-board-title a{font-weight:normal}.task-board-user{font-size:.8em}.task-board-current-user a{text-decoration:underline}.task-board-current-user a:focus,.task-board-current-user a:hover{text-decoration:none}a.task-board-nobody{font-weight:normal;font-style:italic;color:#444}.task-board-category-container{text-align:right}.task-board-category{font-weight:bold;font-size:.9em;color:#000;border:1px solid #555;padding:2px;padding-right:5px;padding-left:5px}.task-board-icons{text-align:right;margin-top:8px}.task-board-icons a{opacity:.5}.task-board-icons span{opacity:.5;margin-left:2px}.task-board-icons a:hover,.task-board-icons span:hover{opacity:1.0}.task-board-date{font-weight:bold;color:#000}span.task-board-date-overdue{color:#d90000;opacity:1.0}.task-score{font-weight:bold}.task-board .task-score{font-size:1.1em}.task-show-details .task-score{position:absolute;bottom:5px;right:5px;font-size:2em}.task-board-closed,.task-board-days{position:absolute;right:5px;top:5px;opacity:.5;font-size:.8em}.task-board-days:hover{opacity:1.0}.task-days-age{border:#666 1px solid;padding:1px 4px 1px 2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.task-days-incolumn{border:#666 1px solid;border-left:0;margin-left:-5px;padding:1px 2px 1px 4px;border-top-right-radius:3px;border-bottom-right-radius:3px}.board-container-compact .task-board-days{display:none}.task-show-details{position:relative;border-radius:5px;padding-bottom:10px}.task-show-details h2{font-size:1.8em;margin:0;margin-bottom:25px;padding:0;padding-left:10px;padding-right:10px}.task-show-details li{margin-left:25px;list-style-type:circle}.task-show-section{margin-top:30px;margin-bottom:20px}.task-show-files a{font-weight:bold;text-decoration:none}.task-show-files li{margin-left:25px;list-style-type:square;line-height:25px}.task-show-file-actions{font-size:.75em}.task-show-file-actions:before{content:" ["}.task-show-file-actions:after{content:"]"}.task-show-file-actions a{color:#333}.task-show-description{border-left:4px solid #333;padding-left:20px}.task-show-description-textarea{width:99%;max-width:99%;height:300px}.task-file-viewer{position:relative}.task-file-viewer img{max-width:95%;max-height:85%;margin-top:10px}.task-time-form{margin-top:10px;margin-bottom:25px;padding:3px}.task-link-closed{text-decoration:line-through}.task-show-images{list-style-type:none}.task-show-images li img{width:100%}.task-show-images li .img_container{width:250px;height:100px;overflow:hidden}.task-show-images li{padding:10px;overflow:auto;width:250px;min-height:120px;display:inline-block;vertical-align:top}.task-show-images li p{padding:5px;font-weight:bold}.task-show-images li:hover{background:#eee}.task-show-image-actions{margin-left:5px}.task-show-file-table{width:auto}.task-show-start-link{color:#000}.task-show-start-link:hover,.task-show-start-link:focus{color:red}.flag-milestone{color:green}.color-picker{min-height:35px}.color-square{display:inline-block;width:30px;height:30px;margin-right:5px;margin-bottom:5px;border:1px solid #000;cursor:pointer}.color-square:hover{border-style:dotted}div.color-square-selected{border-width:2px;width:28px;height:28px;box-shadow:3px 2px 10px 0 rgba(180,180,180,0.9)}.comment{margin-bottom:20px}.comment:hover{background:#f7f8e0}.comment-inner{border-left:4px solid #333;padding-bottom:10px;padding-left:20px;margin-left:20px;margin-right:10px}.comment-preview{border:2px solid #000;border-radius:3px;padding:10px}.comment-preview .comment-inner{border:0;padding:0;margin:0}.comment-title{margin-bottom:8px;padding-bottom:3px;border-bottom:1px dotted #aaa}.ui-tooltip .comment-title{font-size:80%}.ui-tooltip .comment-inner{padding-bottom:0}.comment-actions{font-size:.8em;padding:0;text-align:right}.comment-actions li{display:inline;padding-left:5px;padding-right:5px;border-right:1px dotted #000}.comment-actions li:last-child{padding-right:0;border:0}.comment-username{font-weight:bold}.comment-textarea{height:200px;width:80%;max-width:800px}.comment-sorting{font-size:.5em}span.comment-sorting a{color:#555;font-weight:normal;text-decoration:none}span.comment-sorting a:hover{color:#aaa}#comments .comment-textarea{height:80px;width:500px}.subtasks-table{font-size:.85em}.subtasks-table td{vertical-align:middle}.markdown{line-height:1.4em;font-size:1.0}.markdown h1{margin-top:5px;margin-bottom:10px;font-size:1.5em;font-weight:bold;text-decoration:underline}.markdown h2{font-size:1.2em;font-weight:bold;text-decoration:underline}.markdown h3{font-size:1.1em;text-decoration:underline}.markdown h4{font-size:1.1em;text-decoration:underline}.markdown p{margin-bottom:10px}.markdown ol,.markdown ul{margin-left:25px;margin-top:10px;margin-bottom:10px}.markdown pre{background:#fbfbfb;padding:10px;border-radius:5px;border:1px solid #ddd;overflow:auto;color:#444}.markdown blockquote{font-style:italic;border-left:3px solid #ddd;padding-left:10px;margin-bottom:10px;margin-left:20px}.markdown img{display:block;max-width:80%;margin-top:10px}.documentation{margin:0 auto;padding:20px;max-width:850px;background:#fefefe;border:1px solid #ccc;border-radius:5px;font-size:1.1em;color:#555}.documentation img{border:1px solid #333}.documentation h1{text-decoration:none;font-size:1.8em;margin-bottom:30px}.documentation h2{font-size:1.3em;text-decoration:none;border-bottom:1px solid #ccc;margin-bottom:25px}.documentation li{line-height:30px}.user-mention-link{font-weight:bold;color:#000;text-decoration:none}.user-mention-link:hover{color:#555}.listing{border-radius:4px;padding:8px 35px 8px 14px;margin-bottom:20px;border:1px solid #ddd;color:#333;background-color:#fefefe;overflow:auto}.listing li{list-style-type:square;margin-left:20px;margin-bottom:3px}.listing ul{margin-top:15px;margin-bottom:15px}.activity-event{margin-bottom:20px}.activity-datetime{color:#999;font-size:.85em}.activity-content{margin-top:10px;margin-left:20px;padding-left:20px;border-left:2px solid #666}.activity-title{font-weight:bold;color:#000}.activity-description{font-size:.9em;color:#aaa;padding-top:5px}.activity-description ul{margin-top:10px}.activity-description li{margin-left:40px;list-style-type:circle;color:#555}.activity-description .markdown{margin-top:10px;color:#555}.activity-changes{margin-top:10px;font-size:.85em}.activity-changes ul{margin-left:25px}.dashboard-project-stats span{font-size:.75em;margin-right:10px;color:#999}.dashboard-project-stats strong{font-size:1.2em}.dashboard-table-link{font-weight:bold;color:#444;text-decoration:none}.dashboard-table-link:focus,.dashboard-table-link:hover{color:#999}.pagination{text-align:center}.pagination-next{margin-left:5px}.pagination-previous{margin-right:5px}#popover-container{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);overflow:auto;z-index:100}#popover-content{position:absolute;width:70%;margin:0 0 0 -35%;left:50%;top:1%;padding:15px;background:#fff;overflow:auto;max-height:85%}#main .confirm{max-width:700px;font-size:1.1em}.sidebar-container{margin-top:10px;position:relative;clear:both}.sidebar-content{margin-left:23%;width:76%;position:absolute}.sidebar{width:20%;float:left;padding:10px;padding-top:0;border:1px solid #ddd;background:#fdfdfd;border-radius:5px}.sidebar li{list-style-type:square;margin-left:30px;line-height:1.8em}.sidebar li.active a{color:#000;font-weight:bold;text-decoration:none}.sidebar li.active a:focus,.sidebar li.active a:hover{text-decoration:underline}.sidebar-collapsed .sidebar{width:10px;padding-bottom:0;float:none}.sidebar-collapsed .sidebar-content{margin:0;margin-top:15px;width:100%}.sidebar-collapse{text-align:right}.sidebar-collapse a,.sidebar-expand a{color:#333;text-decoration:none}.sidebar-collapse a:hover,.sidebar-expand a:hover{color:#df5353}@media only screen and (max-width:1024px){.sidebar{width:25%}.sidebar-content{margin-left:30%;width:70%}}@media only screen and (max-width:767px){.sidebar{width:95%;float:none}.sidebar-content{margin:0;margin-top:15px;width:100%}}@media only screen and (max-width:1080px){div.filter-dropdowns .filters{margin-left:0}div.filter-dropdowns{display:block;margin-top:5px}}@media only screen and (max-width:1024px){body{font-size:.85em}.form-tab{max-width:404px}.form-inline-group input[type="submit"],.form-inline-group label{display:block}.form-inline-group input[type="submit"]{margin-top:20px}td>input[type="text"]{max-width:150px}.task-time-form label{display:block}.task-time-form input[type="submit"]{margin-top:10px;display:block}.page-header .form-input-large{width:300px}}@media only screen and (max-width:1024px) and (orientation:landscape){header{padding-bottom:4px}div.chosen-container{font-size:.9em}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]{height:18px}.page-header .form-input-large{width:300px}}@media only screen and (max-width:640px){.hide-mobile{display:none}}.dropdown{display:inline;position:relative}.dropdown ul{display:none}ul.dropdown-submenu-open{display:block;position:absolute;z-index:1000;min-width:285px;list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}.textarea-dropdown li,.dropdown-submenu-open li{display:block;margin:0;padding:0;padding-left:10px;padding-right:10px;padding-top:8px;padding-bottom:8px;font-size:.85em;border-bottom:1px solid #f8f8f8;cursor:pointer}.dropdown-submenu-open li.no-hover{cursor:default}.textarea-dropdown li:last-child,.dropdown-submenu-open li:last-child{border:0}.textarea-dropdown .active,.textarea-dropdown li:hover,.dropdown-submenu-open li:not(.no-hover):hover{background:#4078c0;color:#fff}.textarea-dropdown .active a,.textarea-dropdown li:hover a,.dropdown-submenu-open li:hover a{color:#fff}.textarea-dropdown a,.dropdown-submenu-open a{text-decoration:none;color:#333}.dropdown-submenu-open a:focus{text-decoration:underline}.page-header .dropdown{padding-right:10px}.dropdown-menu-link-icon{color:#333;text-decoration:none}.textarea-dropdown{list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}#screenshot-zone{position:relative;border:2px dashed #ccc;width:90%;height:250px;overflow:auto}#screenshot-inner{position:absolute;left:0;bottom:48%;width:100%;text-align:center}#screenshot-zone.screenshot-pasted{border:2px solid #333}.toolbar{font-size:.9em;padding-top:5px}.views{display:inline-block;margin-right:10px;font-size:.9em}.views li{border:1px solid #eee;padding-left:8px;padding-right:8px;padding-top:5px;padding-bottom:5px;display:inline}.menu-inline li.active a,.views li.active a{font-weight:bold;color:#000;text-decoration:none}.views li:first-child{border-right:0;border-top-left-radius:5px;border-bottom-left-radius:5px}.views li:last-child{border-left:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.filters{display:inline-block;border:1px solid #eee;border-radius:5px;padding:5px;padding-right:10px;margin-left:8px}.filters ul{font-size:.8em}.page-header .filters ul{font-size:.9em}form.search{display:inline}div.search{margin-bottom:20px}.filter-dropdowns{font-size:.9em;display:inline-block}div.ganttview-hzheader-month,div.ganttview-hzheader-day,div.ganttview-vtheader,div.ganttview-vtheader-item-name,div.ganttview-vtheader-series,div.ganttview-grid,div.ganttview-grid-row-cell{float:left}div.ganttview-hzheader-month,div.ganttview-hzheader-day{text-align:center}div.ganttview-grid-row-cell.last,div.ganttview-hzheader-day.last,div.ganttview-hzheader-month.last{border-right:0}div.ganttview{border:1px solid #999}div.ganttview-hzheader-month{width:60px;height:20px;border-right:1px solid #d0d0d0;line-height:20px;overflow:hidden}div.ganttview-hzheader-day{width:20px;height:20px;border-right:1px solid #f0f0f0;border-top:1px solid #d0d0d0;line-height:20px;color:#777}div.ganttview-vtheader{margin-top:41px;width:400px;overflow:hidden;background-color:#fff}div.ganttview-vtheader-item{color:#666}div.ganttview-vtheader-series-name{width:400px;height:31px;line-height:31px;padding-left:3px;border-top:1px solid #d0d0d0;font-size:.9em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}div.ganttview-vtheader-series-name a{color:#666;text-decoration:none}div.ganttview-vtheader-series-name a:hover{color:#333;text-decoration:underline}div.ganttview-vtheader-series-name a i{color:#000}div.ganttview-vtheader-series-name a:hover i{color:#666}div.ganttview-slide-container{overflow:auto;border-left:1px solid #999}div.ganttview-grid-row-cell{width:20px;height:31px;border-right:1px solid #f0f0f0;border-top:1px solid #f0f0f0}div.ganttview-grid-row-cell.ganttview-weekend{background-color:#fafafa}div.ganttview-blocks{margin-top:40px}div.ganttview-block-container{height:28px;padding-top:4px}div.ganttview-block{position:relative;height:25px;background-color:#e5ecf9;border:1px solid silver;border-radius:3px}.ganttview-block-movable{cursor:move}div.ganttview-block-not-defined{border-color:#000;background-color:#000}div.ganttview-block-text{position:absolute;height:12px;font-size:.7em;color:#999;padding:2px 3px}div.ganttview-block div.ui-resizable-handle.ui-resizable-s{bottom:-0} \ No newline at end of file +.c3 svg{font:10px sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-item-hidden{opacity:.15}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000}li,ul,ol,table,tr,td,th,p,blockquote,body{margin:0;padding:0;font-size:100%}body{margin-left:10px;margin-right:10px;padding-bottom:10px;color:#333;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility}.page{clear:both}ul.no-bullet li{list-style-type:none;margin-left:0}.pull-right{text-align:right}hr{border:0;height:0;border-top:1px solid rgba(0,0,0,0.1);border-bottom:1px solid rgba(255,255,255,0.3)}.chosen-select{min-height:27px}.avatar{float:left;margin-right:10px}#ui-datepicker-div{font-size:.8em}#app-loading-icon{position:fixed;right:3px;bottom:3px}.web-notification-icon{color:#36c}.web-notification-icon:focus,.web-notification-icon:hover{color:#000}a{color:#36c;border:0}a:focus{outline:0;color:#df5353;text-decoration:none;border:1px dotted #aaa}a:hover{color:#333;text-decoration:none}h1,h2,h3{font-weight:normal;color:#333}h2{font-size:1.3em;margin-bottom:10px}h3{margin-top:10px;font-size:1.2em}table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:20px;font-size:.95em}#calendar table{margin-bottom:0}th,td{border:1px solid #eee;padding-top:.5em;padding-bottom:.5em;padding-left:3px;padding-right:3px}td{vertical-align:top}th{background:#fbfbfb;text-align:left}td li{margin-left:20px}.table-small{font-size:.8em}th a{text-decoration:none;color:#333}th a:focus,th a:hover{text-decoration:underline}.table-fixed{table-layout:fixed;white-space:nowrap}.table-fixed th{overflow:hidden}.table-fixed td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-stripped tr:nth-child(odd) td{background:#fefefe}.column-3{width:3%}.column-5{width:5%}.column-8{width:7.5%}.column-10{width:10%}.column-12{width:12%}.column-15{width:15%}.column-18{width:18%}.column-20{width:20%}.column-25{width:25%}.column-30{width:30%}.column-35{width:35%}.column-40{width:40%}.column-50{width:50%}.column-60{width:60%}.column-70{width:70%}form{margin-bottom:20px}label{cursor:pointer;display:block;margin-top:10px}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]{color:#888;border:1px solid #ccc;width:300px;max-width:95%;font-size:100%;height:25px;padding-bottom:0;font-family:sans-serif;margin-top:10px;-webkit-appearance:none;appearance:none}input[type="number"]:focus,input[type="date"]:focus,input[type="email"]:focus,input[type="password"]:focus,input[type="text"]:focus,textarea:focus{color:#000;border-color:rgba(82,168,236,0.8);outline:0;box-shadow:0 0 8px rgba(82,168,236,0.6)}input.form-numeric,input[type="number"]{width:70px}textarea{border:1px solid #ccc;width:400px;max-width:99%;height:200px;font-size:100%;font-family:sans-serif}select{max-width:95%}select:focus{outline:0}::-webkit-input-placeholder{color:#ddd;padding-top:2px}::-ms-input-placeholder{color:#ddd;padding-top:2px}::-moz-placeholder{color:#ddd;padding-top:2px}.form-actions{padding-top:20px;clear:both}input.form-error,textarea.form-error{border:2px solid #b94a48}input.form-error:focus,textarea.form-error:focus{box-shadow:none;border:2px solid #b94a48}.form-required{color:red;padding-left:5px;font-weight:bold}.form-errors{color:#b94a48;list-style-type:none}ul.form-errors li{margin-left:0}.form-help{font-size:.8em;color:brown;margin-bottom:15px}.form-inline{padding:0;margin:0;border:0}.form-inline label{display:inline}.form-inline input,.form-inline select{margin:0;margin-right:15px}.form-inline .form-required{display:none}.form-inline-group{display:inline}input.form-datetime,input.form-date{width:150px}input.form-input-large{width:400px}.form-row{margin-top:10px;margin-bottom:20px}.form-column{float:left;margin-right:3%;max-width:47%}.form-column ul{margin-top:15px}.form-login{width:350px;margin:0 auto;margin-top:8%}.form-column li,.form-login li{margin-left:25px;line-height:25px}.form-login h2{margin-bottom:30px;font-size:1.5em;font-weight:bold}label+.form-tabs{margin-top:10px}.form-tabs{width:100%;max-width:800px}ul.form-tabs-nav{margin-bottom:8px;margin-top:0}.form-tabs-nav li{margin-left:0;display:inline}.form-tab{margin-right:20px}.form-tab a{color:#ccc;font-weight:bold;text-decoration:none}.form-tab a:focus,.form-tab a:hover{color:#000}.form-tab-selected a{color:#333}.preview-area{border:1px dashed #000;padding-top:5px;padding-left:5px;padding-right:5px;margin-bottom:5px;display:none;overflow:auto}.reset-password{margin-top:20px}.reset-password a{font-size:.8em;color:#999}.btn{-webkit-appearance:none;appearance:none;display:inline-block;color:#333;border:1px solid #ccc;background:#efefef;padding:5px;padding-left:15px;padding-right:15px;font-size:.9em;cursor:pointer;border-radius:2px}a.btn{text-decoration:none;font-weight:bold}.btn-small{padding:2px;padding-left:5px;padding-right:5px}.btn-red{border-color:#b0281a;background:#d14836;color:#fff}a.btn-red:hover,.btn-red:hover,.btn-red:focus{color:#fff;background:#c53727}a.btn-blue,.btn-blue{border-color:#3079ed;background:#4d90fe;color:#fff}a.btn-blue:hover,.btn-blue:hover,a.btn-blue:focus,.btn-blue:focus{border-color:#2f5bb7;background:#357ae8}.btn-blue:disabled{color:#ccc;border:1px solid #ccc;background:#f7f7f7}#main .alert,.page .alert{margin-top:10px}.alert{padding:8px 35px 8px 14px;margin-bottom:10px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-normal{color:#333;background-color:#f0f0f0;border-color:#ddd}.alert ul{margin-top:10px;margin-bottom:10px}.alert li{margin-left:25px}.tooltip-arrow:after{background:#fff;border:1px solid #aaa;box-shadow:0 0 5px #aaa}div.ui-tooltip{min-width:200px;max-width:600px;font-size:.85em}.tooltip-arrow{width:20px;height:10px;overflow:hidden;position:absolute}.tooltip-arrow.top{top:-10px}.tooltip-arrow.bottom{bottom:-10px}.tooltip-arrow.align-left{left:10px}.tooltip-arrow.align-right{right:10px}.tooltip-arrow:after{content:"";position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.tooltip-arrow.bottom:after{top:-10px}.tooltip-arrow.top:after{bottom:-10px}.tooltip-arrow.align-left:after{left:0}.tooltip-arrow.align-right:after{right:0}.tooltip-large{width:550px}.ui-tooltip-content .markdown p{margin-bottom:0}.tooltip .fa-info-circle{color:#999;font-size:.95em}.ui-tooltip ul{margin-left:20px}header{margin-top:10px;padding-bottom:10px;border-bottom:1px solid #dedede}header h1{margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70%;float:left}header ul{text-align:right;font-size:.9em}header li{display:inline;padding-left:30px}header a{color:#777;text-decoration:none}nav .active a{color:#333;font-weight:bold}.logo a{opacity:.5;color:#d40000}.logo span{color:#333}.logo a:hover{opacity:.8;color:#333}.logo a:focus span,.logo a:hover span{color:#d40000}header h1 .tooltip{opacity:.3;font-size:.6em}.page-header{margin-bottom:20px}.page-header h2{margin:0;padding:0;font-size:1.4em;font-weight:bold;border-bottom:1px dotted #ccc}.page-header h2 a{color:#333;text-decoration:none}.page-header h2 a:focus,.page-header h2 a:hover{color:#aaa}.page-header ul{text-align:left;margin-top:5px;display:inline-block}.menu-inline li,.page-header li{display:inline;padding-right:10px;font-size:.95em}.menu-inline{margin-bottom:5px}@media only screen and (max-width:640px){.page-header-mobile li{display:block;margin-bottom:5px}}.public-board{margin-top:5px}.public-task{max-width:800px;margin:0 auto;margin-top:5px}#board-container{overflow-x:auto}#board{table-layout:fixed;margin-bottom:0}#board th.board-column-header{width:240px}#board td{vertical-align:top}.board-container-compact{overflow-x:initial}@media all and (-ms-high-contrast:active),(-ms-high-contrast:none){.board-container-compact #board{table-layout:auto}}#board th.board-column-header.board-column-compact{width:initial}.board-column-collapsed{display:none}td.board-column-task-collapsed{font-weight:bold;background-color:#fbfbfb}#board th.board-column-header-collapsed{width:28px;min-width:28px;text-align:center;overflow:hidden}.board-rotation-wrapper{position:relative;padding:8px 4px;min-height:150px;overflow:hidden}.board-rotation{white-space:nowrap;-webkit-backface-visibility:hidden;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%}.board-column-title .dropdown-menu{text-decoration:none}.board-add-icon{float:left;padding:0 5px}.board-add-icon a{text-decoration:none;color:#36c;font-size:150%;line-height:70%}.board-add-icon a:focus,.board-add-icon a:hover{text-decoration:none;color:red}.board-column-header-task-count{color:#999;font-weight:normal}th.board-column-header-collapsed .board-column-header-task-count{font-size:.85em}a.board-swimlane-toggle{font-size:.95em;text-decoration:none}a.board-swimlane-toggle:hover,a.board-swimlane-toggle:focus{color:#000;text-decoration:none;border:0}.board-task-list{overflow:auto;min-height:60px}.board-task-list-limit{background-color:#df5353}.draggable-item{cursor:pointer;user-select:none}.draggable-placeholder{border:2px dashed #000;background:#fafafa;height:70px;margin-bottom:10px}div.draggable-item-selected{border:1px solid #000}.task-board-sort-handle{float:left;padding-right:5px}.task-board-saving-state{opacity:.3}.task-board-saving-icon{position:absolute;margin:auto;width:100%;text-align:center;color:#000}.task-board{position:relative;margin-bottom:4px;border:1px solid #000;padding:2px;font-size:.85em;word-wrap:break-word}div.task-board-recent{box-shadow:2px 2px 3px rgba(0,0,0,0.2)}div.task-board-status-closed{user-select:none;border:1px dotted #555}.task-table a,.task-board a{color:#000;text-decoration:none;font-weight:bold}.task-table a:focus,.task-table a:hover,.task-board a:focus,.task-board a:hover{text-decoration:underline}.task-board-collapsed{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}a.task-board-collapsed-title{font-weight:normal}.task-board .dropdown{font-size:1.1em}.task-board-title{margin-top:5px;margin-bottom:5px;font-size:1.1em}.task-board-title a{font-weight:normal}.task-board-user{font-size:.8em}.task-board-current-user a{text-decoration:underline}.task-board-current-user a:focus,.task-board-current-user a:hover{text-decoration:none}a.task-board-nobody{font-weight:normal;font-style:italic;color:#444}.task-board-category-container{text-align:right}.task-board-category{font-weight:bold;font-size:.9em;color:#000;border:1px solid #555;padding:2px;padding-right:5px;padding-left:5px}.task-board-icons{text-align:right;margin-top:8px}.task-board-icons a{opacity:.5}.task-board-icons span{opacity:.5;margin-left:2px}.task-board-icons a:hover,.task-board-icons span:hover{opacity:1.0}.task-board-date{font-weight:bold;color:#000}span.task-board-date-overdue{color:#d90000;opacity:1.0}.task-score{font-weight:bold}.task-board .task-score{font-size:1.1em}.task-show-details .task-score{position:absolute;bottom:5px;right:5px;font-size:2em}.task-board-closed,.task-board-days{position:absolute;right:5px;top:5px;opacity:.5;font-size:.8em}.task-board-days:hover{opacity:1.0}.task-days-age{border:#666 1px solid;padding:1px 4px 1px 2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.task-days-incolumn{border:#666 1px solid;border-left:0;margin-left:-5px;padding:1px 2px 1px 4px;border-top-right-radius:3px;border-bottom-right-radius:3px}.board-container-compact .task-board-days{display:none}.task-show-details{position:relative;border-radius:5px;padding-bottom:10px}.task-show-details h2{font-size:1.8em;margin:0;margin-bottom:25px;padding:0;padding-left:10px;padding-right:10px}.task-show-details li{margin-left:25px;list-style-type:circle}.task-show-section{margin-top:30px;margin-bottom:20px}.task-show-files a{font-weight:bold;text-decoration:none}.task-show-files li{margin-left:25px;list-style-type:square;line-height:25px}.task-show-file-actions{font-size:.75em}.task-show-file-actions:before{content:" ["}.task-show-file-actions:after{content:"]"}.task-show-file-actions a{color:#333}.task-show-description{border-left:4px solid #333;padding-left:20px}.task-show-description-textarea{width:99%;max-width:99%;height:300px}.task-file-viewer{position:relative}.task-file-viewer img{max-width:95%;max-height:85%;margin-top:10px}.task-time-form{margin-top:10px;margin-bottom:25px;padding:3px}.task-link-closed{text-decoration:line-through}.task-show-images{list-style-type:none}.task-show-images li img{width:100%}.task-show-images li .img_container{width:250px;height:100px;overflow:hidden}.task-show-images li{padding:10px;overflow:auto;width:250px;min-height:120px;display:inline-block;vertical-align:top}.task-show-images li p{padding:5px;font-weight:bold}.task-show-images li:hover{background:#eee}.task-show-image-actions{margin-left:5px}.task-show-file-table{width:auto}.task-show-start-link{color:#000}.task-show-start-link:hover,.task-show-start-link:focus{color:red}.flag-milestone{color:green}.color-picker{min-height:35px}.color-square{display:inline-block;width:30px;height:30px;margin-right:5px;margin-bottom:5px;border:1px solid #000;cursor:pointer}.color-square:hover{border-style:dotted}div.color-square-selected{border-width:2px;width:28px;height:28px;box-shadow:3px 2px 10px 0 rgba(180,180,180,0.9)}.comment{margin-bottom:20px}.comment:hover{background:#f7f8e0}.comment-inner{border-left:4px solid #333;padding-bottom:10px;padding-left:20px;margin-left:20px;margin-right:10px}.comment-preview{border:2px solid #000;border-radius:3px;padding:10px}.comment-preview .comment-inner{border:0;padding:0;margin:0}.comment-title{margin-bottom:8px;padding-bottom:3px;border-bottom:1px dotted #aaa}.ui-tooltip .comment-title{font-size:80%}.ui-tooltip .comment-inner{padding-bottom:0}.comment-actions{font-size:.8em;padding:0;text-align:right}.comment-actions li{display:inline;padding-left:5px;padding-right:5px;border-right:1px dotted #000}.comment-actions li:last-child{padding-right:0;border:0}.comment-username{font-weight:bold}.comment-textarea{height:200px;width:80%;max-width:800px}.comment-sorting{font-size:.5em}span.comment-sorting a{color:#555;font-weight:normal;text-decoration:none}span.comment-sorting a:hover{color:#aaa}#comments .comment-textarea{height:80px;width:500px}.subtasks-table{font-size:.85em}.subtasks-table td{vertical-align:middle}.markdown{line-height:1.4em;font-size:1.0}.markdown h1{margin-top:5px;margin-bottom:10px;font-size:1.5em;font-weight:bold;text-decoration:underline}.markdown h2{font-size:1.2em;font-weight:bold;text-decoration:underline}.markdown h3{font-size:1.1em;text-decoration:underline}.markdown h4{font-size:1.1em;text-decoration:underline}.markdown p{margin-bottom:10px}.markdown ol,.markdown ul{margin-left:25px;margin-top:10px;margin-bottom:10px}.markdown pre{background:#fbfbfb;padding:10px;border-radius:5px;border:1px solid #ddd;overflow:auto;color:#444}.markdown blockquote{font-style:italic;border-left:3px solid #ddd;padding-left:10px;margin-bottom:10px;margin-left:20px}.markdown img{display:block;max-width:80%;margin-top:10px}.documentation{margin:0 auto;padding:20px;max-width:850px;background:#fefefe;border:1px solid #ccc;border-radius:5px;font-size:1.1em;color:#555}.documentation img{border:1px solid #333}.documentation h1{text-decoration:none;font-size:1.8em;margin-bottom:30px}.documentation h2{font-size:1.3em;text-decoration:none;border-bottom:1px solid #ccc;margin-bottom:25px}.documentation li{line-height:30px}.user-mention-link{font-weight:bold;color:#000;text-decoration:none}.user-mention-link:hover{color:#555}.listing{border-radius:4px;padding:8px 35px 8px 14px;margin-bottom:20px;border:1px solid #ddd;color:#333;background-color:#fefefe;overflow:auto}.listing li{list-style-type:square;margin-left:20px;margin-bottom:3px}.listing ul{margin-top:15px;margin-bottom:15px}.activity-event{margin-bottom:20px}.activity-datetime{color:#999;font-size:.85em}.activity-content{margin-top:10px;margin-left:20px;padding-left:20px;border-left:2px solid #666}.activity-title{font-weight:bold;color:#000}.activity-description{font-size:.9em;color:#aaa;padding-top:5px}.activity-description ul{margin-top:10px}.activity-description li{margin-left:40px;list-style-type:circle;color:#555}.activity-description .markdown{margin-top:10px;color:#555}.activity-changes{margin-top:10px;font-size:.85em}.activity-changes ul{margin-left:25px}.dashboard-project-stats span{font-size:.75em;margin-right:10px;color:#999}.dashboard-project-stats strong{font-size:1.2em}.dashboard-table-link{font-weight:bold;color:#444;text-decoration:none}.dashboard-table-link:focus,.dashboard-table-link:hover{color:#999}.pagination{text-align:center}.pagination-next{margin-left:5px}.pagination-previous{margin-right:5px}#popover-container{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);overflow:auto;z-index:100}#popover-content{position:absolute;width:70%;margin:0 0 0 -35%;left:50%;top:1%;padding:15px;background:#fff;overflow:auto;max-height:85%}#main .confirm{max-width:700px;font-size:1.1em}.sidebar-container{margin-top:10px;position:relative;clear:both}.sidebar-content{margin-left:23%;width:76%;position:absolute}.sidebar{width:20%;float:left;padding:10px;padding-top:0;border:1px solid #ddd;background:#fdfdfd;border-radius:5px}.sidebar li{list-style-type:square;margin-left:30px;line-height:1.8em}.sidebar li.active a{color:#000;font-weight:bold;text-decoration:none}.sidebar li.active a:focus,.sidebar li.active a:hover{text-decoration:underline}.sidebar-collapsed .sidebar{width:10px;padding-bottom:0;float:none}.sidebar-collapsed .sidebar-content{margin:0;margin-top:15px;width:100%}.sidebar-collapse{text-align:right}.sidebar-collapse a,.sidebar-expand a{color:#333;text-decoration:none}.sidebar-collapse a:hover,.sidebar-expand a:hover{color:#df5353}@media only screen and (max-width:1024px){.sidebar{width:25%}.sidebar-content{margin-left:30%;width:70%}}@media only screen and (max-width:767px){.sidebar{width:95%;float:none}.sidebar-content{margin:0;margin-top:15px;width:100%}}@media only screen and (max-width:1080px){div.filter-dropdowns .filters{margin-left:0}div.filter-dropdowns{display:block;margin-top:5px}}@media only screen and (max-width:1024px){body{font-size:.85em}.form-tab{max-width:404px}.form-inline-group input[type="submit"],.form-inline-group label{display:block}.form-inline-group input[type="submit"]{margin-top:20px}td>input[type="text"]{max-width:150px}.task-time-form label{display:block}.task-time-form input[type="submit"]{margin-top:10px;display:block}.page-header .form-input-large{width:300px}}@media only screen and (max-width:1024px) and (orientation:landscape){header{padding-bottom:4px}div.chosen-container{font-size:.9em}input[type="number"],input[type="date"],input[type="email"],input[type="password"],input[type="text"]{height:18px}.page-header .form-input-large{width:300px}}@media only screen and (max-width:640px){.hide-mobile{display:none}}.dropdown{display:inline;position:relative}.dropdown ul{display:none}ul.dropdown-submenu-open{display:block;position:absolute;z-index:1000;min-width:285px;list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}.textarea-dropdown li,.dropdown-submenu-open li{display:block;margin:0;padding:0;padding-left:10px;padding-right:10px;padding-top:8px;padding-bottom:8px;font-size:.85em;border-bottom:1px solid #f8f8f8;cursor:pointer}.dropdown-submenu-open li.no-hover{cursor:default}.textarea-dropdown li:last-child,.dropdown-submenu-open li:last-child{border:0}.textarea-dropdown .active,.textarea-dropdown li:hover,.dropdown-submenu-open li:not(.no-hover):hover{background:#4078c0;color:#fff}.textarea-dropdown .active a,.textarea-dropdown li:hover a,.dropdown-submenu-open li:hover a{color:#fff}.textarea-dropdown a,.dropdown-submenu-open a{text-decoration:none;color:#333}.dropdown-submenu-open a:focus{text-decoration:underline}.page-header .dropdown{padding-right:10px}.dropdown-menu-link-icon{color:#333;text-decoration:none}.textarea-dropdown{list-style:none;margin:3px 0 0 1px;padding:6px 0;background-color:#fff;border:1px solid #b2b2b2;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,0.15)}#screenshot-zone{position:relative;border:2px dashed #ccc;width:90%;height:250px;overflow:auto}#screenshot-inner{position:absolute;left:0;bottom:48%;width:100%;text-align:center}#screenshot-zone.screenshot-pasted{border:2px solid #333}.toolbar{font-size:.9em;padding-top:5px}.views{display:inline-block;margin-right:10px;font-size:.9em}.views li{border:1px solid #eee;padding-left:8px;padding-right:8px;padding-top:5px;padding-bottom:5px;display:inline}.menu-inline li.active a,.views li.active a{font-weight:bold;color:#000;text-decoration:none}.views li:first-child{border-right:0;border-top-left-radius:5px;border-bottom-left-radius:5px}.views li:last-child{border-left:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.filters{display:inline-block;border:1px solid #eee;border-radius:5px;padding:5px;padding-right:10px;margin-left:8px}.filters ul{font-size:.8em}.page-header .filters ul{font-size:.9em}form.search{display:inline}div.search{margin-bottom:20px}.filter-dropdowns{font-size:.9em;display:inline-block}div.ganttview-hzheader-month,div.ganttview-hzheader-day,div.ganttview-vtheader,div.ganttview-vtheader-item-name,div.ganttview-vtheader-series,div.ganttview-grid,div.ganttview-grid-row-cell{float:left}div.ganttview-hzheader-month,div.ganttview-hzheader-day{text-align:center}div.ganttview-grid-row-cell.last,div.ganttview-hzheader-day.last,div.ganttview-hzheader-month.last{border-right:0}div.ganttview{border:1px solid #999}div.ganttview-hzheader-month{width:60px;height:20px;border-right:1px solid #d0d0d0;line-height:20px;overflow:hidden}div.ganttview-hzheader-day{width:20px;height:20px;border-right:1px solid #f0f0f0;border-top:1px solid #d0d0d0;line-height:20px;color:#777}div.ganttview-vtheader{margin-top:41px;width:400px;overflow:hidden;background-color:#fff}div.ganttview-vtheader-item{color:#666}div.ganttview-vtheader-series-name{width:400px;height:31px;line-height:31px;padding-left:3px;border-top:1px solid #d0d0d0;font-size:.9em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}div.ganttview-vtheader-series-name a{color:#666;text-decoration:none}div.ganttview-vtheader-series-name a:hover{color:#333;text-decoration:underline}div.ganttview-vtheader-series-name a i{color:#000}div.ganttview-vtheader-series-name a:hover i{color:#666}div.ganttview-slide-container{overflow:auto;border-left:1px solid #999}div.ganttview-grid-row-cell{width:20px;height:31px;border-right:1px solid #f0f0f0;border-top:1px solid #f0f0f0}div.ganttview-grid-row-cell.ganttview-weekend{background-color:#fafafa}div.ganttview-blocks{margin-top:40px}div.ganttview-block-container{height:28px;padding-top:4px}div.ganttview-block{position:relative;height:25px;background-color:#e5ecf9;border:1px solid silver;border-radius:3px}.ganttview-block-movable{cursor:move}div.ganttview-block-not-defined{border-color:#000;background-color:#000}div.ganttview-block-text{position:absolute;height:12px;font-size:.7em;color:#999;padding:2px 3px}div.ganttview-block div.ui-resizable-handle.ui-resizable-s{bottom:-0} \ No newline at end of file diff --git a/assets/css/src/header.css b/assets/css/src/header.css index 26573f89..188fc4b5 100644 --- a/assets/css/src/header.css +++ b/assets/css/src/header.css @@ -55,6 +55,12 @@ nav .active a { color: #d40000; } +/* title tooltip */ +header h1 .tooltip { + opacity: 0.3; + font-size: 0.6em; +} + /* page header */ .page-header { margin-bottom: 20px; diff --git a/tests/units/Model/ProjectTest.php b/tests/units/Model/ProjectTest.php index 1b3d5be3..afd047b0 100644 --- a/tests/units/Model/ProjectTest.php +++ b/tests/units/Model/ProjectTest.php @@ -281,4 +281,28 @@ class ProjectTest extends Base $project = $p->getByIdentifier(''); $this->assertFalse($project); } + + public function testThatProjectCreatorAreAlsoOwner() + { + $projectModel = new Project($this->container); + $userModel = new User($this->container); + + $this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'Me'))); + $this->assertEquals(1, $projectModel->create(array('name' => 'My project 1'), 2)); + $this->assertEquals(2, $projectModel->create(array('name' => 'My project 2'))); + + $project = $projectModel->getByIdWithOwner(1); + $this->assertNotEmpty($project); + $this->assertSame('My project 1', $project['name']); + $this->assertSame('Me', $project['owner_name']); + $this->assertSame('user1', $project['owner_username']); + $this->assertEquals(2, $project['owner_id']); + + $project = $projectModel->getByIdWithOwner(2); + $this->assertNotEmpty($project); + $this->assertSame('My project 2', $project['name']); + $this->assertEquals('', $project['owner_name']); + $this->assertEquals('', $project['owner_username']); + $this->assertEquals(0, $project['owner_id']); + } } -- cgit v1.2.3 From 26492aba7ee2bfb8c525ea0aaa580aff47a414ba Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 31 Jan 2016 21:44:49 -0500 Subject: Simplify layout and templates generation --- ChangeLog | 1 + app/Controller/Action.php | 8 +- app/Controller/Activity.php | 5 +- app/Controller/Analytic.php | 29 ++----- app/Controller/App.php | 30 ++------ app/Controller/Auth.php | 2 +- app/Controller/Base.php | 46 +----------- app/Controller/Board.php | 4 +- app/Controller/Calendar.php | 2 +- app/Controller/Category.php | 6 +- app/Controller/Column.php | 6 +- app/Controller/Comment.php | 6 +- app/Controller/Config.php | 36 +++------ app/Controller/Currency.php | 18 +---- app/Controller/Customfilter.php | 4 +- app/Controller/Doc.php | 4 +- app/Controller/Export.php | 2 +- app/Controller/File.php | 6 +- app/Controller/Gantt.php | 5 +- app/Controller/Group.php | 19 ++--- app/Controller/Link.php | 22 +----- app/Controller/Listing.php | 2 +- app/Controller/Oauth.php | 2 +- app/Controller/PasswordReset.php | 4 +- app/Controller/Project.php | 19 +++-- app/Controller/ProjectEdit.php | 2 +- app/Controller/ProjectPermission.php | 2 +- app/Controller/Projectuser.php | 21 +----- app/Controller/Search.php | 3 +- app/Controller/Subtask.php | 6 +- app/Controller/Swimlane.php | 6 +- app/Controller/Task.php | 12 +-- app/Controller/TaskExternalLink.php | 10 +-- app/Controller/TaskImport.php | 2 +- app/Controller/Taskduplication.php | 4 +- app/Controller/Tasklink.php | 8 +- app/Controller/Taskmodification.php | 6 +- app/Controller/Taskstatus.php | 2 +- app/Controller/Twofactor.php | 8 +- app/Controller/User.php | 56 ++++---------- app/Controller/UserImport.php | 2 +- app/Helper/Layout.php | 141 ++++++++++++++++++++++++++++++++++- app/Template/analytic/layout.php | 2 +- app/Template/app/layout.php | 2 +- app/Template/config/layout.php | 4 +- app/Template/config/sidebar.php | 3 - app/Template/project/layout.php | 2 +- app/Template/project_user/layout.php | 2 +- app/Template/task/details.php | 2 +- app/Template/task/layout.php | 4 +- app/Template/user/layout.php | 2 +- 51 files changed, 282 insertions(+), 320 deletions(-) (limited to 'app/Controller/Projectuser.php') diff --git a/ChangeLog b/ChangeLog index 0345e020..3fa18d9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ Improvements: * Have a new task assigned to the creator by default instead of "no assignee" * Show progress for task links in board tooltips * Simplify code to handle ajax popover and redirects +* Simplify layout and templates generation * Move task form elements to Task helper Version 1.0.24 diff --git a/app/Controller/Action.php b/app/Controller/Action.php index 645b53b7..482a210b 100644 --- a/app/Controller/Action.php +++ b/app/Controller/Action.php @@ -20,7 +20,7 @@ class Action extends Base $project = $this->getProject(); $actions = $this->action->getAllByProject($project['id']); - $this->response->html($this->projectLayout('action/index', array( + $this->response->html($this->helper->layout->project('action/index', array( 'values' => array('project_id' => $project['id']), 'project' => $project, 'actions' => $actions, @@ -51,7 +51,7 @@ class Action extends Base $this->response->redirect($this->helper->url->to('action', 'index', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('action/event', array( + $this->response->html($this->helper->layout->project('action/event', array( 'values' => $values, 'project' => $project, 'events' => $this->actionManager->getCompatibleEvents($values['action_name']), @@ -83,7 +83,7 @@ class Action extends Base $projects_list = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); unset($projects_list[$project['id']]); - $this->response->html($this->projectLayout('action/params', array( + $this->response->html($this->helper->layout->project('action/params', array( 'values' => $values, 'action_params' => $action_params, 'columns_list' => $this->board->getColumnsList($project['id']), @@ -138,7 +138,7 @@ class Action extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('action/remove', array( + $this->response->html($this->helper->layout->project('action/remove', array( 'action' => $this->action->getById($this->request->getIntegerParam('action_id')), 'available_events' => $this->eventManager->getAll(), 'available_actions' => $this->actionManager->getAvailableActions(), diff --git a/app/Controller/Activity.php b/app/Controller/Activity.php index 38658345..db520ebe 100644 --- a/app/Controller/Activity.php +++ b/app/Controller/Activity.php @@ -19,8 +19,7 @@ class Activity extends Base { $project = $this->getProject(); - $this->response->html($this->template->layout('activity/project', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('activity/project', array( 'events' => $this->projectActivity->getProject($project['id']), 'project' => $project, 'title' => t('%s\'s activity', $project['name']) @@ -36,7 +35,7 @@ class Activity extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('activity/task', array( + $this->response->html($this->helper->layout->task('activity/task', array( 'title' => $task['title'], 'task' => $task, 'events' => $this->projectActivity->getTask($task['id']), diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php index d203fb8e..e7ab9ebc 100644 --- a/app/Controller/Analytic.php +++ b/app/Controller/Analytic.php @@ -1,6 +1,7 @@ projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['content_for_sublayout'] = $this->template->render($template, $params); - - return $this->template->layout('analytic/layout', $params); - } - /** * Show average Lead and Cycle time * @@ -37,7 +22,7 @@ class Analytic extends Base $project = $this->getProject(); list($from, $to) = $this->getDates(); - $this->response->html($this->layout('analytic/lead_cycle_time', array( + $this->response->html($this->helper->layout->analytic('analytic/lead_cycle_time', array( 'values' => array( 'from' => $from, 'to' => $to, @@ -69,7 +54,7 @@ class Analytic extends Base ->setQuery($query) ->calculate(); - $this->response->html($this->layout('analytic/compare_hours', array( + $this->response->html($this->helper->layout->analytic('analytic/compare_hours', array( 'project' => $project, 'paginator' => $paginator, 'metrics' => $this->estimatedTimeComparisonAnalytic->build($project['id']), @@ -86,7 +71,7 @@ class Analytic extends Base { $project = $this->getProject(); - $this->response->html($this->layout('analytic/avg_time_columns', array( + $this->response->html($this->helper->layout->analytic('analytic/avg_time_columns', array( 'project' => $project, 'metrics' => $this->averageTimeSpentColumnAnalytic->build($project['id']), 'title' => t('Average time spent into each column for "%s"', $project['name']), @@ -102,7 +87,7 @@ class Analytic extends Base { $project = $this->getProject(); - $this->response->html($this->layout('analytic/tasks', array( + $this->response->html($this->helper->layout->analytic('analytic/tasks', array( 'project' => $project, 'metrics' => $this->taskDistributionAnalytic->build($project['id']), 'title' => t('Task repartition for "%s"', $project['name']), @@ -118,7 +103,7 @@ class Analytic extends Base { $project = $this->getProject(); - $this->response->html($this->layout('analytic/users', array( + $this->response->html($this->helper->layout->analytic('analytic/users', array( 'project' => $project, 'metrics' => $this->userDistributionAnalytic->build($project['id']), 'title' => t('User repartition for "%s"', $project['name']), @@ -160,7 +145,7 @@ class Analytic extends Base $display_graph = $this->projectDailyColumnStats->countDays($project['id'], $from, $to) >= 2; - $this->response->html($this->layout($template, array( + $this->response->html($this->helper->layout->analytic($template, array( 'values' => array( 'from' => $from, 'to' => $to, diff --git a/app/Controller/App.php b/app/Controller/App.php index bdd7fbcf..1ce74506 100644 --- a/app/Controller/App.php +++ b/app/Controller/App.php @@ -12,22 +12,6 @@ use Kanboard\Model\Subtask as SubtaskModel; */ class App extends Base { - /** - * Common layout for dashboard views - * - * @access private - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - private function layout($template, array $params) - { - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['content_for_sublayout'] = $this->template->render($template, $params); - - return $this->template->layout('app/layout', $params); - } - /** * Get project pagination * @@ -101,7 +85,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/overview', array( + $this->response->html($this->helper->layout->dashboard('app/overview', array( 'title' => t('Dashboard'), 'project_paginator' => $this->getProjectPaginator($user['id'], 'index', 10), 'task_paginator' => $this->getTaskPaginator($user['id'], 'index', 10), @@ -119,7 +103,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/tasks', array( + $this->response->html($this->helper->layout->dashboard('app/tasks', array( 'title' => t('My tasks'), 'paginator' => $this->getTaskPaginator($user['id'], 'tasks', 50), 'user' => $user, @@ -135,7 +119,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/subtasks', array( + $this->response->html($this->helper->layout->dashboard('app/subtasks', array( 'title' => t('My subtasks'), 'paginator' => $this->getSubtaskPaginator($user['id'], 'subtasks', 50), 'user' => $user, @@ -151,7 +135,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/projects', array( + $this->response->html($this->helper->layout->dashboard('app/projects', array( 'title' => t('My projects'), 'paginator' => $this->getProjectPaginator($user['id'], 'projects', 25), 'user' => $user, @@ -167,7 +151,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/activity', array( + $this->response->html($this->helper->layout->dashboard('app/activity', array( 'title' => t('My activity stream'), 'events' => $this->projectActivity->getProjects($this->projectPermission->getActiveProjectIds($user['id']), 100), 'user' => $user, @@ -181,7 +165,7 @@ class App extends Base */ public function calendar() { - $this->response->html($this->layout('app/calendar', array( + $this->response->html($this->helper->layout->dashboard('app/calendar', array( 'title' => t('My calendar'), 'user' => $this->getUser(), ))); @@ -196,7 +180,7 @@ class App extends Base { $user = $this->getUser(); - $this->response->html($this->layout('app/notifications', array( + $this->response->html($this->helper->layout->dashboard('app/notifications', array( 'title' => t('My notifications'), 'notifications' => $this->userUnreadNotification->getAll($user['id']), 'user' => $user, diff --git a/app/Controller/Auth.php b/app/Controller/Auth.php index 5284e126..fef7f0e3 100644 --- a/app/Controller/Auth.php +++ b/app/Controller/Auth.php @@ -21,7 +21,7 @@ class Auth extends Base $this->response->redirect($this->helper->url->to('app', 'index')); } - $this->response->html($this->template->layout('auth/index', array( + $this->response->html($this->helper->layout->app('auth/index', array( 'captcha' => ! empty($values['username']) && $this->userLocking->hasCaptcha($values['username']), 'errors' => $errors, 'values' => $values, diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 0939f44c..a80b3528 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -131,7 +131,7 @@ abstract class Base extends \Kanboard\Core\Base */ protected function notfound($no_layout = false) { - $this->response->html($this->template->layout('app/notfound', array( + $this->response->html($this->helper->layout->app('app/notfound', array( 'title' => t('Page not found'), 'no_layout' => $no_layout, ))); @@ -149,7 +149,7 @@ abstract class Base extends \Kanboard\Core\Base $this->response->text('Access Forbidden', 403); } - $this->response->html($this->template->layout('app/forbidden', array( + $this->response->html($this->helper->layout->app('app/forbidden', array( 'title' => t('Access Forbidden'), 'no_layout' => $no_layout, ))); @@ -179,48 +179,6 @@ abstract class Base extends \Kanboard\Core\Base } } - /** - * Common layout for task views - * - * @access protected - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - protected function taskLayout($template, array $params) - { - $content = $this->template->render($template, $params); - - if ($this->request->isAjax()) { - return $content; - } - - $params['title'] = $params['task']['project_name'].' > '.$params['task']['title']; - $params['task_content_for_layout'] = $content; - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - - return $this->template->layout('task/layout', $params); - } - - /** - * Common layout for project views - * - * @access protected - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - protected function projectLayout($template, array $params, $sidebar_template = 'project/sidebar') - { - $content = $this->template->render($template, $params); - $params['project_content_for_layout'] = $content; - $params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'].' > '.$params['title']; - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['sidebar_template'] = $sidebar_template; - - return $this->template->layout('project/layout', $params); - } - /** * Common method to get a task for task views * diff --git a/app/Controller/Board.php b/app/Controller/Board.php index f64de69a..199f1703 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -27,7 +27,7 @@ class Board extends Base } // Display the board with a specific layout - $this->response->html($this->template->layout('board/view_public', array( + $this->response->html($this->helper->layout->app('board/view_public', array( 'project' => $project, 'swimlanes' => $this->board->getBoard($project['id']), 'title' => $project['name'], @@ -49,7 +49,7 @@ class Board extends Base { $params = $this->getProjectFilters('board', 'show'); - $this->response->html($this->template->layout('board/view_private', array( + $this->response->html($this->helper->layout->app('board/view_private', array( 'categories_list' => $this->category->getList($params['project']['id'], false), 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false), 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()), diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php index 67a402d3..a0a25e41 100644 --- a/app/Controller/Calendar.php +++ b/app/Controller/Calendar.php @@ -20,7 +20,7 @@ class Calendar extends Base */ public function show() { - $this->response->html($this->template->layout('calendar/show', array( + $this->response->html($this->helper->layout->app('calendar/show', array( 'check_interval' => $this->config->get('board_private_refresh_interval'), ) + $this->getProjectFilters('calendar', 'show'))); } diff --git a/app/Controller/Category.php b/app/Controller/Category.php index a0af4139..258a3b78 100644 --- a/app/Controller/Category.php +++ b/app/Controller/Category.php @@ -38,7 +38,7 @@ class Category extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('category/index', array( + $this->response->html($this->helper->layout->project('category/index', array( 'categories' => $this->category->getList($project['id'], false), 'values' => $values + array('project_id' => $project['id']), 'errors' => $errors, @@ -81,7 +81,7 @@ class Category extends Base $project = $this->getProject(); $category = $this->getCategory($project['id']); - $this->response->html($this->projectLayout('category/edit', array( + $this->response->html($this->helper->layout->project('category/edit', array( 'values' => empty($values) ? $category : $values, 'errors' => $errors, 'project' => $project, @@ -123,7 +123,7 @@ class Category extends Base $project = $this->getProject(); $category = $this->getCategory($project['id']); - $this->response->html($this->projectLayout('category/remove', array( + $this->response->html($this->helper->layout->project('category/remove', array( 'project' => $project, 'category' => $category, 'title' => t('Remove a category') diff --git a/app/Controller/Column.php b/app/Controller/Column.php index 1ce575d7..3201c549 100644 --- a/app/Controller/Column.php +++ b/app/Controller/Column.php @@ -26,7 +26,7 @@ class Column extends Base $values['task_limit['.$column['id'].']'] = $column['task_limit'] ?: null; } - $this->response->html($this->projectLayout('column/index', array( + $this->response->html($this->helper->layout->project('column/index', array( 'errors' => $errors, 'values' => $values + array('project_id' => $project['id']), 'columns' => $columns, @@ -75,7 +75,7 @@ class Column extends Base $project = $this->getProject(); $column = $this->board->getColumn($this->request->getIntegerParam('column_id')); - $this->response->html($this->projectLayout('column/edit', array( + $this->response->html($this->helper->layout->project('column/edit', array( 'errors' => $errors, 'values' => $values ?: $column, 'project' => $project, @@ -136,7 +136,7 @@ class Column extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('column/remove', array( + $this->response->html($this->helper->layout->project('column/remove', array( 'column' => $this->board->getColumn($this->request->getIntegerParam('column_id')), 'project' => $project, 'title' => t('Remove a column from a board') diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php index 549c0c65..1e94779f 100644 --- a/app/Controller/Comment.php +++ b/app/Controller/Comment.php @@ -47,7 +47,7 @@ class Comment extends Base ); } - $this->response->html($this->taskLayout('comment/create', array( + $this->response->html($this->helper->layout->task('comment/create', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -90,7 +90,7 @@ class Comment extends Base $task = $this->getTask(); $comment = $this->getComment(); - $this->response->html($this->taskLayout('comment/edit', array( + $this->response->html($this->helper->layout->task('comment/edit', array( 'values' => empty($values) ? $comment : $values, 'errors' => $errors, 'comment' => $comment, @@ -135,7 +135,7 @@ class Comment extends Base $task = $this->getTask(); $comment = $this->getComment(); - $this->response->html($this->taskLayout('comment/remove', array( + $this->response->html($this->helper->layout->task('comment/remove', array( 'comment' => $comment, 'task' => $task, 'title' => t('Remove a comment') diff --git a/app/Controller/Config.php b/app/Controller/Config.php index 4aee8553..53f7cdb6 100644 --- a/app/Controller/Config.php +++ b/app/Controller/Config.php @@ -10,24 +10,6 @@ namespace Kanboard\Controller; */ class Config extends Base { - /** - * Common layout for config views - * - * @access private - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - private function layout($template, array $params) - { - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['values'] = $this->config->getAll(); - $params['errors'] = array(); - $params['config_content_for_layout'] = $this->template->render($template, $params); - - return $this->template->layout('config/layout', $params); - } - /** * Common method between pages * @@ -72,7 +54,7 @@ class Config extends Base */ public function index() { - $this->response->html($this->layout('config/about', array( + $this->response->html($this->helper->layout->config('config/about', array( 'db_size' => $this->config->getDatabaseSize(), 'title' => t('Settings').' > '.t('About'), ))); @@ -85,7 +67,7 @@ class Config extends Base */ public function plugins() { - $this->response->html($this->layout('config/plugins', array( + $this->response->html($this->helper->layout->config('config/plugins', array( 'plugins' => $this->pluginLoader->plugins, 'title' => t('Settings').' > '.t('Plugins'), ))); @@ -100,7 +82,7 @@ class Config extends Base { $this->common('application'); - $this->response->html($this->layout('config/application', array( + $this->response->html($this->helper->layout->config('config/application', array( 'languages' => $this->config->getLanguages(), 'timezones' => $this->config->getTimezones(), 'date_formats' => $this->dateParser->getAvailableFormats(), @@ -117,7 +99,7 @@ class Config extends Base { $this->common('project'); - $this->response->html($this->layout('config/project', array( + $this->response->html($this->helper->layout->config('config/project', array( 'colors' => $this->color->getList(), 'default_columns' => implode(', ', $this->board->getDefaultColumns()), 'title' => t('Settings').' > '.t('Project settings'), @@ -133,7 +115,7 @@ class Config extends Base { $this->common('board'); - $this->response->html($this->layout('config/board', array( + $this->response->html($this->helper->layout->config('config/board', array( 'title' => t('Settings').' > '.t('Board settings'), ))); } @@ -147,7 +129,7 @@ class Config extends Base { $this->common('calendar'); - $this->response->html($this->layout('config/calendar', array( + $this->response->html($this->helper->layout->config('config/calendar', array( 'title' => t('Settings').' > '.t('Calendar settings'), ))); } @@ -161,7 +143,7 @@ class Config extends Base { $this->common('integrations'); - $this->response->html($this->layout('config/integrations', array( + $this->response->html($this->helper->layout->config('config/integrations', array( 'title' => t('Settings').' > '.t('Integrations'), ))); } @@ -175,7 +157,7 @@ class Config extends Base { $this->common('webhook'); - $this->response->html($this->layout('config/webhook', array( + $this->response->html($this->helper->layout->config('config/webhook', array( 'title' => t('Settings').' > '.t('Webhook settings'), ))); } @@ -187,7 +169,7 @@ class Config extends Base */ public function api() { - $this->response->html($this->layout('config/api', array( + $this->response->html($this->helper->layout->config('config/api', array( 'title' => t('Settings').' > '.t('API'), ))); } diff --git a/app/Controller/Currency.php b/app/Controller/Currency.php index 42e404f8..ecaa9834 100644 --- a/app/Controller/Currency.php +++ b/app/Controller/Currency.php @@ -10,22 +10,6 @@ namespace Kanboard\Controller; */ class Currency extends Base { - /** - * Common layout for config views - * - * @access private - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - private function layout($template, array $params) - { - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['config_content_for_layout'] = $this->template->render($template, $params); - - return $this->template->layout('config/layout', $params); - } - /** * Display all currency rates and form * @@ -33,7 +17,7 @@ class Currency extends Base */ public function index(array $values = array(), array $errors = array()) { - $this->response->html($this->layout('currency/index', array( + $this->response->html($this->helper->layout->config('currency/index', array( 'config_values' => array('application_currency' => $this->config->get('application_currency')), 'values' => $values, 'errors' => $errors, diff --git a/app/Controller/Customfilter.php b/app/Controller/Customfilter.php index 1b43f1d0..da7eb77b 100644 --- a/app/Controller/Customfilter.php +++ b/app/Controller/Customfilter.php @@ -21,7 +21,7 @@ class Customfilter extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('custom_filter/index', array( + $this->response->html($this->helper->layout->project('custom_filter/index', array( 'values' => $values + array('project_id' => $project['id']), 'errors' => $errors, 'project' => $project, @@ -90,7 +90,7 @@ class Customfilter extends Base $this->checkPermission($project, $filter); - $this->response->html($this->projectLayout('custom_filter/edit', array( + $this->response->html($this->helper->layout->project('custom_filter/edit', array( 'values' => empty($values) ? $filter : $values, 'errors' => $errors, 'project' => $project, diff --git a/app/Controller/Doc.php b/app/Controller/Doc.php index a233b120..6f309d48 100644 --- a/app/Controller/Doc.php +++ b/app/Controller/Doc.php @@ -52,8 +52,6 @@ class Doc extends Base } } - $this->response->html($this->template->layout('doc/show', $this->readFile($filename) + array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), - ))); + $this->response->html($this->helper->layout->app('doc/show', $this->readFile($filename))); } } diff --git a/app/Controller/Export.php b/app/Controller/Export.php index c39f58a1..977a4107 100644 --- a/app/Controller/Export.php +++ b/app/Controller/Export.php @@ -27,7 +27,7 @@ class Export extends Base $this->response->csv($data); } - $this->response->html($this->projectLayout('export/'.$action, array( + $this->response->html($this->helper->layout->project('export/'.$action, array( 'values' => array( 'controller' => 'export', 'action' => $action, diff --git a/app/Controller/File.php b/app/Controller/File.php index 18e787f1..b347f67f 100644 --- a/app/Controller/File.php +++ b/app/Controller/File.php @@ -26,7 +26,7 @@ class File extends Base return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } - $this->response->html($this->taskLayout('file/screenshot', array( + $this->response->html($this->helper->layout->task('file/screenshot', array( 'task' => $task, ))); } @@ -40,7 +40,7 @@ class File extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('file/new', array( + $this->response->html($this->helper->layout->task('file/new', array( 'task' => $task, 'max_size' => ini_get('upload_max_filesize'), ))); @@ -178,7 +178,7 @@ class File extends Base $task = $this->getTask(); $file = $this->file->getById($this->request->getIntegerParam('file_id')); - $this->response->html($this->taskLayout('file/remove', array( + $this->response->html($this->helper->layout->task('file/remove', array( 'task' => $task, 'file' => $file, ))); diff --git a/app/Controller/Gantt.php b/app/Controller/Gantt.php index f312130c..b1dc2b7e 100644 --- a/app/Controller/Gantt.php +++ b/app/Controller/Gantt.php @@ -23,10 +23,9 @@ class Gantt extends Base $project_ids = $this->projectPermission->getActiveProjectIds($this->userSession->getId()); } - $this->response->html($this->template->layout('gantt/projects', array( + $this->response->html($this->helper->layout->app('gantt/projects', array( 'projects' => $this->projectGanttFormatter->filter($project_ids)->format(), 'title' => t('Gantt chart for all projects'), - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), ))); } @@ -65,7 +64,7 @@ class Gantt extends Base $filter->getQuery()->asc('column_position')->asc(TaskModel::TABLE.'.position'); } - $this->response->html($this->template->layout('gantt/project', $params + array( + $this->response->html($this->helper->layout->app('gantt/project', $params + array( 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false), 'sorting' => $sorting, 'tasks' => $filter->format(), diff --git a/app/Controller/Group.php b/app/Controller/Group.php index e952c0e5..fa47f428 100644 --- a/app/Controller/Group.php +++ b/app/Controller/Group.php @@ -24,8 +24,7 @@ class Group extends Base ->setQuery($this->group->getQuery()) ->calculate(); - $this->response->html($this->template->layout('group/index', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('group/index', array( 'title' => t('Groups').' ('.$paginator->getTotal().')', 'paginator' => $paginator, ))); @@ -48,8 +47,7 @@ class Group extends Base ->setQuery($this->groupMember->getQuery($group_id)) ->calculate(); - $this->response->html($this->template->layout('group/users', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('group/users', array( 'title' => t('Members of %s', $group['name']).' ('.$paginator->getTotal().')', 'paginator' => $paginator, 'group' => $group, @@ -63,8 +61,7 @@ class Group extends Base */ public function create(array $values = array(), array $errors = array()) { - $this->response->html($this->template->layout('group/create', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('group/create', array( 'errors' => $errors, 'values' => $values, 'title' => t('New group') @@ -104,8 +101,7 @@ class Group extends Base $values = $this->group->getById($this->request->getIntegerParam('group_id')); } - $this->response->html($this->template->layout('group/edit', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('group/edit', array( 'errors' => $errors, 'values' => $values, 'title' => t('Edit group') @@ -148,8 +144,7 @@ class Group extends Base $values['group_id'] = $group_id; } - $this->response->html($this->template->layout('group/associate', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('group/associate', array( 'users' => $this->user->prepareList($this->groupMember->getNotMembers($group_id)), 'group' => $group, 'errors' => $errors, @@ -191,7 +186,7 @@ class Group extends Base $group = $this->group->getById($group_id); $user = $this->user->getById($user_id); - $this->response->html($this->template->layout('group/dissociate', array( + $this->response->html($this->helper->layout->app('group/dissociate', array( 'group' => $group, 'user' => $user, 'title' => t('Remove user from group "%s"', $group['name']), @@ -228,7 +223,7 @@ class Group extends Base $group_id = $this->request->getIntegerParam('group_id'); $group = $this->group->getById($group_id); - $this->response->html($this->template->layout('group/remove', array( + $this->response->html($this->helper->layout->app('group/remove', array( 'group' => $group, 'title' => t('Remove group'), ))); diff --git a/app/Controller/Link.php b/app/Controller/Link.php index d52d1f91..ec7ab1af 100644 --- a/app/Controller/Link.php +++ b/app/Controller/Link.php @@ -11,22 +11,6 @@ namespace Kanboard\Controller; */ class Link extends Base { - /** - * Common layout for config views - * - * @access private - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - private function layout($template, array $params) - { - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['config_content_for_layout'] = $this->template->render($template, $params); - - return $this->template->layout('config/layout', $params); - } - /** * Get the current link * @@ -51,7 +35,7 @@ class Link extends Base */ public function index(array $values = array(), array $errors = array()) { - $this->response->html($this->layout('link/index', array( + $this->response->html($this->helper->layout->config('link/index', array( 'links' => $this->link->getMergedList(), 'values' => $values, 'errors' => $errors, @@ -91,7 +75,7 @@ class Link extends Base $link = $this->getLink(); $link['label'] = t($link['label']); - $this->response->html($this->layout('link/edit', array( + $this->response->html($this->helper->layout->config('link/edit', array( 'values' => $values ?: $link, 'errors' => $errors, 'labels' => $this->link->getList($link['id']), @@ -131,7 +115,7 @@ class Link extends Base { $link = $this->getLink(); - $this->response->html($this->layout('link/remove', array( + $this->response->html($this->helper->layout->config('link/remove', array( 'link' => $link, 'title' => t('Remove a link') ))); diff --git a/app/Controller/Listing.php b/app/Controller/Listing.php index b9c851f5..c7d3d9a8 100644 --- a/app/Controller/Listing.php +++ b/app/Controller/Listing.php @@ -30,7 +30,7 @@ class Listing extends Base ->setQuery($query) ->calculate(); - $this->response->html($this->template->layout('listing/show', $params + array( + $this->response->html($this->helper->layout->app('listing/show', $params + array( 'paginator' => $paginator, ))); } diff --git a/app/Controller/Oauth.php b/app/Controller/Oauth.php index bc670d1e..452faecd 100644 --- a/app/Controller/Oauth.php +++ b/app/Controller/Oauth.php @@ -95,7 +95,7 @@ class Oauth extends Base if ($this->authenticationManager->oauthAuthentication($provider)) { $this->response->redirect($this->helper->url->to('app', 'index')); } else { - $this->response->html($this->template->layout('auth/index', array( + $this->response->html($this->helper->layout->app('auth/index', array( 'errors' => array('login' => t('External authentication failed')), 'values' => array(), 'no_layout' => true, diff --git a/app/Controller/PasswordReset.php b/app/Controller/PasswordReset.php index 23567c9c..f6a0eb8e 100644 --- a/app/Controller/PasswordReset.php +++ b/app/Controller/PasswordReset.php @@ -17,7 +17,7 @@ class PasswordReset extends Base { $this->checkActivation(); - $this->response->html($this->template->layout('password_reset/create', array( + $this->response->html($this->helper->layout->app('password_reset/create', array( 'errors' => $errors, 'values' => $values, 'no_layout' => true, @@ -53,7 +53,7 @@ class PasswordReset extends Base $user_id = $this->passwordReset->getUserIdByToken($token); if ($user_id !== false) { - $this->response->html($this->template->layout('password_reset/change', array( + $this->response->html($this->helper->layout->app('password_reset/change', array( 'token' => $token, 'errors' => $errors, 'values' => $values, diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 661fd68b..cdfbd94a 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -32,8 +32,7 @@ class Project extends Base ->setQuery($this->project->getQueryColumnStats($project_ids)) ->calculate(); - $this->response->html($this->template->layout('project/index', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->response->html($this->helper->layout->app('project/index', array( 'paginator' => $paginator, 'nb_projects' => $nb_projects, 'title' => t('Projects').' ('.$nb_projects.')' @@ -49,7 +48,7 @@ class Project extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('project/show', array( + $this->response->html($this->helper->layout->project('project/show', array( 'project' => $project, 'stats' => $this->project->getTaskStats($project['id']), 'title' => $project['name'], @@ -78,7 +77,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'share', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('project/share', array( + $this->response->html($this->helper->layout->project('project/share', array( 'project' => $project, 'title' => t('Public access'), ))); @@ -99,7 +98,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'integrations', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('project/integrations', array( + $this->response->html($this->helper->layout->project('project/integrations', array( 'project' => $project, 'title' => t('Integrations'), 'webhook_token' => $this->config->get('webhook_token'), @@ -124,7 +123,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'notifications', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('project/notifications', array( + $this->response->html($this->helper->layout->project('project/notifications', array( 'notifications' => $this->projectNotification->readSettings($project['id']), 'types' => $this->projectNotificationType->getTypes(), 'project' => $project, @@ -153,7 +152,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'index')); } - $this->response->html($this->projectLayout('project/remove', array( + $this->response->html($this->helper->layout->project('project/remove', array( 'project' => $project, 'title' => t('Remove project') ))); @@ -182,7 +181,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'show', array('project_id' => $project_id))); } - $this->response->html($this->projectLayout('project/duplicate', array( + $this->response->html($this->helper->layout->project('project/duplicate', array( 'project' => $project, 'title' => t('Clone this project') ))); @@ -209,7 +208,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'show', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('project/disable', array( + $this->response->html($this->helper->layout->project('project/disable', array( 'project' => $project, 'title' => t('Project activation') ))); @@ -236,7 +235,7 @@ class Project extends Base $this->response->redirect($this->helper->url->to('project', 'show', array('project_id' => $project['id']))); } - $this->response->html($this->projectLayout('project/enable', array( + $this->response->html($this->helper->layout->project('project/enable', array( 'project' => $project, 'title' => t('Project activation') ))); diff --git a/app/Controller/ProjectEdit.php b/app/Controller/ProjectEdit.php index 29793c47..f4a3a7cb 100644 --- a/app/Controller/ProjectEdit.php +++ b/app/Controller/ProjectEdit.php @@ -114,7 +114,7 @@ class ProjectEdit extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout($template, array( + $this->response->html($this->helper->layout->project($template, array( 'owners' => $this->projectUserRole->getAssignableUsersList($project['id'], true), 'values' => empty($values) ? $project : $values, 'errors' => $errors, diff --git a/app/Controller/ProjectPermission.php b/app/Controller/ProjectPermission.php index e0e58240..800da02f 100644 --- a/app/Controller/ProjectPermission.php +++ b/app/Controller/ProjectPermission.php @@ -43,7 +43,7 @@ class ProjectPermission extends Base $values['role'] = Role::PROJECT_MEMBER; } - $this->response->html($this->projectLayout('project_permission/index', array( + $this->response->html($this->helper->layout->project('project_permission/index', array( 'project' => $project, 'users' => $this->projectUserRole->getUsers($project['id']), 'groups' => $this->projectGroupRole->getGroups($project['id']), diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index 78b93ab6..9cd21021 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -14,23 +14,6 @@ use Kanboard\Core\Security\Role; */ class Projectuser extends Base { - /** - * Common layout for users overview views - * - * @access private - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - private function layout($template, array $params) - { - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - $params['content_for_sublayout'] = $this->template->render($template, $params); - $params['filter'] = array('user_id' => $params['user_id']); - - return $this->template->layout('project_user/layout', $params); - } - private function common() { $user_id = $this->request->getIntegerParam('user_id', UserModel::EVERYBODY_ID); @@ -62,7 +45,7 @@ class Projectuser extends Base ->setQuery($query) ->calculate(); - $this->response->html($this->layout('project_user/roles', array( + $this->response->html($this->helper->layout->projectUser('project_user/roles', array( 'paginator' => $paginator, 'title' => $title, 'user_id' => $user_id, @@ -88,7 +71,7 @@ class Projectuser extends Base ->setQuery($query) ->calculate(); - $this->response->html($this->layout('project_user/tasks', array( + $this->response->html($this->helper->layout->projectUser('project_user/tasks', array( 'paginator' => $paginator, 'title' => $title, 'user_id' => $user_id, diff --git a/app/Controller/Search.php b/app/Controller/Search.php index 390210c0..9b9b9e65 100644 --- a/app/Controller/Search.php +++ b/app/Controller/Search.php @@ -36,8 +36,7 @@ class Search extends Base $nb_tasks = $paginator->getTotal(); } - $this->response->html($this->template->layout('search/index', array( - 'board_selector' => $projects, + $this->response->html($this->helper->layout->app('search/index', array( 'values' => array( 'search' => $search, 'controller' => 'search', diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index caaaa85e..526962a9 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -45,7 +45,7 @@ class Subtask extends Base ); } - $this->response->html($this->taskLayout('subtask/create', array( + $this->response->html($this->helper->layout->task('subtask/create', array( 'values' => $values, 'errors' => $errors, 'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']), @@ -92,7 +92,7 @@ class Subtask extends Base $task = $this->getTask(); $subtask = $this->getSubTask(); - $this->response->html($this->taskLayout('subtask/edit', array( + $this->response->html($this->helper->layout->task('subtask/edit', array( 'values' => empty($values) ? $subtask : $values, 'errors' => $errors, 'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']), @@ -138,7 +138,7 @@ class Subtask extends Base $task = $this->getTask(); $subtask = $this->getSubtask(); - $this->response->html($this->taskLayout('subtask/remove', array( + $this->response->html($this->helper->layout->task('subtask/remove', array( 'subtask' => $subtask, 'task' => $task, ))); diff --git a/app/Controller/Swimlane.php b/app/Controller/Swimlane.php index 66410888..4e8c2863 100644 --- a/app/Controller/Swimlane.php +++ b/app/Controller/Swimlane.php @@ -40,7 +40,7 @@ class Swimlane extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('swimlane/index', array( + $this->response->html($this->helper->layout->project('swimlane/index', array( 'default_swimlane' => $this->swimlane->getDefault($project['id']), 'active_swimlanes' => $this->swimlane->getAllByStatus($project['id'], SwimlaneModel::ACTIVE), 'inactive_swimlanes' => $this->swimlane->getAllByStatus($project['id'], SwimlaneModel::INACTIVE), @@ -108,7 +108,7 @@ class Swimlane extends Base $project = $this->getProject(); $swimlane = $this->getSwimlane($project['id']); - $this->response->html($this->projectLayout('swimlane/edit', array( + $this->response->html($this->helper->layout->project('swimlane/edit', array( 'values' => empty($values) ? $swimlane : $values, 'errors' => $errors, 'project' => $project, @@ -150,7 +150,7 @@ class Swimlane extends Base $project = $this->getProject(); $swimlane = $this->getSwimlane($project['id']); - $this->response->html($this->projectLayout('swimlane/remove', array( + $this->response->html($this->helper->layout->project('swimlane/remove', array( 'project' => $project, 'swimlane' => $swimlane, 'title' => t('Remove a swimlane') diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 1811dcb7..0d463725 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -30,7 +30,7 @@ class Task extends Base $this->notfound(true); } - $this->response->html($this->template->layout('task/public', array( + $this->response->html($this->helper->layout->app('task/public', array( 'project' => $project, 'comments' => $this->comment->getAll($task['id']), 'subtasks' => $this->subtask->getAll($task['id']), @@ -64,7 +64,7 @@ class Task extends Base $this->dateParser->format($values, array('date_started'), 'Y-m-d H:i'); - $this->response->html($this->taskLayout('task/show', array( + $this->response->html($this->helper->layout->task('task/show', array( 'project' => $this->project->getById($task['project_id']), 'files' => $this->file->getAllDocuments($task['id']), 'images' => $this->file->getAllImages($task['id']), @@ -95,7 +95,7 @@ class Task extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('task/analytics', array( + $this->response->html($this->helper->layout->task('task/analytics', array( 'title' => $task['title'], 'task' => $task, 'lead_time' => $this->taskAnalytic->getLeadTime($task), @@ -121,7 +121,7 @@ class Task extends Base ->setQuery($this->subtaskTimeTracking->getTaskQuery($task['id'])) ->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks'); - $this->response->html($this->taskLayout('task/time_tracking_details', array( + $this->response->html($this->helper->layout->task('task/time_tracking_details', array( 'task' => $task, 'subtask_paginator' => $subtask_paginator, ))); @@ -136,7 +136,7 @@ class Task extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('task/transitions', array( + $this->response->html($this->helper->layout->task('task/transitions', array( 'task' => $task, 'transitions' => $this->transition->getAllByTask($task['id']), ))); @@ -167,7 +167,7 @@ class Task extends Base $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id']))); } - $this->response->html($this->taskLayout('task/remove', array( + $this->response->html($this->helper->layout->task('task/remove', array( 'task' => $task, ))); } diff --git a/app/Controller/TaskExternalLink.php b/app/Controller/TaskExternalLink.php index 9b9a7d3d..f26922dd 100644 --- a/app/Controller/TaskExternalLink.php +++ b/app/Controller/TaskExternalLink.php @@ -21,7 +21,7 @@ class TaskExternalLink extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('task_external_link/show', array( + $this->response->html($this->helper->layout->task('task_external_link/show', array( 'links' => $this->taskExternalLink->getAll($task['id']), 'task' => $task, 'title' => t('List of external links'), @@ -37,7 +37,7 @@ class TaskExternalLink extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('task_external_link/find', array( + $this->response->html($this->helper->layout->task('task_external_link/find', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -60,7 +60,7 @@ class TaskExternalLink extends Base $provider = $this->externalLinkManager->setUserInput($values)->find(); $link = $provider->getLink(); - $this->response->html($this->taskLayout('task_external_link/create', array( + $this->response->html($this->helper->layout->task('task_external_link/create', array( 'values' => array( 'title' => $link->getTitle(), 'url' => $link->getUrl(), @@ -116,7 +116,7 @@ class TaskExternalLink extends Base $provider = $this->externalLinkManager->getProvider($values['link_type']); - $this->response->html($this->taskLayout('task_external_link/edit', array( + $this->response->html($this->helper->layout->task('task_external_link/edit', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -158,7 +158,7 @@ class TaskExternalLink extends Base return $this->notfound(); } - $this->response->html($this->taskLayout('task_external_link/remove', array( + $this->response->html($this->helper->layout->task('task_external_link/remove', array( 'link' => $link, 'task' => $task, ))); diff --git a/app/Controller/TaskImport.php b/app/Controller/TaskImport.php index f09c14ce..460c608c 100644 --- a/app/Controller/TaskImport.php +++ b/app/Controller/TaskImport.php @@ -20,7 +20,7 @@ class TaskImport extends Base { $project = $this->getProject(); - $this->response->html($this->projectLayout('task_import/step1', array( + $this->response->html($this->helper->layout->project('task_import/step1', array( 'project' => $project, 'values' => $values, 'errors' => $errors, diff --git a/app/Controller/Taskduplication.php b/app/Controller/Taskduplication.php index 2362ae42..f940eee3 100644 --- a/app/Controller/Taskduplication.php +++ b/app/Controller/Taskduplication.php @@ -32,7 +32,7 @@ class Taskduplication extends Base } } - $this->response->html($this->taskLayout('task_duplication/duplicate', array( + $this->response->html($this->helper->layout->task('task_duplication/duplicate', array( 'task' => $task, ))); } @@ -128,7 +128,7 @@ class Taskduplication extends Base $users_list = array(); } - $this->response->html($this->taskLayout($template, array( + $this->response->html($this->helper->layout->task($template, array( 'values' => $values, 'task' => $task, 'projects_list' => $projects_list, diff --git a/app/Controller/Tasklink.php b/app/Controller/Tasklink.php index 73c641fb..fdb4fada 100644 --- a/app/Controller/Tasklink.php +++ b/app/Controller/Tasklink.php @@ -38,7 +38,7 @@ class Tasklink extends Base $task = $this->getTask(); $project = $this->project->getById($task['project_id']); - $this->response->html($this->taskLayout('tasklink/show', array( + $this->response->html($this->helper->layout->task('tasklink/show', array( 'links' => $this->taskLink->getAllGroupedByLabel($task['id']), 'task' => $task, 'project' => $project, @@ -56,7 +56,7 @@ class Tasklink extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('tasklink/create', array( + $this->response->html($this->helper->layout->task('tasklink/create', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -106,7 +106,7 @@ class Tasklink extends Base $values['title'] = '#'.$opposite_task['id'].' - '.$opposite_task['title']; } - $this->response->html($this->taskLayout('tasklink/edit', array( + $this->response->html($this->helper->layout->task('tasklink/edit', array( 'values' => $values, 'errors' => $errors, 'task_link' => $task_link, @@ -150,7 +150,7 @@ class Tasklink extends Base $task = $this->getTask(); $link = $this->getTaskLink(); - $this->response->html($this->taskLayout('tasklink/remove', array( + $this->response->html($this->helper->layout->task('tasklink/remove', array( 'link' => $link, 'task' => $task, ))); diff --git a/app/Controller/Taskmodification.php b/app/Controller/Taskmodification.php index 940b8a22..dc368390 100644 --- a/app/Controller/Taskmodification.php +++ b/app/Controller/Taskmodification.php @@ -56,7 +56,7 @@ class Taskmodification extends Base $values = array('id' => $task['id'], 'description' => $task['description']); } - $this->response->html($this->taskLayout('task_modification/edit_description', array( + $this->response->html($this->helper->layout->task('task_modification/edit_description', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -104,7 +104,7 @@ class Taskmodification extends Base $this->dateParser->format($values, array('date_due')); - $this->response->html($this->taskLayout('task_modification/edit_task', array( + $this->response->html($this->helper->layout->task('task_modification/edit_task', array( 'project' => $project, 'values' => $values, 'errors' => $errors, @@ -176,6 +176,6 @@ class Taskmodification extends Base 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(), ); - $this->response->html($this->taskLayout('task_modification/edit_recurrence', $params)); + $this->response->html($this->helper->layout->task('task_modification/edit_recurrence', $params)); } } diff --git a/app/Controller/Taskstatus.php b/app/Controller/Taskstatus.php index e28d5911..c07f2cc5 100644 --- a/app/Controller/Taskstatus.php +++ b/app/Controller/Taskstatus.php @@ -55,7 +55,7 @@ class Taskstatus extends Base return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } - $this->response->html($this->taskLayout($template, array( + $this->response->html($this->helper->layout->task($template, array( 'task' => $task, ))); } diff --git a/app/Controller/Twofactor.php b/app/Controller/Twofactor.php index 8dbfcf66..10292261 100644 --- a/app/Controller/Twofactor.php +++ b/app/Controller/Twofactor.php @@ -33,7 +33,7 @@ class Twofactor extends User $this->checkCurrentUser($user); unset($this->sessionStorage->twoFactorSecret); - $this->response->html($this->layout('twofactor/index', array( + $this->response->html($this->helper->layout->user('twofactor/index', array( 'user' => $user, 'provider' => $this->authenticationManager->getPostAuthenticationProvider()->getName(), ))); @@ -60,7 +60,7 @@ class Twofactor extends User $provider->setSecret($this->sessionStorage->twoFactorSecret); } - $this->response->html($this->layout('twofactor/show', array( + $this->response->html($this->helper->layout->user('twofactor/show', array( 'user' => $user, 'secret' => $this->sessionStorage->twoFactorSecret, 'qrcode_url' => $provider->getQrCodeUrl($label), @@ -165,7 +165,7 @@ class Twofactor extends User $this->sessionStorage->twoFactorBeforeCodeCalled = true; } - $this->response->html($this->template->layout('twofactor/check', array( + $this->response->html($this->helper->layout->app('twofactor/check', array( 'title' => t('Check two factor authentication code'), ))); } @@ -191,7 +191,7 @@ class Twofactor extends User $this->response->redirect($this->helper->url->to('user', 'show', array('user_id' => $user['id']))); } - $this->response->html($this->layout('twofactor/disable', array( + $this->response->html($this->helper->layout->user('twofactor/disable', array( 'user' => $user, ))); } diff --git a/app/Controller/User.php b/app/Controller/User.php index 97e01553..881266d4 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -14,27 +14,6 @@ use Kanboard\Core\Security\Role; */ class User extends Base { - /** - * Common layout for user views - * - * @access protected - * @param string $template Template name - * @param array $params Template parameters - * @return string - */ - protected function layout($template, array $params) - { - $content = $this->template->render($template, $params); - $params['user_content_for_layout'] = $content; - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); - - if (isset($params['user'])) { - $params['title'] = ($params['user']['name'] ?: $params['user']['username']).' (#'.$params['user']['id'].')'; - } - - return $this->template->layout('user/layout', $params); - } - /** * List all users * @@ -50,8 +29,7 @@ class User extends Base ->calculate(); $this->response->html( - $this->template->layout('user/index', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->helper->layout->app('user/index', array( 'title' => t('Users').' ('.$paginator->getTotal().')', 'paginator' => $paginator, ))); @@ -71,8 +49,7 @@ class User extends Base } $this->response->html( - $this->template->layout('user/profile', array( - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), + $this->helper->layout->app('user/profile', array( 'title' => $user['name'] ?: $user['username'], 'user' => $user, ) @@ -88,11 +65,10 @@ class User extends Base { $is_remote = $this->request->getIntegerParam('remote') == 1 || (isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1); - $this->response->html($this->template->layout($is_remote ? 'user/create_remote' : 'user/create_local', array( + $this->response->html($this->helper->layout->app($is_remote ? 'user/create_remote' : 'user/create_local', array( 'timezones' => $this->config->getTimezones(true), 'languages' => $this->config->getLanguages(true), 'roles' => $this->role->getApplicationRoles(), - 'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()), 'projects' => $this->project->getList(), 'errors' => $errors, 'values' => $values + array('role' => Role::APP_USER), @@ -142,7 +118,7 @@ class User extends Base public function show() { $user = $this->getUser(); - $this->response->html($this->layout('user/show', array( + $this->response->html($this->helper->layout->user('user/show', array( 'user' => $user, 'timezones' => $this->config->getTimezones(true), 'languages' => $this->config->getLanguages(true), @@ -166,7 +142,7 @@ class User extends Base ->setQuery($this->subtaskTimeTracking->getUserQuery($user['id'])) ->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks'); - $this->response->html($this->layout('user/timesheet', array( + $this->response->html($this->helper->layout->user('user/timesheet', array( 'subtask_paginator' => $subtask_paginator, 'user' => $user, ))); @@ -180,7 +156,7 @@ class User extends Base public function passwordReset() { $user = $this->getUser(); - $this->response->html($this->layout('user/password_reset', array( + $this->response->html($this->helper->layout->user('user/password_reset', array( 'tokens' => $this->passwordReset->getAll($user['id']), 'user' => $user, ))); @@ -194,7 +170,7 @@ class User extends Base public function last() { $user = $this->getUser(); - $this->response->html($this->layout('user/last', array( + $this->response->html($this->helper->layout->user('user/last', array( 'last_logins' => $this->lastLogin->getAll($user['id']), 'user' => $user, ))); @@ -208,7 +184,7 @@ class User extends Base public function sessions() { $user = $this->getUser(); - $this->response->html($this->layout('user/sessions', array( + $this->response->html($this->helper->layout->user('user/sessions', array( 'sessions' => $this->rememberMeSession->getAll($user['id']), 'user' => $user, ))); @@ -243,7 +219,7 @@ class User extends Base $this->response->redirect($this->helper->url->to('user', 'notifications', array('user_id' => $user['id']))); } - $this->response->html($this->layout('user/notifications', array( + $this->response->html($this->helper->layout->user('user/notifications', array( 'projects' => $this->projectUserRole->getProjectsByUser($user['id'], array(ProjectModel::ACTIVE)), 'notifications' => $this->userNotification->readSettings($user['id']), 'types' => $this->userNotificationType->getTypes(), @@ -268,7 +244,7 @@ class User extends Base $this->response->redirect($this->helper->url->to('user', 'integrations', array('user_id' => $user['id']))); } - $this->response->html($this->layout('user/integrations', array( + $this->response->html($this->helper->layout->user('user/integrations', array( 'user' => $user, 'values' => $this->userMetadata->getall($user['id']), ))); @@ -282,7 +258,7 @@ class User extends Base public function external() { $user = $this->getUser(); - $this->response->html($this->layout('user/external', array( + $this->response->html($this->helper->layout->user('user/external', array( 'last_logins' => $this->lastLogin->getAll($user['id']), 'user' => $user, ))); @@ -310,7 +286,7 @@ class User extends Base $this->response->redirect($this->helper->url->to('user', 'share', array('user_id' => $user['id']))); } - $this->response->html($this->layout('user/share', array( + $this->response->html($this->helper->layout->user('user/share', array( 'user' => $user, 'title' => t('Public access'), ))); @@ -342,7 +318,7 @@ class User extends Base } } - $this->response->html($this->layout('user/password', array( + $this->response->html($this->helper->layout->user('user/password', array( 'values' => $values, 'errors' => $errors, 'user' => $user, @@ -384,7 +360,7 @@ class User extends Base } } - $this->response->html($this->layout('user/edit', array( + $this->response->html($this->helper->layout->user('user/edit', array( 'values' => $values, 'errors' => $errors, 'user' => $user, @@ -422,7 +398,7 @@ class User extends Base } } - $this->response->html($this->layout('user/authentication', array( + $this->response->html($this->helper->layout->user('user/authentication', array( 'values' => $values, 'errors' => $errors, 'user' => $user, @@ -450,7 +426,7 @@ class User extends Base $this->response->redirect($this->helper->url->to('user', 'index')); } - $this->response->html($this->layout('user/remove', array( + $this->response->html($this->helper->layout->user('user/remove', array( 'user' => $user, ))); } diff --git a/app/Controller/UserImport.php b/app/Controller/UserImport.php index cbc5aa14..debd69e5 100644 --- a/app/Controller/UserImport.php +++ b/app/Controller/UserImport.php @@ -18,7 +18,7 @@ class UserImport extends Base */ public function step1(array $values = array(), array $errors = array()) { - $this->response->html($this->template->layout('user_import/step1', array( + $this->response->html($this->helper->layout->app('user_import/step1', array( 'values' => $values, 'errors' => $errors, 'max_size' => ini_get('upload_max_filesize'), diff --git a/app/Helper/Layout.php b/app/Helper/Layout.php index 685c7b84..8c00a311 100644 --- a/app/Helper/Layout.php +++ b/app/Helper/Layout.php @@ -26,7 +26,146 @@ class Layout extends Base return $this->template->render($template, $params); } - $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); + if (! isset($params['no_layout']) && ! isset($params['board_selector'])) { + $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); + } + return $this->template->layout($template, $params); } + + /** + * Common layout for user views + * + * @access public + * @param string $template Template name + * @param array $params Template parameters + * @return string + */ + public function user($template, array $params) + { + if (isset($params['user'])) { + $params['title'] = '#'.$params['user']['id'].' '.($params['user']['name'] ?: $params['user']['username']); + } + + return $this->subLayout('user/layout', 'user/sidebar', $template, $params); + } + + /** + * Common layout for task views + * + * @access public + * @param string $template Template name + * @param array $params Template parameters + * @return string + */ + public function task($template, array $params) + { + $params['title'] = '#'.$params['task']['id'].' '.$params['task']['title']; + return $this->subLayout('task/layout', 'task/sidebar', $template, $params); + } + + /** + * Common layout for project views + * + * @access public + * @param string $template + * @param array $params + * @param string $sidebar + * @return string + */ + public function project($template, array $params, $sidebar = 'project/sidebar') + { + if (empty($params['title'])) { + $params['title'] = $params['project']['name']; + } elseif ($params['project']['name'] !== $params['title']) { + $params['title'] = $params['project']['name'].' > '.$params['title']; + } + + return $this->subLayout('project/layout', $sidebar, $template, $params); + } + + /** + * Common layout for project user views + * + * @access public + * @param string $template + * @param array $params + * @return string + */ + public function projectUser($template, array $params) + { + $params['filter'] = array('user_id' => $params['user_id']); + return $this->subLayout('project_user/layout', 'project_user/sidebar', $template, $params); + } + + /** + * Common layout for config views + * + * @access public + * @param string $template + * @param array $params + * @return string + */ + public function config($template, array $params) + { + if (! isset($params['values'])) { + $params['values'] = $this->config->getAll(); + } + + if (! isset($params['errors'])) { + $params['errors'] = array(); + } + + return $this->subLayout('config/layout', 'config/sidebar', $template, $params); + } + + /** + * Common layout for dashboard views + * + * @access public + * @param string $template + * @param array $params + * @return string + */ + public function dashboard($template, array $params) + { + return $this->subLayout('app/layout', 'app/sidebar', $template, $params); + } + + /** + * Common layout for analytic views + * + * @access public + * @param string $template + * @param array $params + * @return string + */ + public function analytic($template, array $params) + { + return $this->subLayout('analytic/layout', 'analytic/sidebar', $template, $params); + } + + /** + * Common method to generate a sublayout + * + * @access public + * @param string $sublayout + * @param string $sidebar + * @param string $template + * @param array $params + * @return string + */ + public function subLayout($sublayout, $sidebar, $template, array $params = array()) + { + $content = $this->template->render($template, $params); + + if ($this->request->isAjax()) { + return $content; + } + + $params['content_for_sublayout'] = $content; + $params['sidebar_template'] = $sidebar; + + return $this->app($sublayout, $params); + } } diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index ff532fc0..4f22db10 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -33,7 +33,7 @@
\ No newline at end of file diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php index a87efbff..3ced5590 100644 --- a/app/Template/project_user/layout.php +++ b/app/Template/project_user/layout.php @@ -15,7 +15,7 @@ \ No newline at end of file diff --git a/app/Template/user/layout.php b/app/Template/user/layout.php index 1e456348..3a0a5ba6 100644 --- a/app/Template/user/layout.php +++ b/app/Template/user/layout.php @@ -13,7 +13,7 @@ render('user/sidebar', array('user' => $user)) ?> \ No newline at end of file -- cgit v1.2.3 From 6161eaef9e107ddbfc104753eb5d48434de3b824 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 13 Feb 2016 15:38:35 -0500 Subject: Enable/Disable users --- ChangeLog | 1 + app/Api/User.php | 15 ++++ app/Auth/DatabaseAuth.php | 3 +- app/Controller/Projectuser.php | 6 +- app/Controller/User.php | 29 +------ app/Controller/UserStatus.php | 111 +++++++++++++++++++++++++ app/Core/User/UserProfile.php | 2 +- app/Model/ProjectGroupRole.php | 1 + app/Model/ProjectPermission.php | 3 +- app/Model/ProjectUserRole.php | 5 +- app/Model/User.php | 40 ++++++++- app/Schema/Mysql.php | 7 +- app/Schema/Postgres.php | 7 +- app/Schema/Sqlite.php | 7 +- app/ServiceProvider/AuthenticationProvider.php | 3 +- app/ServiceProvider/RouteProvider.php | 1 - app/Template/user/dropdown.php | 27 ++++++ app/Template/user/index.php | 33 ++++---- app/Template/user/remove.php | 13 --- app/Template/user/show.php | 1 + app/Template/user/sidebar.php | 6 -- app/Template/user_status/disable.php | 13 +++ app/Template/user_status/enable.php | 13 +++ app/Template/user_status/remove.php | 13 +++ doc/api-user-procedures.markdown | 93 +++++++++++++++++++++ tests/integration/Base.php | 2 +- tests/integration/UserTest.php | 18 ++++ tests/units/Auth/DatabaseAuthTest.php | 12 ++- tests/units/Model/ProjectGroupRoleTest.php | 38 +++++++++ tests/units/Model/ProjectPermissionTest.php | 22 +++++ tests/units/Model/ProjectUserRoleTest.php | 61 ++++++++++++++ tests/units/Model/UserTest.php | 27 +++++- 32 files changed, 551 insertions(+), 82 deletions(-) create mode 100644 app/Controller/UserStatus.php create mode 100644 app/Template/user/dropdown.php delete mode 100644 app/Template/user/remove.php create mode 100644 app/Template/user_status/disable.php create mode 100644 app/Template/user_status/enable.php create mode 100644 app/Template/user_status/remove.php create mode 100644 tests/integration/UserTest.php (limited to 'app/Controller/Projectuser.php') diff --git a/ChangeLog b/ChangeLog index 4f8f3211..830eff80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version 1.0.26 (unreleased) New features: +* Enable/Disable users * Add setting option to disable private projects * Add new config option to disable logout diff --git a/app/Api/User.php b/app/Api/User.php index 9f26615d..48337ac6 100644 --- a/app/Api/User.php +++ b/app/Api/User.php @@ -36,6 +36,21 @@ class User extends \Kanboard\Core\Base return $this->user->remove($user_id); } + public function disableUser($user_id) + { + return $this->user->disable($user_id); + } + + public function enableUser($user_id) + { + return $this->user->enable($user_id); + } + + public function isActiveUser($user_id) + { + return $this->user->isActive($user_id); + } + public function createUser($username, $password, $name = '', $email = '', $role = Role::APP_USER) { $values = array( diff --git a/app/Auth/DatabaseAuth.php b/app/Auth/DatabaseAuth.php index 5a8ee64d..c13af687 100644 --- a/app/Auth/DatabaseAuth.php +++ b/app/Auth/DatabaseAuth.php @@ -65,6 +65,7 @@ class DatabaseAuth extends Base implements PasswordAuthenticationProviderInterfa ->eq('username', $this->username) ->eq('disable_login_form', 0) ->eq('is_ldap_user', 0) + ->eq('is_active', 1) ->findOne(); if (! empty($user) && password_verify($this->password, $user['password'])) { @@ -83,7 +84,7 @@ class DatabaseAuth extends Base implements PasswordAuthenticationProviderInterfa */ public function isValidSession() { - return $this->user->exists($this->userSession->getId()); + return $this->user->isActive($this->userSession->getId()); } /** diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index 9cd21021..a6d4fe4e 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -24,7 +24,7 @@ class Projectuser extends Base $project_ids = $this->projectPermission->getActiveProjectIds($this->userSession->getId()); } - return array($user_id, $project_ids, $this->user->getList(true)); + return array($user_id, $project_ids, $this->user->getActiveUsersList(true)); } private function role($role, $action, $title, $title_user) @@ -33,7 +33,7 @@ class Projectuser extends Base $query = $this->projectPermission->getQueryByRole($project_ids, $role)->callback(array($this->project, 'applyColumnStats')); - if ($user_id !== UserModel::EVERYBODY_ID) { + if ($user_id !== UserModel::EVERYBODY_ID && isset($users[$user_id])) { $query->eq(UserModel::TABLE.'.id', $user_id); $title = t($title_user, $users[$user_id]); } @@ -59,7 +59,7 @@ class Projectuser extends Base $query = $this->taskFinder->getProjectUserOverviewQuery($project_ids, $is_active); - if ($user_id !== UserModel::EVERYBODY_ID) { + if ($user_id !== UserModel::EVERYBODY_ID && isset($users[$user_id])) { $query->eq(TaskModel::TABLE.'.owner_id', $user_id); $title = t($title_user, $users[$user_id]); } diff --git a/app/Controller/User.php b/app/Controller/User.php index 881266d4..f7d7d2e0 100644 --- a/app/Controller/User.php +++ b/app/Controller/User.php @@ -32,7 +32,8 @@ class User extends Base $this->helper->layout->app('user/index', array( 'title' => t('Users').' ('.$paginator->getTotal().')', 'paginator' => $paginator, - ))); + ) + )); } /** @@ -404,30 +405,4 @@ class User extends Base 'user' => $user, ))); } - - /** - * Remove a user - * - * @access public - */ - public function remove() - { - $user = $this->getUser(); - - if ($this->request->getStringParam('confirmation') === 'yes') { - $this->checkCSRFParam(); - - if ($this->user->remove($user['id'])) { - $this->flash->success(t('User removed successfully.')); - } else { - $this->flash->failure(t('Unable to remove this user.')); - } - - $this->response->redirect($this->helper->url->to('user', 'index')); - } - - $this->response->html($this->helper->layout->user('user/remove', array( - 'user' => $user, - ))); - } } diff --git a/app/Controller/UserStatus.php b/app/Controller/UserStatus.php new file mode 100644 index 00000000..b8ee5c91 --- /dev/null +++ b/app/Controller/UserStatus.php @@ -0,0 +1,111 @@ +getUser(); + + $this->response->html($this->helper->layout->user('user_status/remove', array( + 'user' => $user, + ))); + } + + /** + * Remove a user + * + * @access public + */ + public function remove() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->remove($user['id'])) { + $this->flash->success(t('User removed successfully.')); + } else { + $this->flash->failure(t('Unable to remove this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } + + /** + * Confirm enable a user + * + * @access public + */ + public function confirmEnable() + { + $user = $this->getUser(); + + $this->response->html($this->helper->layout->user('user_status/enable', array( + 'user' => $user, + ))); + } + + /** + * Enable a user + * + * @access public + */ + public function enable() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->enable($user['id'])) { + $this->flash->success(t('User activated successfully.')); + } else { + $this->flash->failure(t('Unable to enable this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } + + /** + * Confirm disable a user + * + * @access public + */ + public function confirmDisable() + { + $user = $this->getUser(); + + $this->response->html($this->helper->layout->user('user_status/disable', array( + 'user' => $user, + ))); + } + + /** + * Disable a user + * + * @access public + */ + public function disable() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->disable($user['id'])) { + $this->flash->success(t('User disabled successfully.')); + } else { + $this->flash->failure(t('Unable to disable this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } +} diff --git a/app/Core/User/UserProfile.php b/app/Core/User/UserProfile.php index ccbc7f06..ef325801 100644 --- a/app/Core/User/UserProfile.php +++ b/app/Core/User/UserProfile.php @@ -52,7 +52,7 @@ class UserProfile extends Base $this->groupSync->synchronize($profile['id'], $user->getExternalGroupIds()); } - if (! empty($profile)) { + if (! empty($profile) && $profile['is_active'] == 1) { $this->userSession->initialize($profile); return true; } diff --git a/app/Model/ProjectGroupRole.php b/app/Model/ProjectGroupRole.php index 591b28c6..750ba7fb 100644 --- a/app/Model/ProjectGroupRole.php +++ b/app/Model/ProjectGroupRole.php @@ -106,6 +106,7 @@ class ProjectGroupRole extends Base ->join(GroupMember::TABLE, 'user_id', 'id', User::TABLE) ->join(self::TABLE, 'group_id', 'group_id', GroupMember::TABLE) ->eq(self::TABLE.'.project_id', $project_id) + ->eq(User::TABLE.'.is_active', 1) ->in(self::TABLE.'.role', array(Role::PROJECT_MANAGER, Role::PROJECT_MEMBER)) ->asc(User::TABLE.'.username') ->findAll(); diff --git a/app/Model/ProjectPermission.php b/app/Model/ProjectPermission.php index cea62e13..db1573ae 100644 --- a/app/Model/ProjectPermission.php +++ b/app/Model/ProjectPermission.php @@ -107,7 +107,8 @@ class ProjectPermission extends Base */ public function isAssignable($project_id, $user_id) { - return in_array($this->projectUserRole->getUserRole($project_id, $user_id), array(Role::PROJECT_MEMBER, Role::PROJECT_MANAGER)); + return $this->user->isActive($user_id) && + in_array($this->projectUserRole->getUserRole($project_id, $user_id), array(Role::PROJECT_MEMBER, Role::PROJECT_MANAGER)); } /** diff --git a/app/Model/ProjectUserRole.php b/app/Model/ProjectUserRole.php index 8149a253..56da679c 100644 --- a/app/Model/ProjectUserRole.php +++ b/app/Model/ProjectUserRole.php @@ -152,13 +152,14 @@ class ProjectUserRole extends Base public function getAssignableUsers($project_id) { if ($this->projectPermission->isEverybodyAllowed($project_id)) { - return $this->user->getList(); + return $this->user->getActiveUsersList(); } $userMembers = $this->db->table(self::TABLE) ->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name') ->join(User::TABLE, 'id', 'user_id') - ->eq('project_id', $project_id) + ->eq(User::TABLE.'.is_active', 1) + ->eq(self::TABLE.'.project_id', $project_id) ->in(self::TABLE.'.role', array(Role::PROJECT_MANAGER, Role::PROJECT_MEMBER)) ->findAll(); diff --git a/app/Model/User.php b/app/Model/User.php index dd622207..e2494c4c 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -40,6 +40,18 @@ class User extends Base return $this->db->table(self::TABLE)->eq('id', $user_id)->exists(); } + /** + * Return true if the user is active + * + * @access public + * @param integer $user_id User id + * @return boolean + */ + public function isActive($user_id) + { + return $this->db->table(self::TABLE)->eq('id', $user_id)->eq('is_active', 1)->exists(); + } + /** * Get query to fetch all users * @@ -193,9 +205,9 @@ class User extends Base * @param boolean $prepend Prepend "All users" * @return array */ - public function getList($prepend = false) + public function getActiveUsersList($prepend = false) { - $users = $this->db->table(self::TABLE)->columns('id', 'username', 'name')->findAll(); + $users = $this->db->table(self::TABLE)->eq('is_active', 1)->columns('id', 'username', 'name')->findAll(); $listing = $this->prepareList($users); if ($prepend) { @@ -280,6 +292,30 @@ class User extends Base return $result; } + /** + * Disable a specific user + * + * @access public + * @param integer $user_id + * @return boolean + */ + public function disable($user_id) + { + return $this->db->table(self::TABLE)->eq('id', $user_id)->update(array('is_active' => 0)); + } + + /** + * Enable a specific user + * + * @access public + * @param integer $user_id + * @return boolean + */ + public function enable($user_id) + { + return $this->db->table(self::TABLE)->eq('id', $user_id)->update(array('is_active' => 1)); + } + /** * Remove a specific user * diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 036958b6..1cebbd22 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 104; +const VERSION = 105; + +function version_105(PDO $pdo) +{ + $pdo->exec("ALTER TABLE users ADD COLUMN is_active TINYINT(1) DEFAULT 1"); +} function version_104(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 363b633b..b0b89a7c 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 84; +const VERSION = 85; + +function version_85(PDO $pdo) +{ + $pdo->exec("ALTER TABLE users ADD COLUMN is_active BOOLEAN DEFAULT '1'"); +} function version_84(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index bc701341..aa10e58b 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,12 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 96; +const VERSION = 97; + +function version_97(PDO $pdo) +{ + $pdo->exec("ALTER TABLE users ADD COLUMN is_active INTEGER DEFAULT 1"); +} function version_96(PDO $pdo) { diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php index 9b5cdbe9..c2f7a5c4 100644 --- a/app/ServiceProvider/AuthenticationProvider.php +++ b/app/ServiceProvider/AuthenticationProvider.php @@ -134,7 +134,8 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->add('Projectuser', '*', Role::APP_MANAGER); $acl->add('Twofactor', 'disable', Role::APP_ADMIN); $acl->add('UserImport', '*', Role::APP_ADMIN); - $acl->add('User', array('index', 'create', 'save', 'authentication', 'remove'), Role::APP_ADMIN); + $acl->add('User', array('index', 'create', 'save', 'authentication'), Role::APP_ADMIN); + $acl->add('UserStatus', '*', Role::APP_ADMIN); return $acl; } diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index 683ea1c1..5003eb88 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -157,7 +157,6 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('user/:user_id/accounts', 'user', 'external'); $container['route']->addRoute('user/:user_id/integrations', 'user', 'integrations'); $container['route']->addRoute('user/:user_id/authentication', 'user', 'authentication'); - $container['route']->addRoute('user/:user_id/remove', 'user', 'remove'); $container['route']->addRoute('user/:user_id/2fa', 'twofactor', 'index'); // Groups diff --git a/app/Template/user/dropdown.php b/app/Template/user/dropdown.php new file mode 100644 index 00000000..b74ed6e0 --- /dev/null +++ b/app/Template/user/dropdown.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/app/Template/user/index.php b/app/Template/user/index.php index cb7416d6..494c1465 100644 --- a/app/Template/user/index.php +++ b/app/Template/user/index.php @@ -12,23 +12,21 @@ isEmpty()): ?>

- +
- - - - - - - - + + + + + + + + getCollection() as $user): ?> - + diff --git a/app/Template/user/remove.php b/app/Template/user/remove.php deleted file mode 100644 index 810a3a3f..00000000 --- a/app/Template/user/remove.php +++ /dev/null @@ -1,13 +0,0 @@ - - -
-

- -
- url->link(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?> -
-
\ No newline at end of file diff --git a/app/Template/user/show.php b/app/Template/user/show.php index 89c6b36b..9da56666 100644 --- a/app/Template/user/show.php +++ b/app/Template/user/show.php @@ -5,6 +5,7 @@
  • e($user['username']) ?>
  • e($user['name']) ?: t('None') ?>
  • e($user['email']) ?: t('None') ?>
  • +
  • \ No newline at end of file diff --git a/app/Template/user_status/disable.php b/app/Template/user_status/disable.php new file mode 100644 index 00000000..90d8c757 --- /dev/null +++ b/app/Template/user_status/disable.php @@ -0,0 +1,13 @@ + + +
    +

    + +
    + url->link(t('Yes'), 'UserStatus', 'disable', array('user_id' => $user['id']), true, 'btn btn-red') ?> + + url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?> +
    +
    diff --git a/app/Template/user_status/enable.php b/app/Template/user_status/enable.php new file mode 100644 index 00000000..cd3d4947 --- /dev/null +++ b/app/Template/user_status/enable.php @@ -0,0 +1,13 @@ + + +
    +

    + +
    + url->link(t('Yes'), 'UserStatus', 'enable', array('user_id' => $user['id']), true, 'btn btn-red') ?> + + url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?> +
    +
    diff --git a/app/Template/user_status/remove.php b/app/Template/user_status/remove.php new file mode 100644 index 00000000..cd5c09a6 --- /dev/null +++ b/app/Template/user_status/remove.php @@ -0,0 +1,13 @@ + + +
    +

    + +
    + url->link(t('Yes'), 'UserStatus', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?> + + url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?> +
    +
    diff --git a/doc/api-user-procedures.markdown b/doc/api-user-procedures.markdown index 9b43e1e1..6c09355d 100644 --- a/doc/api-user-procedures.markdown +++ b/doc/api-user-procedures.markdown @@ -262,3 +262,96 @@ Response example: "result": true } ``` + +## disableUser + +- Purpose: **Disable a user** +- Parameters: + - **user_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "disableUser", + "id": 2094191872, + "params": { + "user_id": 1 + } +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 2094191872, + "result": true +} +``` + +## enableUser + +- Purpose: **Enable a user** +- Parameters: + - **user_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "enableUser", + "id": 2094191872, + "params": { + "user_id": 1 + } +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 2094191872, + "result": true +} +``` + +## isActiveUser + +- Purpose: **Check if a user is active** +- Parameters: + - **user_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "isActiveUser", + "id": 2094191872, + "params": { + "user_id": 1 + } +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 2094191872, + "result": true +} +``` diff --git a/tests/integration/Base.php b/tests/integration/Base.php index 6facd9ce..983d0ed9 100644 --- a/tests/integration/Base.php +++ b/tests/integration/Base.php @@ -35,7 +35,7 @@ abstract class Base extends PHPUnit_Framework_TestCase { $this->app = new JsonRPC\Client(API_URL); $this->app->authentication('jsonrpc', API_KEY); - $this->app->debug = true; + // $this->app->debug = true; $this->admin = new JsonRPC\Client(API_URL); $this->admin->authentication('admin', 'admin'); diff --git a/tests/integration/UserTest.php b/tests/integration/UserTest.php new file mode 100644 index 00000000..10da051c --- /dev/null +++ b/tests/integration/UserTest.php @@ -0,0 +1,18 @@ +assertEquals(2, $this->app->createUser(array('username' => 'someone', 'password' => 'test123'))); + $this->assertTrue($this->app->isActiveUser(2)); + + $this->assertTrue($this->app->disableUser(2)); + $this->assertFalse($this->app->isActiveUser(2)); + + $this->assertTrue($this->app->enableUser(2)); + $this->assertTrue($this->app->isActiveUser(2)); + } +} diff --git a/tests/units/Auth/DatabaseAuthTest.php b/tests/units/Auth/DatabaseAuthTest.php index a13b7fee..ac099a7e 100644 --- a/tests/units/Auth/DatabaseAuthTest.php +++ b/tests/units/Auth/DatabaseAuthTest.php @@ -3,6 +3,7 @@ require_once __DIR__.'/../Base.php'; use Kanboard\Auth\DatabaseAuth; +use Kanboard\Model\User; class DatabaseAuthTest extends Base { @@ -40,12 +41,21 @@ class DatabaseAuthTest extends Base public function testIsvalidSession() { + $userModel = new User($this->container); $provider = new DatabaseAuth($this->container); + $this->assertFalse($provider->isValidSession()); - $this->container['sessionStorage']->user = array('id' => 1); + $this->assertEquals(2, $userModel->create(array('username' => 'foobar'))); + + $this->container['sessionStorage']->user = array('id' => 2); $this->assertTrue($provider->isValidSession()); + $this->container['sessionStorage']->user = array('id' => 3); + $this->assertFalse($provider->isValidSession()); + + $this->assertTrue($userModel->disable(2)); + $this->container['sessionStorage']->user = array('id' => 2); $this->assertFalse($provider->isValidSession()); } diff --git a/tests/units/Model/ProjectGroupRoleTest.php b/tests/units/Model/ProjectGroupRoleTest.php index 29a9536b..e38e812a 100644 --- a/tests/units/Model/ProjectGroupRoleTest.php +++ b/tests/units/Model/ProjectGroupRoleTest.php @@ -204,6 +204,44 @@ class ProjectGroupRoleTest extends Base $this->assertEquals('', $users[1]['name']); } + public function testGetAssignableUsersWithDisabledUsers() + { + $userModel = new User($this->container); + $projectModel = new Project($this->container); + $groupModel = new Group($this->container); + $groupMemberModel = new GroupMember($this->container); + $groupRoleModel = new ProjectGroupRole($this->container); + + $this->assertEquals(1, $projectModel->create(array('name' => 'Project 1'))); + $this->assertEquals(2, $projectModel->create(array('name' => 'Project 2'))); + + $this->assertEquals(2, $userModel->create(array('username' => 'user 1', 'name' => 'User #1'))); + $this->assertEquals(3, $userModel->create(array('username' => 'user 2', 'is_active' => 0))); + $this->assertEquals(4, $userModel->create(array('username' => 'user 3'))); + + $this->assertEquals(1, $groupModel->create('Group A')); + $this->assertEquals(2, $groupModel->create('Group B')); + $this->assertEquals(3, $groupModel->create('Group C')); + + $this->assertTrue($groupMemberModel->addUser(1, 4)); + $this->assertTrue($groupMemberModel->addUser(2, 3)); + $this->assertTrue($groupMemberModel->addUser(3, 2)); + + $this->assertTrue($groupRoleModel->addGroup(1, 1, Role::PROJECT_VIEWER)); + $this->assertTrue($groupRoleModel->addGroup(1, 2, Role::PROJECT_MEMBER)); + $this->assertTrue($groupRoleModel->addGroup(1, 3, Role::PROJECT_MANAGER)); + + $users = $groupRoleModel->getAssignableUsers(2); + $this->assertCount(0, $users); + + $users = $groupRoleModel->getAssignableUsers(1); + $this->assertCount(1, $users); + + $this->assertEquals(2, $users[0]['id']); + $this->assertEquals('user 1', $users[0]['username']); + $this->assertEquals('User #1', $users[0]['name']); + } + public function testGetProjectsByUser() { $userModel = new User($this->container); diff --git a/tests/units/Model/ProjectPermissionTest.php b/tests/units/Model/ProjectPermissionTest.php index 035a1246..10fcdcc2 100644 --- a/tests/units/Model/ProjectPermissionTest.php +++ b/tests/units/Model/ProjectPermissionTest.php @@ -192,6 +192,28 @@ class ProjectPermissionTest extends Base $this->assertFalse($projectPermission->isAssignable(2, 5)); } + public function testIsAssignableWhenUserIsDisabled() + { + $userModel = new User($this->container); + $projectModel = new Project($this->container); + $groupModel = new Group($this->container); + $groupRoleModel = new ProjectGroupRole($this->container); + $groupMemberModel = new GroupMember($this->container); + $userRoleModel = new ProjectUserRole($this->container); + $projectPermission = new ProjectPermission($this->container); + + $this->assertEquals(2, $userModel->create(array('username' => 'user 1'))); + $this->assertEquals(3, $userModel->create(array('username' => 'user 2', 'is_active' => 0))); + + $this->assertEquals(1, $projectModel->create(array('name' => 'Project 1'))); + + $this->assertTrue($userRoleModel->addUser(1, 2, Role::PROJECT_MEMBER)); + $this->assertTrue($userRoleModel->addUser(1, 3, Role::PROJECT_MEMBER)); + + $this->assertTrue($projectPermission->isAssignable(1, 2)); + $this->assertFalse($projectPermission->isAssignable(1, 3)); + } + public function testIsMember() { $userModel = new User($this->container); diff --git a/tests/units/Model/ProjectUserRoleTest.php b/tests/units/Model/ProjectUserRoleTest.php index c6b4eb7c..06cd1b70 100644 --- a/tests/units/Model/ProjectUserRoleTest.php +++ b/tests/units/Model/ProjectUserRoleTest.php @@ -8,6 +8,7 @@ use Kanboard\Model\Group; use Kanboard\Model\GroupMember; use Kanboard\Model\ProjectGroupRole; use Kanboard\Model\ProjectUserRole; +use Kanboard\Model\ProjectPermission; use Kanboard\Core\Security\Role; class ProjectUserRoleTest extends Base @@ -100,6 +101,36 @@ class ProjectUserRoleTest extends Base $this->assertEquals('', $userRoleModel->getUserRole(1, 2)); } + public function testGetAssignableUsersWithDisabledUsers() + { + $projectModel = new Project($this->container); + $userModel = new User($this->container); + $userRoleModel = new ProjectUserRole($this->container); + + $this->assertEquals(1, $projectModel->create(array('name' => 'Test'))); + $this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'User1'))); + $this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User2'))); + + $this->assertTrue($userRoleModel->addUser(1, 1, Role::PROJECT_MEMBER)); + $this->assertTrue($userRoleModel->addUser(1, 2, Role::PROJECT_MEMBER)); + $this->assertTrue($userRoleModel->addUser(1, 3, Role::PROJECT_MEMBER)); + + $users = $userRoleModel->getAssignableUsers(1); + $this->assertCount(3, $users); + + $this->assertEquals('admin', $users[1]); + $this->assertEquals('User1', $users[2]); + $this->assertEquals('User2', $users[3]); + + $this->assertTrue($userModel->disable(2)); + + $users = $userRoleModel->getAssignableUsers(1); + $this->assertCount(2, $users); + + $this->assertEquals('admin', $users[1]); + $this->assertEquals('User2', $users[3]); + } + public function testGetAssignableUsersWithoutGroups() { $projectModel = new Project($this->container); @@ -219,6 +250,36 @@ class ProjectUserRoleTest extends Base $this->assertEquals('User4', $users[5]); } + public function testGetAssignableUsersWithDisabledUsersAndEverybodyAllowed() + { + $projectModel = new Project($this->container); + $projectPermission = new ProjectPermission($this->container); + $userModel = new User($this->container); + $userRoleModel = new ProjectUserRole($this->container); + + $this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'User1'))); + $this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User2'))); + + $this->assertEquals(1, $projectModel->create(array('name' => 'Project 1', 'is_everybody_allowed' => 1))); + + $this->assertTrue($projectPermission->isEverybodyAllowed(1)); + + $users = $userRoleModel->getAssignableUsers(1); + $this->assertCount(3, $users); + + $this->assertEquals('admin', $users[1]); + $this->assertEquals('User1', $users[2]); + $this->assertEquals('User2', $users[3]); + + $this->assertTrue($userModel->disable(2)); + + $users = $userRoleModel->getAssignableUsers(1); + $this->assertCount(2, $users); + + $this->assertEquals('admin', $users[1]); + $this->assertEquals('User2', $users[3]); + } + public function testGetProjectsByUser() { $userModel = new User($this->container); diff --git a/tests/units/Model/UserTest.php b/tests/units/Model/UserTest.php index 0987fa56..e411da0c 100644 --- a/tests/units/Model/UserTest.php +++ b/tests/units/Model/UserTest.php @@ -96,13 +96,14 @@ class UserTest extends Base $this->assertEquals('you', $users[2]['username']); } - public function testGetList() + public function testGetActiveUsersList() { $u = new User($this->container); $this->assertEquals(2, $u->create(array('username' => 'you'))); $this->assertEquals(3, $u->create(array('username' => 'me', 'name' => 'Me too'))); + $this->assertEquals(4, $u->create(array('username' => 'foobar', 'is_active' => 0))); - $users = $u->getList(); + $users = $u->getActiveUsersList(); $expected = array( 1 => 'admin', @@ -112,7 +113,7 @@ class UserTest extends Base $this->assertEquals($expected, $users); - $users = $u->getList(true); + $users = $u->getActiveUsersList(true); $expected = array( User::EVERYBODY_ID => 'Everybody', @@ -391,4 +392,24 @@ class UserTest extends Base $this->assertEquals('toto', $user['username']); $this->assertEmpty($user['token']); } + + public function testEnableDisable() + { + $userModel = new User($this->container); + $this->assertEquals(2, $userModel->create(array('username' => 'toto'))); + + $this->assertTrue($userModel->isActive(2)); + $user = $userModel->getById(2); + $this->assertEquals(1, $user['is_active']); + + $this->assertTrue($userModel->disable(2)); + $user = $userModel->getById(2); + $this->assertEquals(0, $user['is_active']); + $this->assertFalse($userModel->isActive(2)); + + $this->assertTrue($userModel->enable(2)); + $user = $userModel->getById(2); + $this->assertEquals(1, $user['is_active']); + $this->assertTrue($userModel->isActive(2)); + } } -- cgit v1.2.3
    order(t('Id'), 'id') ?>order(t('Username'), 'username') ?>order(t('Name'), 'name') ?>order(t('Email'), 'email') ?>order(t('Role'), 'role') ?>order(t('Two factor authentication'), 'twofactor_activated') ?>order(t('Notifications'), 'notifications_enabled') ?>order(t('Account type'), 'is_ldap_user') ?>order(t('Username'), 'username') ?>order(t('Name'), 'name') ?>order(t('Email'), 'email') ?>order(t('Role'), 'role') ?>order(t('Two Factor'), 'twofactor_activated') ?>order(t('Account type'), 'is_ldap_user') ?>order(t('Status'), 'is_active') ?>
    - url->link('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?> - +   url->link($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?> @@ -44,14 +42,17 @@ - - + + + + - + - + render('user/dropdown', array('user' => $user)) ?>