From fd60964c239627d2d55c6eca0888be84a8f6653f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 22 Aug 2015 16:20:53 -0400 Subject: Add global Gantt chart for all projects --- ChangeLog | 3 +- app/Controller/Gantt.php | 43 ++++++++++- app/Locale/cs_CZ/translations.php | 9 +++ app/Locale/da_DK/translations.php | 9 +++ app/Locale/de_DE/translations.php | 9 +++ app/Locale/es_ES/translations.php | 9 +++ app/Locale/fi_FI/translations.php | 9 +++ app/Locale/fr_FR/translations.php | 9 +++ app/Locale/hu_HU/translations.php | 9 +++ app/Locale/it_IT/translations.php | 9 +++ app/Locale/ja_JP/translations.php | 9 +++ app/Locale/nb_NO/translations.php | 9 +++ app/Locale/nl_NL/translations.php | 9 +++ app/Locale/pl_PL/translations.php | 9 +++ app/Locale/pt_BR/translations.php | 9 +++ app/Locale/pt_PT/translations.php | 9 +++ app/Locale/ru_RU/translations.php | 9 +++ app/Locale/sr_Latn_RS/translations.php | 9 +++ app/Locale/sv_SE/translations.php | 9 +++ app/Locale/th_TH/translations.php | 9 +++ app/Locale/tr_TR/translations.php | 9 +++ app/Locale/zh_CN/translations.php | 9 +++ app/Model/Acl.php | 3 +- app/Model/DateParser.php | 14 +++- app/Model/Project.php | 51 ++++++++++++- app/Model/ProjectPermission.php | 41 ++++++---- app/Model/TaskFilter.php | 1 + app/Template/gantt/project.php | 4 +- app/Template/gantt/projects.php | 36 +++++++++ app/Template/project/index.php | 3 +- app/Template/project/show.php | 8 ++ app/Template/project_user/layout.php | 8 +- assets/css/app.css | 2 +- assets/css/src/gantt.css | 12 +++ assets/js/app.js | 2 +- assets/js/src/Gantt.js | 135 +++++++++++++++++++++++---------- docs/gantt-chart-projects.markdown | 16 ++++ docs/gantt-chart-tasks.markdown | 20 +++++ docs/gantt-chart.markdown | 17 ----- docs/index.markdown | 3 +- 40 files changed, 515 insertions(+), 87 deletions(-) create mode 100644 app/Template/gantt/projects.php create mode 100644 docs/gantt-chart-projects.markdown create mode 100644 docs/gantt-chart-tasks.markdown delete mode 100644 docs/gantt-chart.markdown diff --git a/ChangeLog b/ChangeLog index 796a119d..a7c75870 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,8 +3,9 @@ Version 1.0.18 (unreleased) New features: +* Add users and categories filters on the board * Add hide/show columns -* Add Gantt chart for projects +* Add Gantt chart for projects and tasks * Add new role "Project Administrator" * Add login bruteforce protection with captcha and account lockdown * Add new api procedures: getDefaultTaskColor(), getDefaultTaskColors() and getColorList() diff --git a/app/Controller/Gantt.php b/app/Controller/Gantt.php index f450bca3..f73501c3 100644 --- a/app/Controller/Gantt.php +++ b/app/Controller/Gantt.php @@ -13,7 +13,46 @@ use Model\Task as TaskModel; class Gantt extends Base { /** - * Show Gantt chart for projects + * Show Gantt chart for all projects + */ + public function projects() + { + if ($this->userSession->isAdmin()) { + $project_ids = $this->project->getAllIds(); + } + else { + $project_ids = $this->projectPermission->getMemberProjectIds($this->userSession->getId()); + } + + $this->response->html($this->template->layout('gantt/projects', array( + 'projects' => $this->project->getGanttBars($project_ids), + 'title' => t('Gantt chart for all projects'), + 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()), + ))); + } + + /** + * Save new project start date and end date + */ + public function saveProjectDate() + { + $values = $this->request->getJson(); + + $result = $this->project->update(array( + 'id' => $values['id'], + 'start_date' => $this->dateParser->getIsoDate(strtotime($values['start'])), + 'end_date' => $this->dateParser->getIsoDate(strtotime($values['end'])), + )); + + if (! $result) { + $this->response->json(array('message' => 'Unable to save project'), 400); + } + + $this->response->json(array('message' => 'OK'), 201); + } + + /** + * Show Gantt chart for one project */ public function project() { @@ -40,7 +79,7 @@ class Gantt extends Base /** * Save new task start date and due date */ - public function saveDate() + public function saveTaskDate() { $this->getProject(); $values = $this->request->getJson(); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 3bc98419..ed20a607 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index c889c90c..15ac90e8 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 913e8d06..245d974d 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 968bf55b..eaef0bce 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1040,4 +1040,13 @@ return array( 'Shared project' => 'Proyecto compartido', 'Project managers' => 'Administradores de proyecto', 'Project members' => 'Miembros de proyecto', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index aa490d3f..ecc70961 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 153c4476..f1594004 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1042,4 +1042,13 @@ return array( 'Shared project' => 'Projet partagé', 'Project managers' => 'Gestionnaires de projet', 'Project members' => 'Membres de projet', + 'Gantt chart for all projects' => 'Diagramme de Gantt pour tous les projets', + 'Projects list' => 'List des projets', + 'Gantt chart for this project' => 'Diagramme de Gantt pour ce projet', + 'Project board' => 'Tableau du projet', + 'End date:' => 'Date de fin :', + 'There is no start date or end date for this project.' => 'Il n\'y a pas de date de début ou de date de fin pour ce projet.', + 'Projects Gantt chart' => 'Diagramme de Gantt des projets', + 'Start date: %s' => 'Date de début : %s', + 'End date: %s' => 'Date de fin : %s', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 7b7d61fd..65ff8a18 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 6a617395..f63dfbec 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 42fb293f..5984bc11 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 69c79251..523d6101 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index a2f7099d..b4e67e6b 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index f937aa7b..ecf00553 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 7b33333c..348886b3 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 58f32772..79c09f74 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index c90ba162..6f891d1c 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index dbc5d9aa..ca1f786b 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 7a38ee78..0f3b18fe 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 7d301973..0d68fd4c 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index c51be0bd..4b91c822 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index c9122bfd..12978c9c 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1040,4 +1040,13 @@ return array( // 'Shared project' => '', // 'Project managers' => '', // 'Project members' => '', + // 'Gantt chart for all projects' => '', + // 'Projects list' => '', + // 'Gantt chart for this project' => '', + // 'Project board' => '', + // 'End date:' => '', + // 'There is no start date or end date for this project.' => '', + // 'Projects Gantt chart' => '', + // 'Start date: %s' => '', + // 'End date: %s' => '', ); diff --git a/app/Model/Acl.php b/app/Model/Acl.php index b1e9eb07..e93bf1d9 100644 --- a/app/Model/Acl.php +++ b/app/Model/Acl.php @@ -65,7 +65,7 @@ class Acl extends Base 'project' => array('edit', 'update', 'share', 'integration', 'users', 'alloweverybody', 'allow', 'setowner', 'revoke', 'duplicate', 'disable', 'enable'), 'swimlane' => '*', 'budget' => '*', - 'gantt' => '*', + 'gantt' => array('project', 'savetaskdate', 'task', 'savetask'), ); /** @@ -77,6 +77,7 @@ class Acl extends Base private $project_admin_acl = array( 'project' => array('remove'), 'projectuser' => '*', + 'gantt' => array('projects', 'saveprojectdate'), ); /** diff --git a/app/Model/DateParser.php b/app/Model/DateParser.php index 036725e3..6e833061 100644 --- a/app/Model/DateParser.php +++ b/app/Model/DateParser.php @@ -77,7 +77,7 @@ class DateParser extends Base } /** - * Parse a date ad return a unix timestamp, try different date formats + * Parse a date and return a unix timestamp, try different date formats * * @access public * @param string $value Date to parse @@ -96,6 +96,18 @@ class DateParser extends Base return 0; } + /** + * Get ISO8601 date from user input + * + * @access public + * @param string $value Date to parse + * @return string + */ + public function getIsoDate($value) + { + return date('Y-m-d', ctype_digit($value) ? $value : $this->getTimestamp($value)); + } + /** * Get all combinations of date/time formats * diff --git a/app/Model/Project.php b/app/Model/Project.php index 161a0cae..52500820 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -114,6 +114,54 @@ class Project extends Base return $this->db->table(self::TABLE)->eq('id', $project_id)->eq('is_private', 1)->exists(); } + /** + * Get all projects to generate the Gantt chart + * + * @access public + * @param array $project_ids + * @return array + */ + public function getGanttBars(array $project_ids) + { + if (empty($project_ids)) { + return array(); + } + + $colors = $this->color->getDefaultColors(); + $projects = $this->db->table(self::TABLE)->asc('start_date')->in('id', $project_ids)->eq('is_active', self::ACTIVE)->eq('is_private', 0)->findAll(); + $bars = array(); + + foreach ($projects as $project) { + $start = empty($project['start_date']) ? time() : strtotime($project['start_date']); + $end = empty($project['end_date']) ? $start : strtotime($project['end_date']); + $color = next($colors) ?: reset($colors); + + $bars[] = array( + 'type' => 'project', + 'id' => $project['id'], + 'title' => $project['name'], + 'start' => array( + (int) date('Y', $start), + (int) date('n', $start), + (int) date('j', $start), + ), + 'end' => array( + (int) date('Y', $end), + (int) date('n', $end), + (int) date('j', $end), + ), + 'link' => $this->helper->url->href('project', 'show', array('project_id' => $project['id'])), + 'board_link' => $this->helper->url->href('board', 'show', array('project_id' => $project['id'])), + 'gantt_link' => $this->helper->url->href('gantt', 'project', array('project_id' => $project['id'])), + 'color' => $color, + 'not_defined' => empty($project['start_date']) || empty($project['end_date']), + 'users' => $this->projectPermission->getProjectUsers($project['id']), + ); + } + + return $bars; + } + /** * Get all projects * @@ -271,8 +319,7 @@ class Project extends Base { foreach ($projects as &$project) { $this->getColumnStats($project); - $project['managers'] = $this->projectPermission->getManagers($project['id']); - $project['members'] = $this->projectPermission->getOnlyMembers($project['id']); + $project = array_merge($project, $this->projectPermission->getProjectUsers($project['id'])); } return $projects; diff --git a/app/Model/ProjectPermission.php b/app/Model/ProjectPermission.php index 03e9bea6..c412b7a9 100644 --- a/app/Model/ProjectPermission.php +++ b/app/Model/ProjectPermission.php @@ -50,40 +50,49 @@ class ProjectPermission extends Base } /** - * Get a list of allowed people for a project + * Get a list of members and managers with a single SQL query * * @access public * @param integer $project_id Project id * @return array */ - public function getMembers($project_id) + public function getProjectUsers($project_id) { - if ($this->isEverybodyAllowed($project_id)) { - return $this->user->getList(); + $result = array( + 'managers' => array(), + 'members' => array(), + ); + + $users = $this->db + ->table(self::TABLE) + ->join(User::TABLE, 'id', 'user_id') + ->eq('project_id', $project_id) + ->asc('username') + ->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name', self::TABLE.'.is_owner') + ->findAll(); + + foreach ($users as $user) { + $key = $user['is_owner'] == 1 ? 'managers' : 'members'; + $result[$key][$user['id']] = $user['name'] ?: $user['username']; } - return $this->getAssociatedUsers($project_id); + return $result; } /** - * Get a list of standard user members for a project + * Get a list of allowed people for a project * * @access public * @param integer $project_id Project id * @return array */ - public function getOnlyMembers($project_id) + public function getMembers($project_id) { - $users = $this->db - ->table(self::TABLE) - ->join(User::TABLE, 'id', 'user_id') - ->eq('project_id', $project_id) - ->eq('is_owner', 0) - ->asc('username') - ->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name') - ->findAll(); + if ($this->isEverybodyAllowed($project_id)) { + return $this->user->getList(); + } - return $this->user->prepareList($users); + return $this->getAssociatedUsers($project_id); } /** diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php index cede59e3..d72af68c 100644 --- a/app/Model/TaskFilter.php +++ b/app/Model/TaskFilter.php @@ -726,6 +726,7 @@ class TaskFilter extends Base $end = $task['date_due'] ?: $start; $bars[] = array( + 'type' => 'task', 'id' => $task['id'], 'title' => $task['title'], 'start' => array( diff --git a/app/Template/gantt/project.php b/app/Template/gantt/project.php index ec45f7f6..7ad859c7 100644 --- a/app/Template/gantt/project.php +++ b/app/Template/gantt/project.php @@ -35,8 +35,8 @@
+ +
+ +

+ +
+ +
+ diff --git a/app/Template/project/index.php b/app/Template/project/index.php index f24a8c4a..5ca6e6b5 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -6,7 +6,8 @@
  • url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?>
  • user->isProjectAdmin() || $this->user->isAdmin()): ?> -
  • url->link(t('Users overview'), 'projectuser', 'managers') ?>
  • +
  • url->link(t('Users overview'), 'projectuser', 'managers') ?>
  • +
  • url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?>
  • diff --git a/app/Template/project/show.php b/app/Template/project/show.php index d8d6de8d..5a65a26e 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -20,6 +20,14 @@
  • + +
  • + + + +
  • + + 0): ?> 0): ?> diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php index a68fc579..4cf732d6 100644 --- a/app/Template/project_user/layout.php +++ b/app/Template/project_user/layout.php @@ -10,8 +10,14 @@
  • - url->link(t('All projects'), 'project', 'index') ?> + url->link(t('Projects list'), 'project', 'index') ?>
  • + user->isProjectAdmin() || $this->user->isAdmin()): ?> +
  • + + url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?> +
  • +