1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-17 01:08:41 +01:00

Use header status/policy elements in Applications meta-application

Summary: Ref T603. Use more modern elements.

Test Plan: See screenshot.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7264
This commit is contained in:
epriestley 2013-10-09 13:46:45 -07:00
parent 7a97a71e20
commit 45f38c549b

View file

@ -29,29 +29,16 @@ final class PhabricatorApplicationDetailViewController
->setName($selected->getName()));
$header = id(new PHUIHeaderView())
->setHeader($title);
$status_tag = id(new PhabricatorTagView())
->setType(PhabricatorTagView::TYPE_STATE);
->setHeader($title)
->setUser($user)
->setPolicyObject($selected);
if ($selected->isInstalled()) {
$status_tag->setName(pht('Installed'));
$status_tag->setBackgroundColor(PhabricatorTagView::COLOR_GREEN);
$header->setStatus('open', 'green', pht('Installed'));
} else {
$status_tag->setName(pht('Uninstalled'));
$status_tag->setBackgroundColor(PhabricatorTagView::COLOR_RED);
$header->setStatus('open', 'red', pht('Uninstalled'));
}
if ($selected->isBeta()) {
$beta_tag = id(new PhabricatorTagView())
->setType(PhabricatorTagView::TYPE_STATE)
->setName(pht('Beta'))
->setBackgroundColor(PhabricatorTagView::COLOR_GREY);
$header->addTag($beta_tag);
}
$header->addTag($status_tag);
$properties = $this->buildPropertyView($selected);
$actions = $this->buildActionView($user, $selected);
@ -77,6 +64,12 @@ final class PhabricatorApplicationDetailViewController
$properties = id(new PhabricatorPropertyListView())
->addProperty(pht('Description'), $application->getShortDescription());
if ($application->isBeta()) {
$properties->addProperty(
pht('Release'),
pht('Beta'));
}
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
$viewer,
$application);