mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-25 14:08:19 +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:
parent
281fc19f3f
commit
864dd9a196
2 changed files with 8 additions and 2 deletions
|
@ -148,7 +148,7 @@ abstract class DiffusionController extends PhabricatorController {
|
||||||
|
|
||||||
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
|
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
|
||||||
$branch_name = $drequest->getBranch();
|
$branch_name = $drequest->getBranch();
|
||||||
if ($branch_name) {
|
if (strlen($branch_name)) {
|
||||||
$repository_name .= ' ('.$branch_name.')';
|
$repository_name .= ' ('.$branch_name.')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,13 +565,19 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||||
$browse_uri = $drequest->generateURI(array('action' => 'browse'));
|
$browse_uri = $drequest->generateURI(array('action' => 'browse'));
|
||||||
$pager->setURI($browse_uri, 'offset');
|
$pager->setURI($browse_uri, 'offset');
|
||||||
|
|
||||||
|
$repository_name = $repository->getName();
|
||||||
|
$branch_name = $drequest->getBranch();
|
||||||
|
if (strlen($branch_name)) {
|
||||||
|
$repository_name .= ' ('.$branch_name.')';
|
||||||
|
}
|
||||||
|
|
||||||
$header = phutil_tag(
|
$header = phutil_tag(
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
'href' => $browse_uri,
|
'href' => $browse_uri,
|
||||||
'class' => 'diffusion-view-browse-header',
|
'class' => 'diffusion-view-browse-header',
|
||||||
),
|
),
|
||||||
$repository->getName());
|
$repository_name);
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($header)
|
->setHeaderText($header)
|
||||||
|
|
Loading…
Add table
Reference in a new issue