1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

List branch on main repository view

Summary: This is in the crumbs, but a little hidden. Puts branch name at the top of the browse table header.

Test Plan: Review a few branchs, change branch, see new name.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18441
This commit is contained in:
Chad Little 2017-08-17 12:15:43 -07:00
parent 281fc19f3f
commit 864dd9a196
2 changed files with 8 additions and 2 deletions

View file

@ -148,7 +148,7 @@ abstract class DiffusionController extends PhabricatorController {
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
$branch_name = $drequest->getBranch();
if ($branch_name) {
if (strlen($branch_name)) {
$repository_name .= ' ('.$branch_name.')';
}
}

View file

@ -565,13 +565,19 @@ final class DiffusionRepositoryController extends DiffusionController {
$browse_uri = $drequest->generateURI(array('action' => 'browse'));
$pager->setURI($browse_uri, 'offset');
$repository_name = $repository->getName();
$branch_name = $drequest->getBranch();
if (strlen($branch_name)) {
$repository_name .= ' ('.$branch_name.')';
}
$header = phutil_tag(
'a',
array(
'href' => $browse_uri,
'class' => 'diffusion-view-browse-header',
),
$repository->getName());
$repository_name);
return id(new PHUIObjectBoxView())
->setHeaderText($header)