diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -211,7 +211,7 @@ $view_name = pht('History'); break; case 'browse': - $view_name = pht('Browse'); + $view_name = pht('Code'); break; case 'lint': $view_name = pht('Lint'); @@ -502,6 +502,18 @@ $view = new PHUIListView(); + $view->addMenuItem( + id(new PHUIListItemView()) + ->setKey('home') + ->setName(pht('Home')) + ->setIcon('fa-home') + ->setHref($drequest->generateURI( + array( + 'action' => 'branch', + 'path' => '', + ))) + ->setSelected($key == 'home')); + $view->addMenuItem( id(new PHUIListItemView()) ->setKey('code') diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -109,7 +109,7 @@ ->setErrors(array($empty_message)); } - $tabs = $this->buildTabsView('code'); + $tabs = $this->buildTabsView('home'); $clone_uri = $drequest->generateURI( array( @@ -243,16 +243,16 @@ $readme = null; } + if ($readme) { + $content[] = $readme; + } + $content[] = $this->buildBrowseTable( $browse_results, $browse_paths, $browse_exception, $browse_pager); - if ($readme) { - $content[] = $readme; - } - try { $branch_button = $this->buildBranchList($drequest); $this->branchButton = $branch_button; @@ -396,7 +396,7 @@ foreach ($branches as $branch) { $branch_uri = $drequest->generateURI( array( - 'action' => 'browse', + 'action' => 'branch', 'branch' => $branch->getShortname(), )); $actions->addAction(