Start templates cleanup and reorganisation
This commit is contained in:
@@ -43,24 +43,11 @@ class Board extends Base
|
||||
$task = $this->getTask();
|
||||
$project = $this->project->getById($task['project_id']);
|
||||
|
||||
$params = array(
|
||||
'errors' => array(),
|
||||
$this->response->html($this->template->load('board/assignee', array(
|
||||
'values' => $task,
|
||||
'users_list' => $this->projectPermission->getMemberList($project['id']),
|
||||
'current_project_id' => $project['id'],
|
||||
'current_project_name' => $project['name'],
|
||||
);
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
|
||||
$this->response->html($this->template->load('board_assignee', $params));
|
||||
}
|
||||
else {
|
||||
|
||||
$this->response->html($this->template->layout('board_assignee', $params + array(
|
||||
'title' => t('Change assignee').' - '.$task['title'],
|
||||
)));
|
||||
}
|
||||
'project' => $project,
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,24 +82,11 @@ class Board extends Base
|
||||
$task = $this->getTask();
|
||||
$project = $this->project->getById($task['project_id']);
|
||||
|
||||
$params = array(
|
||||
'errors' => array(),
|
||||
$this->response->html($this->template->load('board/category', array(
|
||||
'values' => $task,
|
||||
'categories_list' => $this->category->getList($project['id']),
|
||||
'current_project_id' => $project['id'],
|
||||
'current_project_name' => $project['name'],
|
||||
);
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
|
||||
$this->response->html($this->template->load('board_category', $params));
|
||||
}
|
||||
else {
|
||||
|
||||
$this->response->html($this->template->layout('board_category', $params + array(
|
||||
'title' => t('Change category').' - '.$task['title'],
|
||||
)));
|
||||
}
|
||||
'project' => $project,
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +128,7 @@ class Board extends Base
|
||||
}
|
||||
|
||||
// Display the board with a specific layout
|
||||
$this->response->html($this->template->layout('board_public', array(
|
||||
$this->response->html($this->template->layout('board/public', array(
|
||||
'project' => $project,
|
||||
'columns' => $this->board->get($project['id']),
|
||||
'categories' => $this->category->getList($project['id'], false),
|
||||
@@ -210,12 +184,10 @@ class Board extends Base
|
||||
|
||||
$this->user->storeLastSeenProjectId($project['id']);
|
||||
|
||||
$this->response->html($this->template->layout('board_index', array(
|
||||
$this->response->html($this->template->layout('board/index', array(
|
||||
'users' => $this->projectPermission->getMemberList($project['id'], true, true),
|
||||
'filters' => array('user_id' => UserModel::EVERYBODY_ID),
|
||||
'projects' => $projects,
|
||||
'current_project_id' => $project['id'],
|
||||
'current_project_name' => $project['name'],
|
||||
'project' => $project,
|
||||
'board' => $this->board->get($project['id']),
|
||||
'categories' => $this->category->getList($project['id'], true, true),
|
||||
'title' => $project['name'],
|
||||
@@ -241,7 +213,7 @@ class Board extends Base
|
||||
$values['task_limit['.$column['id'].']'] = $column['task_limit'] ?: null;
|
||||
}
|
||||
|
||||
$this->response->html($this->projectLayout('board_edit', array(
|
||||
$this->response->html($this->projectLayout('board/edit', array(
|
||||
'errors' => array(),
|
||||
'values' => $values + array('project_id' => $project['id']),
|
||||
'columns' => $columns,
|
||||
@@ -281,7 +253,7 @@ class Board extends Base
|
||||
}
|
||||
}
|
||||
|
||||
$this->response->html($this->projectLayout('board_edit', array(
|
||||
$this->response->html($this->projectLayout('board/edit', array(
|
||||
'errors' => $errors,
|
||||
'values' => $values + array('project_id' => $project['id']),
|
||||
'columns' => $columns,
|
||||
@@ -319,7 +291,7 @@ class Board extends Base
|
||||
}
|
||||
}
|
||||
|
||||
$this->response->html($this->projectLayout('board_edit', array(
|
||||
$this->response->html($this->projectLayout('board/edit', array(
|
||||
'errors' => $errors,
|
||||
'values' => $values + $data,
|
||||
'columns' => $columns,
|
||||
@@ -351,7 +323,7 @@ class Board extends Base
|
||||
$this->response->redirect('?controller=board&action=edit&project_id='.$project['id']);
|
||||
}
|
||||
|
||||
$this->response->html($this->projectLayout('board_remove', array(
|
||||
$this->response->html($this->projectLayout('board/remove', array(
|
||||
'column' => $this->board->getColumn($this->request->getIntegerParam('column_id')),
|
||||
'project' => $project,
|
||||
'title' => t('Remove a column from a board')
|
||||
@@ -373,13 +345,13 @@ class Board extends Base
|
||||
$this->response->status(401);
|
||||
}
|
||||
|
||||
$values = $this->request->getValues();
|
||||
$values = $this->request->getJson();
|
||||
|
||||
if ($this->task->movePosition($project_id, $values['task_id'], $values['column_id'], $values['position'])) {
|
||||
|
||||
$this->response->html(
|
||||
$this->template->load('board_show', array(
|
||||
'current_project_id' => $project_id,
|
||||
$this->template->load('board/show', array(
|
||||
'project' => $this->project->getById($project_id),
|
||||
'board' => $this->board->get($project_id),
|
||||
'categories' => $this->category->getList($project_id, false),
|
||||
'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'),
|
||||
@@ -416,8 +388,8 @@ class Board extends Base
|
||||
|
||||
if ($this->project->isModifiedSince($project_id, $timestamp)) {
|
||||
$this->response->html(
|
||||
$this->template->load('board_show', array(
|
||||
'current_project_id' => $project_id,
|
||||
$this->template->load('board/show', array(
|
||||
'project' => $this->project->getById($project_id),
|
||||
'board' => $this->board->get($project_id),
|
||||
'categories' => $this->category->getList($project_id, false),
|
||||
'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'),
|
||||
|
||||
Reference in New Issue
Block a user