diff options
Diffstat (limited to 'app/Controller/Project.php')
-rw-r--r-- | app/Controller/Project.php | 87 |
1 files changed, 1 insertions, 86 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 63c20cc4..ba039b7d 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -3,7 +3,7 @@ namespace Controller; /** - * Project controller + * Project controller (Settings + creation/edition) * * @package controller * @author Frederic Guillot @@ -416,91 +416,6 @@ class Project extends Base } /** - * Activity page for a project - * - * @access public - */ - public function activity() - { - $project = $this->getProject(); - - $this->response->html($this->template->layout('project/activity', array( - 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()), - 'events' => $this->projectActivity->getProject($project['id']), - 'project' => $project, - 'title' => t('%s\'s activity', $project['name']) - ))); - } - - /** - * Task search for a given project - * - * @access public - */ - public function search() - { - $project = $this->getProject(); - $search = $this->request->getStringParam('search'); - $nb_tasks = 0; - - $paginator = $this->paginator - ->setUrl('project', 'search', array('search' => $search, 'project_id' => $project['id'])) - ->setMax(30) - ->setOrder('tasks.id') - ->setDirection('DESC'); - - if ($search !== '') { - - $paginator - ->setQuery($this->taskFinder->getSearchQuery($project['id'], $search)) - ->calculate(); - - $nb_tasks = $paginator->getTotal(); - } - - $this->response->html($this->template->layout('project/search', array( - 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()), - 'values' => array( - 'search' => $search, - 'controller' => 'project', - 'action' => 'search', - 'project_id' => $project['id'], - ), - 'paginator' => $paginator, - 'project' => $project, - 'columns' => $this->board->getColumnsList($project['id']), - 'categories' => $this->category->getList($project['id'], false), - 'title' => t('Search in the project "%s"', $project['name']).($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '') - ))); - } - - /** - * List of completed tasks for a given project - * - * @access public - */ - public function tasks() - { - $project = $this->getProject(); - $paginator = $this->paginator - ->setUrl('project', 'tasks', array('project_id' => $project['id'])) - ->setMax(30) - ->setOrder('tasks.id') - ->setDirection('DESC') - ->setQuery($this->taskFinder->getClosedTaskQuery($project['id'])) - ->calculate(); - - $this->response->html($this->template->layout('project/tasks', array( - 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()), - 'project' => $project, - 'columns' => $this->board->getColumnsList($project['id']), - 'categories' => $this->category->getList($project['id'], false), - 'paginator' => $paginator, - 'title' => t('Completed tasks for "%s"', $project['name']).' ('.$paginator->getTotal().')' - ))); - } - - /** * Display a form to create a new project * * @access public |