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:
parent
7a97a71e20
commit
45f38c549b
1 changed files with 11 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue