Page MenuHomePhabricator

D13243.id32027.diff
No OneTemporary

D13243.id32027.diff

diff --git a/src/applications/phid/view/PHUIHandleView.php b/src/applications/phid/view/PHUIHandleView.php
--- a/src/applications/phid/view/PHUIHandleView.php
+++ b/src/applications/phid/view/PHUIHandleView.php
@@ -14,6 +14,7 @@
private $handleList;
private $handlePHID;
private $asTag;
+ private $useShortName;
public function setHandleList(PhabricatorHandleList $list) {
$this->handleList = $list;
@@ -30,12 +31,21 @@
return $this;
}
+ public function setUseShortName($short) {
+ $this->useShortName = $short;
+ return $this;
+ }
+
public function render() {
$handle = $this->handleList[$this->handlePHID];
if ($this->asTag) {
return $handle->renderTag();
} else {
- return $handle->renderLink();
+ if ($this->useShortName) {
+ return $handle->renderLink($handle->getName());
+ } else {
+ return $handle->renderLink();
+ }
}
}
diff --git a/src/applications/spaces/view/PHUISpacesNamespaceContextView.php b/src/applications/spaces/view/PHUISpacesNamespaceContextView.php
--- a/src/applications/spaces/view/PHUISpacesNamespaceContextView.php
+++ b/src/applications/spaces/view/PHUISpacesNamespaceContextView.php
@@ -41,7 +41,7 @@
'class' => 'spaces-name',
),
array(
- $viewer->renderHandle($space_phid),
+ $viewer->renderHandle($space_phid)->setUseShortName(true),
' | ',
));
}

File Metadata

Mime Type
text/plain
Expires
Sun, May 12, 8:29 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6291729
Default Alt Text
D13243.id32027.diff (1 KB)

Event Timeline