mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 08:58:20 +01:00
Don't show Space monograms in SpaceContextView
Summary: Ref T8449. Get rid of the `S123` stuff in headers, it feels like clutter. Test Plan: Looked at objects in Spaces. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8449 Differential Revision: https://secure.phabricator.com/D13243
This commit is contained in:
parent
d5668ddeae
commit
325f4c863c
2 changed files with 12 additions and 2 deletions
|
@ -14,6 +14,7 @@ final class PHUIHandleView
|
||||||
private $handleList;
|
private $handleList;
|
||||||
private $handlePHID;
|
private $handlePHID;
|
||||||
private $asTag;
|
private $asTag;
|
||||||
|
private $useShortName;
|
||||||
|
|
||||||
public function setHandleList(PhabricatorHandleList $list) {
|
public function setHandleList(PhabricatorHandleList $list) {
|
||||||
$this->handleList = $list;
|
$this->handleList = $list;
|
||||||
|
@ -30,12 +31,21 @@ final class PHUIHandleView
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setUseShortName($short) {
|
||||||
|
$this->useShortName = $short;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
$handle = $this->handleList[$this->handlePHID];
|
$handle = $this->handleList[$this->handlePHID];
|
||||||
if ($this->asTag) {
|
if ($this->asTag) {
|
||||||
return $handle->renderTag();
|
return $handle->renderTag();
|
||||||
} else {
|
} else {
|
||||||
return $handle->renderLink();
|
if ($this->useShortName) {
|
||||||
|
return $handle->renderLink($handle->getName());
|
||||||
|
} else {
|
||||||
|
return $handle->renderLink();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ final class PHUISpacesNamespaceContextView extends AphrontView {
|
||||||
'class' => 'spaces-name',
|
'class' => 'spaces-name',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$viewer->renderHandle($space_phid),
|
$viewer->renderHandle($space_phid)->setUseShortName(true),
|
||||||
' | ',
|
' | ',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue