mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Added configurable welcome content for Phabricator home page.
Summary: The welcome.enabled feature is turned on by default; unsure of whether this is desired by upstream. Test Plan: Apply the patch and see the welcome content. It's configurable in the config. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5339
This commit is contained in:
parent
489f9e7dfe
commit
4674b88ff6
3 changed files with 26 additions and 1 deletions
|
@ -847,7 +847,12 @@ return array(
|
|||
'phabricator.show-beta-applications' => false,
|
||||
|
||||
// Contains a list of uninstalled applications
|
||||
'phabricator.uninstalled-applications' => array(),
|
||||
'phabricator.uninstalled-applications' => array(),
|
||||
|
||||
// -- Welcome Screen -------------------------------------------------------- //
|
||||
|
||||
// The custom HTML content for the Phabricator welcome screen.
|
||||
'welcome.html' => null,
|
||||
|
||||
// -- Files ----------------------------------------------------------------- //
|
||||
|
||||
|
|
|
@ -135,6 +135,10 @@ final class PhabricatorCoreConfigOptions
|
|||
->setLocked(true)
|
||||
->setDescription(
|
||||
pht('Array containing list of Uninstalled applications.')),
|
||||
$this->newOption('welcome.html', 'string', null)
|
||||
->setLocked(true)
|
||||
->setDescription(
|
||||
pht('Custom HTML to show on the main Phabricator dashboard.')),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,11 @@ final class PhabricatorDirectoryMainController
|
|||
$tasks_panel = null;
|
||||
}
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('welcome.html') !== null) {
|
||||
$welcome_panel = $this->buildWelcomePanel();
|
||||
} else {
|
||||
$welcome_panel = null;
|
||||
}
|
||||
$jump_panel = $this->buildJumpPanel();
|
||||
$revision_panel = $this->buildRevisionPanel();
|
||||
$audit_panel = $this->buildAuditPanel();
|
||||
|
@ -47,6 +52,7 @@ final class PhabricatorDirectoryMainController
|
|||
|
||||
$content = array(
|
||||
$jump_panel,
|
||||
$welcome_panel,
|
||||
$unbreak_panel,
|
||||
$triage_panel,
|
||||
$revision_panel,
|
||||
|
@ -226,6 +232,16 @@ final class PhabricatorDirectoryMainController
|
|||
return $panel;
|
||||
}
|
||||
|
||||
private function buildWelcomePanel() {
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->appendChild(
|
||||
phutil_safe_html(
|
||||
PhabricatorEnv::getEnvConfig('welcome.html')));
|
||||
$panel->setNoBackground();
|
||||
|
||||
return $panel;
|
||||
}
|
||||
|
||||
private function buildTasksPanel() {
|
||||
$user = $this->getRequest()->getUser();
|
||||
$user_phid = $user->getPHID();
|
||||
|
|
Loading…
Reference in a new issue