2012-12-27 15:20:09 -08:00
|
|
|
<?php
|
|
|
|
|
2014-07-23 10:03:09 +10:00
|
|
|
final class PhabricatorConfigApplication extends PhabricatorApplication {
|
2012-12-27 15:20:09 -08:00
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
return '/config/';
|
|
|
|
}
|
|
|
|
|
2015-01-24 23:41:43 -08:00
|
|
|
public function getFontIcon() {
|
2015-01-25 08:01:28 -08:00
|
|
|
return 'fa-sliders';
|
2015-01-24 23:41:43 -08:00
|
|
|
}
|
|
|
|
|
(Redesign) Clean up older "Tile" code
Summary:
This does some backend cleanup of the tile stuff, and some general cleanup of other application things:
- Users who haven't customized preferences get a small, specific set of pinned applications: Differential, Maniphest, Diffusion, Audit, Phriction, Projects (and, for administrators, Auth, Config and People).
- Old tile size methods are replaced with `isPinnnedByDefault()`.
- Shortened some short descriptions.
- `shouldAppearInLaunchView()` replaced by less ambiguous `isLaunchable()`.
- Added a marker for third-party / extension applications.
Test Plan: Faked away my preferences and viewed the home page, saw a smaller set of default pins.
Reviewers: chad
Reviewed By: chad
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D9358
2014-06-03 15:47:27 -07:00
|
|
|
public function isPinnedByDefault(PhabricatorUser $viewer) {
|
|
|
|
return $viewer->getIsAdmin();
|
|
|
|
}
|
|
|
|
|
2012-12-27 15:20:09 -08:00
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x98\xBA";
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_ADMIN;
|
|
|
|
}
|
|
|
|
|
2013-01-29 09:14:03 -08:00
|
|
|
public function canUninstall() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-07-23 23:52:50 +10:00
|
|
|
public function getName() {
|
|
|
|
return 'Config';
|
|
|
|
}
|
|
|
|
|
2014-05-29 12:17:54 -07:00
|
|
|
public function getShortDescription() {
|
|
|
|
return pht('Configure Phabricator');
|
|
|
|
}
|
|
|
|
|
2012-12-27 15:20:09 -08:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/config/' => array(
|
2014-07-23 10:03:09 +10:00
|
|
|
'' => 'PhabricatorConfigListController',
|
|
|
|
'all/' => 'PhabricatorConfigAllController',
|
2015-01-01 06:51:44 -08:00
|
|
|
'history/' => 'PhabricatorConfigHistoryController',
|
2014-07-23 10:03:09 +10:00
|
|
|
'edit/(?P<key>[\w\.\-]+)/' => 'PhabricatorConfigEditController',
|
|
|
|
'group/(?P<key>[^/]+)/' => 'PhabricatorConfigGroupController',
|
2014-06-23 09:37:51 -07:00
|
|
|
'welcome/' => 'PhabricatorConfigWelcomeController',
|
2014-09-18 08:22:54 -07:00
|
|
|
'database/'.
|
|
|
|
'(?:(?P<database>[^/]+)/'.
|
|
|
|
'(?:(?P<table>[^/]+)/'.
|
2014-09-18 08:32:21 -07:00
|
|
|
'(?:(?:col/(?P<column>[^/]+)|key/(?P<key>[^/]+))/)?)?)?'
|
2014-09-19 11:46:30 -07:00
|
|
|
=> 'PhabricatorConfigDatabaseStatusController',
|
|
|
|
'dbissue/' => 'PhabricatorConfigDatabaseIssueController',
|
2013-03-06 14:14:09 -08:00
|
|
|
'(?P<verb>ignore|unignore)/(?P<key>[^/]+)/'
|
|
|
|
=> 'PhabricatorConfigIgnoreController',
|
2012-12-30 06:37:49 -08:00
|
|
|
'issue/' => array(
|
|
|
|
'' => 'PhabricatorConfigIssueListController',
|
|
|
|
'(?P<key>[^/]+)/' => 'PhabricatorConfigIssueViewController',
|
|
|
|
),
|
2012-12-27 15:20:09 -08:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|