Change layout (experimental)

This commit is contained in:
Frédéric Guillot
2014-11-02 15:06:41 -05:00
parent 8fe5df39d9
commit 37332ae222
75 changed files with 2616 additions and 744 deletions

View File

@@ -77,8 +77,7 @@ class Task extends Base
'colors_list' => $this->color->getList(),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => $task['title'],
'title' => $task['project_name'].' > '.$task['title'],
)));
}
@@ -89,27 +88,25 @@ class Task extends Base
*/
public function create()
{
$project_id = $this->request->getIntegerParam('project_id');
$this->checkProjectPermissions($project_id);
$project = $this->getProject();
$this->response->html($this->template->layout('task_new', array(
'errors' => array(),
'values' => array(
'project_id' => $project_id,
'project_id' => $project['id'],
'column_id' => $this->request->getIntegerParam('column_id'),
'color_id' => $this->request->getStringParam('color_id'),
'owner_id' => $this->request->getIntegerParam('owner_id'),
'another_task' => $this->request->getIntegerParam('another_task'),
),
'projects_list' => $this->project->getListByStatus(ProjectModel::ACTIVE),
'columns_list' => $this->board->getColumnsList($project_id),
'users_list' => $this->projectPermission->getUsersList($project_id),
'columns_list' => $this->board->getColumnsList($project['id']),
'users_list' => $this->projectPermission->getUsersList($project['id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($project_id),
'categories_list' => $this->category->getList($project['id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
'title' => $project['name'].' > '.t('New task')
)));
}
@@ -120,6 +117,7 @@ class Task extends Base
*/
public function save()
{
$project = $this->getProject();
$values = $this->request->getValues();
$values['creator_id'] = $this->acl->getUserId();
@@ -150,14 +148,13 @@ class Task extends Base
'errors' => $errors,
'values' => $values,
'projects_list' => $this->project->getListByStatus(ProjectModel::ACTIVE),
'columns_list' => $this->board->getColumnsList($values['project_id']),
'users_list' => $this->projectPermission->getUsersList($values['project_id']),
'columns_list' => $this->board->getColumnsList($project['id']),
'users_list' => $this->projectPermission->getUsersList($project['id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($values['project_id']),
'categories_list' => $this->category->getList($project['id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
'title' => $project['name'].' > '.t('New task')
)));
}
@@ -183,8 +180,6 @@ class Task extends Base
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'ajax' => $ajax,
'menu' => 'tasks',
'title' => t('Edit a task')
);
if ($ajax) {
@@ -234,8 +229,6 @@ class Task extends Base
'categories_list' => $this->category->getList($values['project_id']),
'date_format' => $this->config->get('application_date_format'),
'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('Edit a task'),
'ajax' => $this->request->isAjax(),
)));
}
@@ -286,8 +279,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_close', array(
'task' => $task,
'menu' => 'tasks',
'title' => t('Close a task')
)));
}
@@ -315,8 +306,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_open', array(
'task' => $task,
'menu' => 'tasks',
'title' => t('Open a task')
)));
}
@@ -348,8 +337,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_remove', array(
'task' => $task,
'menu' => 'tasks',
'title' => t('Remove a task')
)));
}
@@ -378,8 +365,6 @@ class Task extends Base
$this->response->html($this->taskLayout('task_duplicate', array(
'task' => $task,
'menu' => 'tasks',
'title' => t('Duplicate a task')
)));
}
@@ -426,8 +411,6 @@ class Task extends Base
'errors' => $errors,
'task' => $task,
'ajax' => $ajax,
'menu' => 'tasks',
'title' => t('Edit the description'),
);
if ($ajax) {
@@ -494,8 +477,6 @@ class Task extends Base
'errors' => $errors,
'task' => $task,
'projects_list' => $projects_list,
'menu' => 'tasks',
'title' => t(ucfirst($action).' the task to another project')
)));
}
}