From 9e218032c485b7ab6ef8e00f45890151988b0f90 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 May 2016 14:29:07 -0400 Subject: Split Gantt controller --- app/Template/dashboard/projects.php | 4 +-- app/Template/gantt/project.php | 34 -------------------------- app/Template/gantt/projects.php | 30 ----------------------- app/Template/gantt/task_creation.php | 35 --------------------------- app/Template/project/dropdown.php | 4 +-- app/Template/project_gantt/show.php | 30 +++++++++++++++++++++++ app/Template/project_header/views.php | 6 ++--- app/Template/project_list/show.php | 4 +-- app/Template/project_user_overview/layout.php | 4 +-- app/Template/project_user_overview/roles.php | 2 +- app/Template/task_gantt/show.php | 34 ++++++++++++++++++++++++++ app/Template/task_gantt_creation/show.php | 35 +++++++++++++++++++++++++++ 12 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 app/Template/gantt/project.php delete mode 100644 app/Template/gantt/projects.php delete mode 100644 app/Template/gantt/task_creation.php create mode 100644 app/Template/project_gantt/show.php create mode 100644 app/Template/task_gantt/show.php create mode 100644 app/Template/task_gantt_creation/show.php (limited to 'app/Template') diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php index 4d33519a..4aa40621 100644 --- a/app/Template/dashboard/projects.php +++ b/app/Template/dashboard/projects.php @@ -22,8 +22,8 @@ - user->hasProjectAccess('gantt', 'project', $project['id'])): ?> - url->link('', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> + user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> + url->link('', 'TaskGanttController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> url->link('', 'TaskListController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('List')) ?>  diff --git a/app/Template/gantt/project.php b/app/Template/gantt/project.php deleted file mode 100644 index e6c8592f..00000000 --- a/app/Template/gantt/project.php +++ /dev/null @@ -1,34 +0,0 @@ -
- projectHeader->render($project, 'Gantt', 'project') ?> - - - -
-

- -

- -
\ No newline at end of file diff --git a/app/Template/gantt/projects.php b/app/Template/gantt/projects.php deleted file mode 100644 index 9241e372..00000000 --- a/app/Template/gantt/projects.php +++ /dev/null @@ -1,30 +0,0 @@ -
- -
- -

- -
- -
-
diff --git a/app/Template/gantt/task_creation.php b/app/Template/gantt/task_creation.php deleted file mode 100644 index 673bd019..00000000 --- a/app/Template/gantt/task_creation.php +++ /dev/null @@ -1,35 +0,0 @@ - -
- form->csrf() ?> - form->hidden('project_id', $values) ?> - form->hidden('column_id', $values) ?> - form->hidden('position', $values) ?> - -
- form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> - - form->label(t('Description'), 'description') ?> - form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"'), 'markdown-editor') ?> - - render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> -
- -
- task->selectAssignee($users_list, $values, $errors) ?> - task->selectCategory($categories_list, $values, $errors) ?> - task->selectSwimlane($swimlanes_list, $values, $errors) ?> - task->selectPriority($project, $values) ?> - task->selectScore($values, $errors) ?> - task->selectStartDate($values, $errors) ?> - task->selectDueDate($values, $errors) ?> -
- -
- - - url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> -
-
diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index c803384a..90dccf21 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -13,10 +13,10 @@ url->link(t('Listing'), 'TaskListController', 'show', array('project_id' => $project['id'])) ?> - user->hasProjectAccess('Gantt', 'project', $project['id'])): ?> + user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?>
  • - url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'])) ?> + url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'])) ?>
  • diff --git a/app/Template/project_gantt/show.php b/app/Template/project_gantt/show.php new file mode 100644 index 00000000..af22a6ed --- /dev/null +++ b/app/Template/project_gantt/show.php @@ -0,0 +1,30 @@ +
    + +
    + +

    + +
    + +
    +
    diff --git a/app/Template/project_header/views.php b/app/Template/project_header/views.php index 53ca6fd8..3a41c91b 100644 --- a/app/Template/project_header/views.php +++ b/app/Template/project_header/views.php @@ -15,10 +15,10 @@ url->link(t('List'), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> - user->hasProjectAccess('gantt', 'project', $project['id'])): ?> -
  • app->checkMenuSelection('Gantt') ?>> + user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> +
  • app->checkMenuSelection('TaskGanttController') ?>> - url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> + url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?>
  • diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php index 75b5495f..8b9f1396 100644 --- a/app/Template/project_list/show.php +++ b/app/Template/project_list/show.php @@ -4,8 +4,8 @@ user->hasAccess('ProjectUserOverviewController', 'managers')): ?>
  • url->link(t('Users overview'), 'ProjectUserOverviewController', 'managers') ?>
  • - user->hasAccess('gantt', 'projects')): ?> -
  • url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?>
  • + user->hasAccess('ProjectGanttController', 'show')): ?> +
  • url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?>
  • diff --git a/app/Template/project_user_overview/layout.php b/app/Template/project_user_overview/layout.php index ab4326f6..19b83436 100644 --- a/app/Template/project_user_overview/layout.php +++ b/app/Template/project_user_overview/layout.php @@ -5,10 +5,10 @@ url->link(t('Projects list'), 'ProjectListController', 'show') ?> - user->hasAccess('gantt', 'projects')): ?> + user->hasAccess('ProjectGanttController', 'show')): ?>
  • - url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?> + url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?>
  • diff --git a/app/Template/project_user_overview/roles.php b/app/Template/project_user_overview/roles.php index 39412aab..87c8df85 100644 --- a/app/Template/project_user_overview/roles.php +++ b/app/Template/project_user_overview/roles.php @@ -14,7 +14,7 @@ url->link('', 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?> - url->link('', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> + url->link('', 'TaskGanttController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> url->link('', 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?> text->e($project['project_name']) ?> diff --git a/app/Template/task_gantt/show.php b/app/Template/task_gantt/show.php new file mode 100644 index 00000000..c5d338fb --- /dev/null +++ b/app/Template/task_gantt/show.php @@ -0,0 +1,34 @@ +
    + projectHeader->render($project, 'TaskGanttController', 'show') ?> + + + +
    +

    + +

    + +
    diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php new file mode 100644 index 00000000..683bc8c8 --- /dev/null +++ b/app/Template/task_gantt_creation/show.php @@ -0,0 +1,35 @@ + +
    + form->csrf() ?> + form->hidden('project_id', $values) ?> + form->hidden('column_id', $values) ?> + form->hidden('position', $values) ?> + +
    + form->label(t('Title'), 'title') ?> + form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> + + form->label(t('Description'), 'description') ?> + form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"'), 'markdown-editor') ?> + + render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> +
    + +
    + task->selectAssignee($users_list, $values, $errors) ?> + task->selectCategory($categories_list, $values, $errors) ?> + task->selectSwimlane($swimlanes_list, $values, $errors) ?> + task->selectPriority($project, $values) ?> + task->selectScore($values, $errors) ?> + task->selectStartDate($values, $errors) ?> + task->selectDueDate($values, $errors) ?> +
    + +
    + + + url->link(t('cancel'), 'TaskGanttController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> +
    +
    -- cgit v1.2.3