From ff892c5d25e0bab560f005c788189d38c2bcab7b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 25 May 2016 22:28:09 -0400 Subject: Split project controller into multiple classes --- app/Template/dashboard/layout.php | 4 +- app/Template/gantt/projects.php | 2 +- app/Template/header.php | 2 +- app/Template/project/disable.php | 14 ----- app/Template/project/dropdown.php | 2 +- app/Template/project/duplicate.php | 28 ---------- app/Template/project/enable.php | 14 ----- app/Template/project/index.php | 85 ----------------------------- app/Template/project/integrations.php | 15 ----- app/Template/project/notifications.php | 20 ------- app/Template/project/remove.php | 14 ----- app/Template/project/share.php | 19 ------- app/Template/project/show.php | 85 ----------------------------- app/Template/project/sidebar.php | 34 ++++++------ app/Template/project_creation/create.php | 4 +- app/Template/project_header/dropdown.php | 4 +- app/Template/project_list/show.php | 85 +++++++++++++++++++++++++++++ app/Template/project_status/disable.php | 14 +++++ app/Template/project_status/enable.php | 14 +++++ app/Template/project_status/remove.php | 14 +++++ app/Template/project_user/layout.php | 2 +- app/Template/project_user/roles.php | 4 +- app/Template/project_view/duplicate.php | 28 ++++++++++ app/Template/project_view/integrations.php | 15 +++++ app/Template/project_view/notifications.php | 20 +++++++ app/Template/project_view/share.php | 18 ++++++ app/Template/project_view/show.php | 85 +++++++++++++++++++++++++++++ 27 files changed, 322 insertions(+), 323 deletions(-) delete mode 100644 app/Template/project/disable.php delete mode 100644 app/Template/project/duplicate.php delete mode 100644 app/Template/project/enable.php delete mode 100644 app/Template/project/index.php delete mode 100644 app/Template/project/integrations.php delete mode 100644 app/Template/project/notifications.php delete mode 100644 app/Template/project/remove.php delete mode 100644 app/Template/project/share.php delete mode 100644 app/Template/project/show.php create mode 100644 app/Template/project_list/show.php create mode 100644 app/Template/project_status/disable.php create mode 100644 app/Template/project_status/enable.php create mode 100644 app/Template/project_status/remove.php create mode 100644 app/Template/project_view/duplicate.php create mode 100644 app/Template/project_view/integrations.php create mode 100644 app/Template/project_view/notifications.php create mode 100644 app/Template/project_view/share.php create mode 100644 app/Template/project_view/show.php (limited to 'app/Template') diff --git a/app/Template/dashboard/layout.php b/app/Template/dashboard/layout.php index 2a32ac02..187f7f42 100644 --- a/app/Template/dashboard/layout.php +++ b/app/Template/dashboard/layout.php @@ -19,7 +19,7 @@
  • - url->link(t('Project management'), 'project', 'index') ?> + url->link(t('Project management'), 'ProjectListController', 'show') ?>
  • @@ -29,4 +29,4 @@ - \ No newline at end of file + diff --git a/app/Template/gantt/projects.php b/app/Template/gantt/projects.php index a072452d..b8431d03 100644 --- a/app/Template/gantt/projects.php +++ b/app/Template/gantt/projects.php @@ -2,7 +2,7 @@ diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php new file mode 100644 index 00000000..06e4a626 --- /dev/null +++ b/app/Template/project_list/show.php @@ -0,0 +1,85 @@ +
    + + isEmpty()): ?> +

    + + + + + + + + + + user->hasAccess('projectuser', 'managers')): ?> + + + + + getCollection() as $project): ?> + + + + + + + + user->hasAccess('projectuser', 'managers')): ?> + + + + + +
    order(t('Id'), 'id') ?>order(t('Status'), 'is_active') ?>order(t('Project'), 'name') ?>order(t('Start date'), 'start_date') ?>order(t('End date'), 'end_date') ?>order(t('Owner'), 'owner_id') ?>
    + render('project/dropdown', array('project' => $project)) ?> + + + + + + + + url->link($this->text->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?> + + + + + + + + + + + + + + + dt->date($project['start_date']) ?> + + dt->date($project['end_date']) ?> + + 0): ?> + text->e($project['owner_name'] ?: $project['owner_username']) ?> + + + + + + + + text->e($column['title']) ?> + +
    + + + +
    diff --git a/app/Template/project_status/disable.php b/app/Template/project_status/disable.php new file mode 100644 index 00000000..d8145d3c --- /dev/null +++ b/app/Template/project_status/disable.php @@ -0,0 +1,14 @@ + + +
    +

    + +

    + +
    + url->link(t('Yes'), 'ProjectStatusController', 'disable', array('project_id' => $project['id']), true, 'btn btn-red') ?> + url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> +
    +
    diff --git a/app/Template/project_status/enable.php b/app/Template/project_status/enable.php new file mode 100644 index 00000000..1f76d093 --- /dev/null +++ b/app/Template/project_status/enable.php @@ -0,0 +1,14 @@ + + +
    +

    + +

    + +
    + url->link(t('Yes'), 'ProjectStatusController', 'enable', array('project_id' => $project['id']), true, 'btn btn-red') ?> + url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> +
    +
    diff --git a/app/Template/project_status/remove.php b/app/Template/project_status/remove.php new file mode 100644 index 00000000..8959ef75 --- /dev/null +++ b/app/Template/project_status/remove.php @@ -0,0 +1,14 @@ + + +
    +

    + +

    + +
    + url->link(t('Yes'), 'ProjectStatusController', 'remove', array('project_id' => $project['id']), true, 'btn btn-red') ?> + url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> +
    +
    diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php index 7a7c1a50..ab4326f6 100644 --- a/app/Template/project_user/layout.php +++ b/app/Template/project_user/layout.php @@ -3,7 +3,7 @@