diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 14:29:07 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 14:29:07 -0400 |
commit | 9e218032c485b7ab6ef8e00f45890151988b0f90 (patch) | |
tree | 6eb1d18b2228c792620cc2b0233fa4e86c7182d7 /app/Template | |
parent | 8d12e2fe736a72d6ad69807ac853a7e325c8cbf3 (diff) |
Split Gantt controller
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/dashboard/projects.php | 4 | ||||
-rw-r--r-- | app/Template/project/dropdown.php | 4 | ||||
-rw-r--r-- | app/Template/project_gantt/show.php (renamed from app/Template/gantt/projects.php) | 2 | ||||
-rw-r--r-- | app/Template/project_header/views.php | 6 | ||||
-rw-r--r-- | app/Template/project_list/show.php | 4 | ||||
-rw-r--r-- | app/Template/project_user_overview/layout.php | 4 | ||||
-rw-r--r-- | app/Template/project_user_overview/roles.php | 2 | ||||
-rw-r--r-- | app/Template/task_gantt/show.php (renamed from app/Template/gantt/project.php) | 12 | ||||
-rw-r--r-- | app/Template/task_gantt_creation/show.php (renamed from app/Template/gantt/task_creation.php) | 4 |
9 files changed, 21 insertions, 21 deletions
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 @@ <?php endif ?> </td> <td> - <?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?> - <?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> + <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> + <?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'TaskGanttController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> <?php endif ?> <?= $this->url->link('<i class="fa fa-list"></i>', 'TaskListController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('List')) ?> 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 @@ <i class="fa fa-list fa-fw"></i> <?= $this->url->link(t('Listing'), 'TaskListController', 'show', array('project_id' => $project['id'])) ?> </li> - <?php if ($this->user->hasProjectAccess('Gantt', 'project', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> <li> <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> diff --git a/app/Template/gantt/projects.php b/app/Template/project_gantt/show.php index 9241e372..af22a6ed 100644 --- a/app/Template/gantt/projects.php +++ b/app/Template/project_gantt/show.php @@ -16,7 +16,7 @@ <div id="gantt-chart" data-records='<?= json_encode($projects, JSON_HEX_APOS) ?>' - data-save-url="<?= $this->url->href('gantt', 'saveProjectDate') ?>" + data-save-url="<?= $this->url->href('ProjectGanttController', 'save') ?>" data-label-project-manager="<?= t('Project managers') ?>" data-label-project-member="<?= t('Project members') ?>" data-label-gantt-link="<?= t('Gantt chart for this project') ?>" 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 @@ <i class="fa fa-list fa-fw"></i> <?= $this->url->link(t('List'), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> </li> - <?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?> - <li <?= $this->app->checkMenuSelection('Gantt') ?>> + <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> + <li <?= $this->app->checkMenuSelection('TaskGanttController') ?>> <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> + <?= $this->url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> </li> <?php endif ?> </ul> 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 @@ <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?> <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'ProjectUserOverviewController', 'managers') ?></li> <?php endif ?> - <?php if ($this->user->hasAccess('gantt', 'projects')): ?> - <li><i class="fa fa-sliders fa-fw"></i><?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?></li> + <?php if ($this->user->hasAccess('ProjectGanttController', 'show')): ?> + <li><i class="fa fa-sliders fa-fw"></i><?= $this->url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?></li> <?php endif ?> </ul> </div> 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 @@ <i class="fa fa-folder fa-fw"></i> <?= $this->url->link(t('Projects list'), 'ProjectListController', 'show') ?> </li> - <?php if ($this->user->hasAccess('gantt', 'projects')): ?> + <?php if ($this->user->hasAccess('ProjectGanttController', 'show')): ?> <li> <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?> + <?= $this->url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?> </li> <?php endif ?> </ul> 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 @@ </td> <td> <?= $this->url->link('<i class="fa fa-th"></i>', 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?> - <?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> + <?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'TaskGanttController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?> <?= $this->url->link('<i class="fa fa-cog fa-fw"></i>', 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?> <?= $this->text->e($project['project_name']) ?> diff --git a/app/Template/gantt/project.php b/app/Template/task_gantt/show.php index e6c8592f..c5d338fb 100644 --- a/app/Template/gantt/project.php +++ b/app/Template/task_gantt/show.php @@ -1,18 +1,18 @@ <section id="main"> - <?= $this->projectHeader->render($project, 'Gantt', 'project') ?> + <?= $this->projectHeader->render($project, 'TaskGanttController', 'show') ?> <div class="menu-inline"> <ul> <li <?= $sorting === 'board' ? 'class="active"' : '' ?>> <i class="fa fa-sort-numeric-asc fa-fw"></i> - <?= $this->url->link(t('Sort by position'), 'gantt', 'project', array('project_id' => $project['id'], 'sorting' => 'board')) ?> + <?= $this->url->link(t('Sort by position'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'board')) ?> </li> <li <?= $sorting === 'date' ? 'class="active"' : '' ?>> <i class="fa fa-sort-amount-asc fa-fw"></i> - <?= $this->url->link(t('Sort by date'), 'gantt', 'project', array('project_id' => $project['id'], 'sorting' => 'date')) ?> + <?= $this->url->link(t('Sort by date'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'date')) ?> </li> <li> <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add task'), 'gantt', 'task', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->url->link(t('Add task'), 'TaskGanttCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> </li> </ul> </div> @@ -21,7 +21,7 @@ <div id="gantt-chart" data-records='<?= json_encode($tasks, JSON_HEX_APOS) ?>' - data-save-url="<?= $this->url->href('gantt', 'saveTaskDate', array('project_id' => $project['id'])) ?>" + data-save-url="<?= $this->url->href('TaskGanttController', 'save', array('project_id' => $project['id'])) ?>" data-label-start-date="<?= t('Start date:') ?>" data-label-end-date="<?= t('Due date:') ?>" data-label-assignee="<?= t('Assignee:') ?>" @@ -31,4 +31,4 @@ <?php else: ?> <p class="alert"><?= t('There is no task in your project.') ?></p> <?php endif ?> -</section>
\ No newline at end of file +</section> diff --git a/app/Template/gantt/task_creation.php b/app/Template/task_gantt_creation/show.php index 673bd019..683bc8c8 100644 --- a/app/Template/gantt/task_creation.php +++ b/app/Template/task_gantt_creation/show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('New task') ?></h2> </div> -<form method="post" action="<?= $this->url->href('gantt', 'saveTask', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TaskGanttCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->hidden('column_id', $values) ?> @@ -30,6 +30,6 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'TaskGanttController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> </div> </form> |