From 325f4c863c9d6bd74ec74aa2f445eed9e03f9e47 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 11 Jun 2015 10:14:22 -0700 Subject: [PATCH] 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 --- src/applications/phid/view/PHUIHandleView.php | 12 +++++++++++- .../spaces/view/PHUISpacesNamespaceContextView.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/applications/phid/view/PHUIHandleView.php b/src/applications/phid/view/PHUIHandleView.php index db4b9e43ab..a4b766a991 100644 --- a/src/applications/phid/view/PHUIHandleView.php +++ b/src/applications/phid/view/PHUIHandleView.php @@ -14,6 +14,7 @@ final class PHUIHandleView private $handleList; private $handlePHID; private $asTag; + private $useShortName; public function setHandleList(PhabricatorHandleList $list) { $this->handleList = $list; @@ -30,12 +31,21 @@ final class PHUIHandleView 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 index d63ae8e6f4..0bb5949b76 100644 --- a/src/applications/spaces/view/PHUISpacesNamespaceContextView.php +++ b/src/applications/spaces/view/PHUISpacesNamespaceContextView.php @@ -41,7 +41,7 @@ final class PHUISpacesNamespaceContextView extends AphrontView { 'class' => 'spaces-name', ), array( - $viewer->renderHandle($space_phid), + $viewer->renderHandle($space_phid)->setUseShortName(true), ' | ', )); }