Add branch, tag info to Diffusion Headers
Summary: Improves overall UX of browsing Diffusion. Clarifies branch and tag when possible, changes 'home' to 'code', uses tabs in more locations. Fixes T12837 Test Plan: Review branchs, tags, git, hg, search, browse, history. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12837 Differential Revision: https://secure.phabricator.com/D18434
This commit is contained in:
@@ -98,7 +98,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
->setErrors(array($empty_message));
|
||||
}
|
||||
|
||||
$tabs = $this->buildTabsView('home');
|
||||
$tabs = $this->buildTabsView('code');
|
||||
|
||||
$clone_uri = $drequest->generateURI(
|
||||
array(
|
||||
@@ -300,6 +300,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
|
||||
private function buildHeaderView(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$search = $this->renderSearchForm();
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
@@ -325,6 +326,14 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
$header->setStatus('fa-check', 'bluegrey', pht('Active'));
|
||||
}
|
||||
|
||||
if (!$repository->isSVN()) {
|
||||
$default = $repository->getDefaultBranch();
|
||||
if ($default != $drequest->getBranch()) {
|
||||
$branch_tag = $this->renderBranchTag($drequest);
|
||||
$header->addTag($branch_tag);
|
||||
}
|
||||
}
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user