diff --git a/src/PHPCensor/Controller/ProjectController.php b/src/PHPCensor/Controller/ProjectController.php index 00372b24..f95954c9 100644 --- a/src/PHPCensor/Controller/ProjectController.php +++ b/src/PHPCensor/Controller/ProjectController.php @@ -53,13 +53,19 @@ class ProjectController extends PHPCensor\Controller } /** - * View a specific project. - */ + * View a specific project. + * + * @param integer $projectId + * + * @throws NotFoundException + * + * @return string + */ public function view($projectId) { - $branch = $this->getParam('branch', ''); + $branch = $this->getParam('branch', ''); $environment = $this->getParam('environment', ''); - $project = $this->projectStore->getById($projectId); + $project = $this->projectStore->getById($projectId); if (empty($project)) { throw new NotFoundException(Lang::get('project_x_not_found', $projectId)); @@ -76,18 +82,18 @@ class ProjectController extends PHPCensor\Controller return $response; } - $this->view->builds = $builds[0]; - $this->view->total = $builds[1]; - $this->view->project = $project; - $this->view->branch = urldecode($branch); - $this->view->branches = $this->projectStore->getKnownBranches($projectId); - $this->view->environment = urldecode($environment); + $this->view->builds = $builds[0]; + $this->view->total = $builds[1]; + $this->view->project = $project; + $this->view->branch = urldecode($branch); + $this->view->branches = $this->projectStore->getKnownBranches($projectId); + $this->view->environment = urldecode($environment); $this->view->environments = $project->getEnvironmentsNames(); - $this->view->page = $page; - $this->view->pages = $pages; - $this->view->perPage = $perPage; + $this->view->page = $page; + $this->view->pages = $pages; + $this->view->perPage = $perPage; - $this->layout->title = $project->getTitle(); + $this->layout->title = $project->getTitle(); if (!empty($this->view->environment)) { $this->layout->subtitle = $this->view->environment; } else { @@ -98,8 +104,17 @@ class ProjectController extends PHPCensor\Controller } /** - * Create a new pending build for a project. - */ + * Create a new pending build for a project. + * + * @param integer $projectId + * @param string $type Build type: 'environment'|'branch' + * @param string $id Build type id: environment name or branch name + * + * @throws NotFoundException + * + * @return b8\Http\Response\RedirectResponse + * + */ public function build($projectId, $type = null, $id = null) { /* @var \PHPCensor\Model\Project $project */ diff --git a/src/PHPCensor/View/Project/view.phtml b/src/PHPCensor/View/Project/view.phtml index 34cdd7e0..384e8144 100644 --- a/src/PHPCensor/View/Project/view.phtml +++ b/src/PHPCensor/View/Project/view.phtml @@ -1,13 +1,13 @@
- + @@ -17,85 +17,57 @@
getArchived()): ?> - User()->getIsAdmin()): ?> -
- - - -
+ User()->getIsAdmin()): ?> + + + + + + + + + + + + + -
- - - -
+ + + + + + + + + + + + + -
+
@@ -268,7 +240,7 @@
-
getSshPublicKey(); ?>
+
getSshPublicKey(); ?>