From 090252a89e2bb1af9b555d13c72867c44f462f2b Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sat, 5 Mar 2016 12:28:56 -0800 Subject: [PATCH] Clean up Macro view page Summary: Sets a header icon, makes "Details" not show if empty, simplifies title. Test Plan: Review a few Macro pages for changes with and without audio. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15406 --- .../macro/controller/PhabricatorMacroViewController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/applications/macro/controller/PhabricatorMacroViewController.php b/src/applications/macro/controller/PhabricatorMacroViewController.php index 4e43c796cf..9ee70eecdc 100644 --- a/src/applications/macro/controller/PhabricatorMacroViewController.php +++ b/src/applications/macro/controller/PhabricatorMacroViewController.php @@ -40,7 +40,8 @@ final class PhabricatorMacroViewController $header = id(new PHUIHeaderView()) ->setUser($viewer) ->setPolicyObject($macro) - ->setHeader($title_long); + ->setHeader($macro->getName()) + ->setHeaderIcon('fa-file-image-o'); if (!$macro->getIsDisabled()) { $header->setStatus('fa-check', 'bluegrey', pht('Active')); @@ -177,7 +178,11 @@ final class PhabricatorMacroViewController $viewer->renderHandle($audio_phid)); } - return $view; + if ($view->hasAnyProperties()) { + return $view; + } + + return null; } private function buildFileView(