mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-31 06:28:13 +02: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;
|
$repository = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumb = id(new PhabricatorCrumbView())
|
|
||||||
->setName('Diffusion')
|
|
||||||
->setHref('/diffusion/');
|
|
||||||
$crumb_list[] = $crumb;
|
|
||||||
if (!$repository) {
|
if (!$repository) {
|
||||||
return $crumb_list;
|
return $crumb_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
$callsign = $repository->getCallsign();
|
$callsign = $repository->getCallsign();
|
||||||
$repository_name = phutil_escape_html($repository->getName()).' Repository';
|
$repository_name = 'r'.$callsign;
|
||||||
|
|
||||||
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 ($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);
|
$panel->appendChild($table);
|
||||||
|
|
||||||
$crumbs = $this->buildCrumbs();
|
$crumbs = $this->buildCrumbs();
|
||||||
|
$crumbs->addCrumb(
|
||||||
|
id(new PhabricatorCrumbView())
|
||||||
|
->setName(pht('All Repositories'))
|
||||||
|
->setHref($this->getApplicationURI()));
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue