mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Added beta status for applications
Summary: Fixes T2338 Test Plan: bjhb Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin, chad Maniphest Tasks: T2338 Differential Revision: https://secure.phabricator.com/D4529
This commit is contained in:
parent
2888d58034
commit
2a6060a763
13 changed files with 63 additions and 3 deletions
|
@ -836,6 +836,8 @@ return array(
|
|||
// eggs.
|
||||
'phabricator.serious-business' => false,
|
||||
|
||||
// Should Phabricator show beta applications on the homepage
|
||||
'phabricator.show-beta-applications' => false,
|
||||
|
||||
// -- Files ----------------------------------------------------------------- //
|
||||
|
||||
|
|
|
@ -2400,7 +2400,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-application-launch-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/ed5d60cc/rsrc/css/application/base/phabricator-application-launch-view.css',
|
||||
'uri' => '/res/d6b6235b/rsrc/css/application/base/phabricator-application-launch-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -62,6 +62,10 @@ abstract class PhabricatorApplication {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getPHID() {
|
||||
return 'PHID-APPS-'.get_class($this);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@ final class PhabricatorApplicationCalendar extends PhabricatorApplication {
|
|||
return self::GROUP_COMMUNICATION;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/calendar/' => array(
|
||||
|
|
|
@ -50,6 +50,12 @@ final class PhabricatorCoreConfigOptions
|
|||
->addExample('America/Chicago', pht('US Central (CDT)'))
|
||||
->addExample('America/Boise', pht('US Mountain (MDT)'))
|
||||
->addExample('America/Los_Angeles', pht('US West (PDT)')),
|
||||
$this->newOption('phabricator.show-beta-applications', 'bool', false)
|
||||
->setBoolOptions(
|
||||
array(
|
||||
pht('Visible'),
|
||||
pht('Invisible')
|
||||
))->setDescription(pht('Show beta applications on the home page.')),
|
||||
$this->newOption('phabricator.serious-business', 'bool', false)
|
||||
->setBoolOptions(
|
||||
array(
|
||||
|
|
|
@ -22,8 +22,13 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
$nav->setBaseURI(new PhutilURI('/'));
|
||||
|
||||
$applications = PhabricatorApplication::getAllInstalledApplications();
|
||||
$show_beta =
|
||||
PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications');
|
||||
|
||||
foreach ($applications as $key => $application) {
|
||||
if (!$show_beta && $application->isBeta()) {
|
||||
unset($applications[$key]);
|
||||
}
|
||||
if (!$application->shouldAppearInLaunchView()) {
|
||||
// Remove hidden applications (usually internal stuff).
|
||||
unset($applications[$key]);
|
||||
|
|
|
@ -26,6 +26,10 @@ final class PhabricatorApplicationDrydock extends PhabricatorApplication {
|
|||
return self::GROUP_UTILITIES;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/drydock/' => array(
|
||||
|
|
|
@ -18,6 +18,10 @@ final class PhabricatorApplicationFact extends PhabricatorApplication {
|
|||
return self::GROUP_UTILITIES;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/fact/' => array(
|
||||
|
|
|
@ -37,6 +37,15 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
),
|
||||
phutil_escape_html($application->getName()));
|
||||
|
||||
if ($application->isBeta()) {
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-beta',
|
||||
),
|
||||
"\xCE\xB2");
|
||||
}
|
||||
|
||||
if ($this->fullWidth) {
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
|
|
|
@ -26,6 +26,10 @@ final class PhabricatorApplicationPhame extends PhabricatorApplication {
|
|||
return self::GROUP_COMMUNICATION;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/phame/' => array(
|
||||
|
|
|
@ -35,6 +35,10 @@ final class PhabricatorApplicationPholio extends PhabricatorApplication {
|
|||
return self::GROUP_COMMUNICATION;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/M(?P<id>[1-9]\d*)' => 'PholioMockViewController',
|
||||
|
|
|
@ -35,6 +35,10 @@ final class PhabricatorApplicationPonder extends PhabricatorApplication {
|
|||
return self::GROUP_COMMUNICATION;
|
||||
}
|
||||
|
||||
public function isBeta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getroutes() {
|
||||
return array(
|
||||
'/Q(?P<id>[1-9]\d*)' => 'PonderQuestionViewController',
|
||||
|
|
|
@ -90,11 +90,10 @@ a.phabricator-application-launch-container:hover {
|
|||
margin-left: 52px;
|
||||
}
|
||||
|
||||
.phabricator-application-beta,
|
||||
.phabricator-application-launch-attention {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 4px;
|
||||
background: rgb(0, 122, 255);
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
|
@ -104,7 +103,18 @@ a.phabricator-application-launch-container:hover {
|
|||
box-shadow: 0 0px 2px #000;
|
||||
}
|
||||
|
||||
.phabricator-application-launch-attention {
|
||||
right: 4px;
|
||||
background-color: rgb(0, 122, 255);
|
||||
}
|
||||
|
||||
.phabricator-application-beta {
|
||||
left: 4px;
|
||||
background-color: #ff8f00;
|
||||
}
|
||||
|
||||
.application-tile-full .phabricator-application-launch-attention {
|
||||
top: 16px;
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue