mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Minor cleanups to Diffusion breadcrumbs
Summary: - Remove "Diffusion" crumb (redundant with application icon) - Put "All Repositories" in its place on the landing page. - Render the repository crumb as "rX" instead of "X Repository". Test Plan: Looked at various Diffusion pages. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D4173
This commit is contained in:
parent
9e8387175e
commit
051276a96b
2 changed files with 6 additions and 6 deletions
|
@ -157,21 +157,17 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
$repository = null;
|
||||
}
|
||||
|
||||
$crumb = id(new PhabricatorCrumbView())
|
||||
->setName('Diffusion')
|
||||
->setHref('/diffusion/');
|
||||
$crumb_list[] = $crumb;
|
||||
if (!$repository) {
|
||||
return $crumb_list;
|
||||
}
|
||||
|
||||
$callsign = $repository->getCallsign();
|
||||
$repository_name = phutil_escape_html($repository->getName()).' Repository';
|
||||
$repository_name = 'r'.$callsign;
|
||||
|
||||
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
|
||||
$branch_name = $drequest->getBranch();
|
||||
if ($branch_name) {
|
||||
$repository_name .= ' ('.phutil_escape_html($branch_name).')';
|
||||
$repository_name .= ' ('.$branch_name.')';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,6 +200,10 @@ final class DiffusionHomeController extends DiffusionController {
|
|||
$panel->appendChild($table);
|
||||
|
||||
$crumbs = $this->buildCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName(pht('All Repositories'))
|
||||
->setHref($this->getApplicationURI()));
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
array(
|
||||
|
|
Loading…
Reference in a new issue