1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +01:00

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
This commit is contained in:
Chad Little 2016-03-05 12:28:56 -08:00
parent 010b7811b4
commit 090252a89e

View file

@ -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,9 +178,13 @@ final class PhabricatorMacroViewController
$viewer->renderHandle($audio_phid));
}
if ($view->hasAnyProperties()) {
return $view;
}
return null;
}
private function buildFileView(
PhabricatorFileImageMacro $macro) {
$viewer = $this->getViewer();