Differential D10493 Diff 25253 src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | $properties->addProperty( | ||||
| $application->getShortDescription()); | $application->getShortDescription()); | ||||
| if ($application->getFlavorText()) { | if ($application->getFlavorText()) { | ||||
| $properties->addProperty( | $properties->addProperty( | ||||
| null, | null, | ||||
| phutil_tag('em', array(), $application->getFlavorText())); | phutil_tag('em', array(), $application->getFlavorText())); | ||||
| } | } | ||||
| if ($application->isBeta()) { | if ($application->isPrototype()) { | ||||
| $proto_href = PhabricatorEnv::getDoclink( | |||||
| 'User Guide: Prototype Applications'); | |||||
| $learn_more = phutil_tag( | |||||
| 'a', | |||||
| array( | |||||
| 'href' => $proto_href, | |||||
| 'target' => '_blank', | |||||
| ), | |||||
| pht('Learn More')); | |||||
| $properties->addProperty( | $properties->addProperty( | ||||
| pht('Release'), | pht('Prototype'), | ||||
| pht('Beta')); | pht( | ||||
| 'This application is a prototype. %s', | |||||
| $learn_more)); | |||||
| } | } | ||||
| $overview = $application->getOverview(); | $overview = $application->getOverview(); | ||||
| if ($overview) { | if ($overview) { | ||||
| $properties->addSectionHeader( | $properties->addSectionHeader( | ||||
| pht('Overview'), | pht('Overview'), | ||||
| PHUIPropertyListView::ICON_SUMMARY); | PHUIPropertyListView::ICON_SUMMARY); | ||||
| $properties->addTextContent( | $properties->addTextContent( | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | if ($selected->canUninstall()) { | ||||
| $action = id(new PhabricatorActionView()) | $action = id(new PhabricatorActionView()) | ||||
| ->setName(pht('Install')) | ->setName(pht('Install')) | ||||
| ->setIcon('fa-plus') | ->setIcon('fa-plus') | ||||
| ->setDisabled(!$can_edit) | ->setDisabled(!$can_edit) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref( | ->setHref( | ||||
| $this->getApplicationURI(get_class($selected).'/install/')); | $this->getApplicationURI(get_class($selected).'/install/')); | ||||
| $beta_enabled = PhabricatorEnv::getEnvConfig( | $prototypes_enabled = PhabricatorEnv::getEnvConfig( | ||||
| 'phabricator.show-beta-applications'); | 'phabricator.show-prototypes'); | ||||
| if ($selected->isBeta() && !$beta_enabled) { | if ($selected->isPrototype() && !$prototypes_enabled) { | ||||
| $action->setDisabled(true); | $action->setDisabled(true); | ||||
| } | } | ||||
| $view->addAction($action); | $view->addAction($action); | ||||
| } | } | ||||
| } else { | } else { | ||||
| $view->addAction( | $view->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| Show All 12 Lines | |||||