1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

Add aural label for "application" breadcrumb in crumbs

Summary: Ref T4843. This is a purely-visual link; label it with the application name.

Test Plan: {F149583}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4843

Differential Revision: https://secure.phabricator.com/D8927
This commit is contained in:
epriestley 2014-05-01 08:55:45 -07:00
parent 2f7508929f
commit 730cb65913
2 changed files with 22 additions and 1 deletions

View file

@ -393,6 +393,7 @@ abstract class PhabricatorController extends AphrontController {
$crumbs[] = id(new PhabricatorCrumbView())
->setHref($this->getApplicationURI())
->setAural($application->getName())
->setIcon($sprite);
}

View file

@ -7,6 +7,16 @@ final class PhabricatorCrumbView extends AphrontView {
private $icon;
private $isLastCrumb;
private $workflow;
private $aural;
public function setAural($aural) {
$this->aural = $aural;
return $this;
}
public function getAural() {
return $this->aural;
}
public function setWorkflow($workflow) {
$this->workflow = $workflow;
@ -46,6 +56,16 @@ final class PhabricatorCrumbView extends AphrontView {
'phabricator-crumb-view',
);
$aural = null;
if ($this->aural !== null) {
$aural = javelin_tag(
'span',
array(
'aural' => true,
),
$this->aural);
}
$icon = null;
if ($this->icon) {
$classes[] = 'phabricator-crumb-has-icon';
@ -84,6 +104,6 @@ final class PhabricatorCrumbView extends AphrontView {
'href' => $this->href,
'class' => implode(' ', $classes),
),
array($icon, $name, $divider));
array($aural, $icon, $name, $divider));
}
}