From 9fb2e711899ae328a7a09295468793ffbc16c27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Wed, 3 Dec 2014 21:59:48 -0500 Subject: [PATCH] Move tasks templates to a subfolder --- app/Controller/Base.php | 2 +- app/Controller/Task.php | 28 ++++++------ app/Template/project/search.php | 2 +- app/Template/project/tasks.php | 2 +- app/Template/task/close.php | 15 +++++++ .../{task_comments.php => task/comments.php} | 0 .../{task_details.php => task/details.php} | 2 +- app/Template/task/duplicate.php | 15 +++++++ .../duplicate_project.php} | 4 +- app/Template/{task_edit.php => task/edit.php} | 6 +-- .../edit_description.php} | 6 +-- .../{task_layout.php => task/layout.php} | 2 +- .../move_project.php} | 4 +- app/Template/{task_new.php => task/new.php} | 0 app/Template/task/open.php | 15 +++++++ .../{task_public.php => task/public.php} | 4 +- app/Template/task/remove.php | 15 +++++++ app/Template/task/show.php | 7 +++ .../show_description.php} | 0 app/Template/task/sidebar.php | 44 +++++++++++++++++++ .../{task_table.php => task/table.php} | 4 +- app/Template/{task_time.php => task/time.php} | 0 .../timesheet.php} | 0 app/Template/task_close.php | 14 ------ app/Template/task_duplicate.php | 14 ------ app/Template/task_open.php | 14 ------ app/Template/task_remove.php | 14 ------ app/Template/task_show.php | 7 --- app/Template/task_sidebar.php | 24 ---------- 29 files changed, 144 insertions(+), 120 deletions(-) create mode 100644 app/Template/task/close.php rename app/Template/{task_comments.php => task/comments.php} (100%) rename app/Template/{task_details.php => task/details.php} (94%) create mode 100644 app/Template/task/duplicate.php rename app/Template/{task_duplicate_project.php => task/duplicate_project.php} (68%) rename app/Template/{task_edit.php => task/edit.php} (87%) rename app/Template/{task_edit_description.php => task/edit_description.php} (77%) rename app/Template/{task_layout.php => task/layout.php} (86%) rename app/Template/{task_move_project.php => task/move_project.php} (67%) rename app/Template/{task_new.php => task/new.php} (100%) create mode 100644 app/Template/task/open.php rename app/Template/{task_public.php => task/public.php} (85%) create mode 100644 app/Template/task/remove.php create mode 100644 app/Template/task/show.php rename app/Template/{task_show_description.php => task/show_description.php} (100%) create mode 100644 app/Template/task/sidebar.php rename app/Template/{task_table.php => task/table.php} (87%) rename app/Template/{task_time.php => task/time.php} (100%) rename app/Template/{task_timesheet.php => task/timesheet.php} (100%) delete mode 100644 app/Template/task_close.php delete mode 100644 app/Template/task_duplicate.php delete mode 100644 app/Template/task_open.php delete mode 100644 app/Template/task_remove.php delete mode 100644 app/Template/task_show.php delete mode 100644 app/Template/task_sidebar.php diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 9f799a8fc..5027cf312 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -282,7 +282,7 @@ abstract class Base $params['title'] = $params['task']['project_name'].' > '.$params['task']['title']; $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId()); - return $this->template->layout('task_layout', $params); + return $this->template->layout('task/layout', $params); } /** diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 481d0ccd6..8d38317c3 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -32,7 +32,7 @@ class Task extends Base $this->notfound(true); } - $this->response->html($this->template->layout('task_public', array( + $this->response->html($this->template->layout('task/public', array( 'project' => $project, 'comments' => $this->comment->getAll($task['id']), 'subtasks' => $this->subTask->getAll($task['id']), @@ -65,7 +65,7 @@ class Task extends Base $this->dateParser->format($values, array('date_started')); - $this->response->html($this->taskLayout('task_show', array( + $this->response->html($this->taskLayout('task/show', array( 'project' => $this->project->getById($task['project_id']), 'files' => $this->file->getAll($task['id']), 'comments' => $this->comment->getAll($task['id']), @@ -101,7 +101,7 @@ class Task extends Base ); } - $this->response->html($this->template->$method('task_new', array( + $this->response->html($this->template->$method('task/new', array( 'ajax' => $this->request->isAjax(), 'errors' => $errors, 'values' => $values + array('project_id' => $project['id']), @@ -178,10 +178,10 @@ class Task extends Base ); if ($ajax) { - $this->response->html($this->template->load('task_edit', $params)); + $this->response->html($this->template->load('task/edit', $params)); } else { - $this->response->html($this->taskLayout('task_edit', $params)); + $this->response->html($this->taskLayout('task/edit', $params)); } } @@ -214,7 +214,7 @@ class Task extends Base } } - $this->response->html($this->taskLayout('task_edit', array( + $this->response->html($this->taskLayout('task/edit', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -272,7 +272,7 @@ class Task extends Base $this->response->redirect('?controller=task&action=show&task_id='.$task['id']); } - $this->response->html($this->taskLayout('task_close', array( + $this->response->html($this->taskLayout('task/close', array( 'task' => $task, ))); } @@ -299,7 +299,7 @@ class Task extends Base $this->response->redirect('?controller=task&action=show&task_id='.$task['id']); } - $this->response->html($this->taskLayout('task_open', array( + $this->response->html($this->taskLayout('task/open', array( 'task' => $task, ))); } @@ -330,7 +330,7 @@ class Task extends Base $this->response->redirect('?controller=board&action=show&project_id='.$task['project_id']); } - $this->response->html($this->taskLayout('task_remove', array( + $this->response->html($this->taskLayout('task/remove', array( 'task' => $task, ))); } @@ -358,7 +358,7 @@ class Task extends Base } } - $this->response->html($this->taskLayout('task_duplicate', array( + $this->response->html($this->taskLayout('task/duplicate', array( 'task' => $task, ))); } @@ -409,10 +409,10 @@ class Task extends Base ); if ($ajax) { - $this->response->html($this->template->load('task_edit_description', $params)); + $this->response->html($this->template->load('task/edit_description', $params)); } else { - $this->response->html($this->taskLayout('task_edit_description', $params)); + $this->response->html($this->taskLayout('task/edit_description', $params)); } } @@ -447,7 +447,7 @@ class Task extends Base } } - $this->response->html($this->taskLayout('task_move_project', array( + $this->response->html($this->taskLayout('task/move_project', array( 'values' => $values, 'errors' => $errors, 'task' => $task, @@ -486,7 +486,7 @@ class Task extends Base } } - $this->response->html($this->taskLayout('task_duplicate_project', array( + $this->response->html($this->taskLayout('task/duplicate_project', array( 'values' => $values, 'errors' => $errors, 'task' => $task, diff --git a/app/Template/project/search.php b/app/Template/project/search.php index 11e207d2a..3bad43e3c 100644 --- a/app/Template/project/search.php +++ b/app/Template/project/search.php @@ -18,7 +18,7 @@

- $tasks, 'categories' => $categories, 'columns' => $columns, diff --git a/app/Template/project/tasks.php b/app/Template/project/tasks.php index 638e4c31e..6fe20c381 100644 --- a/app/Template/project/tasks.php +++ b/app/Template/project/tasks.php @@ -10,7 +10,7 @@

- $tasks, 'categories' => $categories, 'columns' => $columns, diff --git a/app/Template/task/close.php b/app/Template/task/close.php new file mode 100644 index 000000000..062d0a883 --- /dev/null +++ b/app/Template/task/close.php @@ -0,0 +1,15 @@ + + +
+

+ +

+ +
+ $task['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + + $task['id'])) ?> +
+
\ No newline at end of file diff --git a/app/Template/task_comments.php b/app/Template/task/comments.php similarity index 100% rename from app/Template/task_comments.php rename to app/Template/task/comments.php diff --git a/app/Template/task_details.php b/app/Template/task/details.php similarity index 94% rename from app/Template/task_details.php rename to app/Template/task/details.php index bbd2d648f..b5111f782 100644 --- a/app/Template/task_details.php +++ b/app/Template/task/details.php @@ -76,7 +76,7 @@
  • - + $task['id'], 'token' => $project['token']), false, '', '', true) ?>
  • diff --git a/app/Template/task/duplicate.php b/app/Template/task/duplicate.php new file mode 100644 index 000000000..3d1829ed2 --- /dev/null +++ b/app/Template/task/duplicate.php @@ -0,0 +1,15 @@ + + +
    +

    + +

    + +
    + $task['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + + $task['id'])) ?> +
    +
    \ No newline at end of file diff --git a/app/Template/task_duplicate_project.php b/app/Template/task/duplicate_project.php similarity index 68% rename from app/Template/task_duplicate_project.php rename to app/Template/task/duplicate_project.php index 86d2114aa..45081842f 100644 --- a/app/Template/task_duplicate_project.php +++ b/app/Template/task/duplicate_project.php @@ -6,7 +6,7 @@

    -
    + @@ -17,7 +17,7 @@
    - + $task['id'])) ?>
    diff --git a/app/Template/task_edit.php b/app/Template/task/edit.php similarity index 87% rename from app/Template/task_edit.php rename to app/Template/task/edit.php index 701bd08e2..6f136cb92 100644 --- a/app/Template/task_edit.php +++ b/app/Template/task/edit.php @@ -2,7 +2,7 @@

    -
    + @@ -59,9 +59,9 @@ - + $task['project_id'])) ?> - + $task['id'])) ?>
    diff --git a/app/Template/task_edit_description.php b/app/Template/task/edit_description.php similarity index 77% rename from app/Template/task_edit_description.php rename to app/Template/task/edit_description.php index f805c034c..9ec94d698 100644 --- a/app/Template/task_edit_description.php +++ b/app/Template/task/edit_description.php @@ -2,7 +2,7 @@

    -
    + @@ -30,9 +30,9 @@ - + $task['project_id'])) ?> - + $task['id'])) ?>
    diff --git a/app/Template/task_layout.php b/app/Template/task/layout.php similarity index 86% rename from app/Template/task_layout.php rename to app/Template/task/layout.php index 0f8a6f2b1..a73ce28fc 100644 --- a/app/Template/task_layout.php +++ b/app/Template/task/layout.php @@ -6,7 +6,7 @@