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:
Chad Little
2017-08-16 12:07:14 -07:00
parent 7bbd26427f
commit 19dae88728
9 changed files with 100 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ final class DiffusionGraphController extends DiffusionController {
if ($response) {
return $response;
}
require_celerity_resource('diffusion-css');
$viewer = $this->getViewer();
$drequest = $this->getDiffusionRequest();
@@ -83,6 +84,7 @@ final class DiffusionGraphController extends DiffusionController {
private function buildHeader(DiffusionRequest $drequest) {
$viewer = $this->getViewer();
$repository = $drequest->getRepository();
$no_path = !strlen($drequest->getPath());
if ($no_path) {
@@ -96,6 +98,11 @@ final class DiffusionGraphController extends DiffusionController {
->setHeader($header_text)
->setHeaderIcon('fa-code-fork');
if (!$repository->isSVN()) {
$branch_tag = $this->renderBranchTag($drequest);
$header->addTag($branch_tag);
}
return $header;
}