mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 03:02:43 +01:00
a72d18765f
Summary: Ref T12264. This allows users to install a dashboard they are viewing to their personal home menu or as a global home menu item. Has some basic ability to be extended later for maybe projects. Test Plan: Build a dashboard, click "Install Dashboard". - As user only get personal option - As HomeApp edit person, see both options - Try installation as either, with and without label set - Fake "global" form as user, get error - Don't set anything, get error Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12264 Differential Revision: https://secure.phabricator.com/D17492
59 lines
2 KiB
PHP
59 lines
2 KiB
PHP
<?php
|
|
|
|
final class PhabricatorDashboardApplication extends PhabricatorApplication {
|
|
|
|
public function getName() {
|
|
return pht('Dashboards');
|
|
}
|
|
|
|
public function getBaseURI() {
|
|
return '/dashboard/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Create Custom Pages');
|
|
}
|
|
|
|
public function getIcon() {
|
|
return 'fa-dashboard';
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/W(?P<id>\d+)' => 'PhabricatorDashboardPanelViewController',
|
|
'/dashboard/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorDashboardListController',
|
|
'view/(?P<id>\d+)/' => 'PhabricatorDashboardViewController',
|
|
'archive/(?P<id>\d+)/' => 'PhabricatorDashboardArchiveController',
|
|
'manage/(?P<id>\d+)/' => 'PhabricatorDashboardManageController',
|
|
'arrange/(?P<id>\d+)/' => 'PhabricatorDashboardArrangeController',
|
|
'create/' => 'PhabricatorDashboardEditController',
|
|
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardEditController',
|
|
'install/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardInstallController',
|
|
'addpanel/(?P<id>\d+)/' => 'PhabricatorDashboardAddPanelController',
|
|
'movepanel/(?P<id>\d+)/' => 'PhabricatorDashboardMovePanelController',
|
|
'removepanel/(?P<id>\d+)/'
|
|
=> 'PhabricatorDashboardRemovePanelController',
|
|
'panel/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorDashboardPanelListController',
|
|
'create/' => 'PhabricatorDashboardPanelEditController',
|
|
$this->getEditRoutePattern('editpro/')
|
|
=> 'PhabricatorDashboardPanelEditproController',
|
|
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardPanelEditController',
|
|
'render/(?P<id>\d+)/' => 'PhabricatorDashboardPanelRenderController',
|
|
'archive/(?P<id>\d+)/'
|
|
=> 'PhabricatorDashboardPanelArchiveController',
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new PhabricatorDashboardRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
}
|