From a7c1f872a04d9fab4c045532c26e5c4faa5fad6a Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 5 Jul 2014 10:16:47 -0700 Subject: [PATCH] Show project hashtags prominently on project pages Summary: Currently, it's unreasonably difficult for users to figure out some project hashtags because the rules aren't always intuitive. Test Plan: {F174508} Reviewers: chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9830 --- .../PhabricatorProjectProfileController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index eb6d705166..edd175cba1 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -25,7 +25,8 @@ final class PhabricatorProjectProfileController ->setViewer($user) ->needMembers(true) ->needWatchers(true) - ->needImages(true); + ->needImages(true) + ->needSlugs(true); if ($this->slug) { $query->withSlugs(array($this->slug)); } else { @@ -280,6 +281,15 @@ final class PhabricatorProjectProfileController ->setObject($project) ->setActionList($actions); + $hashtags = array(); + foreach ($project->getSlugs() as $slug) { + $hashtags[] = id(new PHUITagView()) + ->setType(PHUITagView::TYPE_OBJECT) + ->setName('#'.$slug->getSlug()); + } + + $view->addProperty(pht('Hashtags'), phutil_implode_html(' ', $hashtags)); + $view->addProperty( pht('Members'), $project->getMemberPHIDs()