2012-08-07 11:54:49 -07:00
|
|
|
<?php
|
|
|
|
|
|
2014-07-23 10:03:09 +10:00
|
|
|
final class PhabricatorProjectApplication extends PhabricatorApplication {
|
2012-08-07 11:54:49 -07:00
|
|
|
|
|
|
|
|
public function getName() {
|
2013-02-13 09:22:14 -08:00
|
|
|
return pht('Projects');
|
2012-08-07 11:54:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
(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
|
|
|
return pht('Get Organized');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isPinnedByDefault(PhabricatorUser $viewer) {
|
|
|
|
|
return true;
|
2012-08-07 11:54:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
|
return '/project/';
|
|
|
|
|
}
|
|
|
|
|
|
Use application icons for "Eye" menu and Crumbs
Summary:
Issues here:
- Need an application-sized "eye", or a "home" icon for "Phabricator Home".
- Some of the "apps_lb_2x" sliced images are the "_dark_" versions, not the light versions.
- If you slice an application-sized "logout" (power off) icon and application-sized "help" (questionmark in circle) icon I can replace the current menu icons and nearly get rid of "autosprite".
- To replace the icons on /applications/, the non-retina size is "4x", so we'd need "8x" for retina. Alternatively I can reduce the icon sizes by 50%.
- The "Help", "Settings" and "Logout" items currently have a "glowing" hover state, which needs a variant (or we can drop it).
- The /applications/ icons have a white hover state (or we can drop it).
- The 1x application (14x14) icons aren't used anywhere right now, should they be? Maybe in the feed in the future, etc?
- The "apps-2x" and "apps-large" sheets are the same image, but getting them to actually use the same file is a bit tricky, so I just left them separate for now.
Test Plan:
{F26698}
{F26699}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T1960
Differential Revision: https://secure.phabricator.com/D4108
2012-12-07 13:37:28 -08:00
|
|
|
public function getIconName() {
|
2012-08-14 14:23:55 -07:00
|
|
|
return 'projects';
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-03 15:16:26 -07:00
|
|
|
public function getFlavorText() {
|
|
|
|
|
return pht('Group stuff into big piles.');
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-18 02:46:39 -07:00
|
|
|
public function getRemarkupRules() {
|
|
|
|
|
return array(
|
|
|
|
|
new ProjectRemarkupRule(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-03 17:19:40 -07:00
|
|
|
public function getEventListeners() {
|
|
|
|
|
return array(
|
|
|
|
|
new PhabricatorProjectUIEventListener(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-07 11:54:49 -07:00
|
|
|
public function getRoutes() {
|
|
|
|
|
return array(
|
|
|
|
|
'/project/' => array(
|
2013-07-22 08:34:35 -07:00
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorProjectListController',
|
2012-08-07 11:54:49 -07:00
|
|
|
'filter/(?P<filter>[^/]+)/' => 'PhabricatorProjectListController',
|
2014-02-16 20:17:52 -08:00
|
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectEditMainController',
|
|
|
|
|
'details/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectEditDetailsController',
|
2014-07-23 10:03:09 +10:00
|
|
|
'archive/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectArchiveController',
|
2012-10-05 16:06:16 -07:00
|
|
|
'members/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectMembersEditController',
|
2014-03-19 19:30:27 -07:00
|
|
|
'members/(?P<id>[1-9]\d*)/remove/'
|
|
|
|
|
=> 'PhabricatorProjectMembersRemoveController',
|
2014-02-16 20:17:52 -08:00
|
|
|
'view/(?P<id>[1-9]\d*)/'
|
2012-08-07 11:54:49 -07:00
|
|
|
=> 'PhabricatorProjectProfileController',
|
2014-07-23 10:03:09 +10:00
|
|
|
'picture/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectEditPictureController',
|
|
|
|
|
'icon/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectEditIconController',
|
2012-08-07 11:54:49 -07:00
|
|
|
'create/' => 'PhabricatorProjectCreateController',
|
2014-05-20 11:42:05 -07:00
|
|
|
'board/(?P<id>[1-9]\d*)/'.
|
|
|
|
|
'(?P<filter>filter/)?'.
|
2014-07-23 10:03:09 +10:00
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
|
|
|
=> 'PhabricatorProjectBoardViewController',
|
2014-01-13 12:24:36 -08:00
|
|
|
'move/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectMoveController',
|
2014-07-11 19:27:07 -07:00
|
|
|
'board/(?P<projectID>[1-9]\d*)/' => array(
|
|
|
|
|
'edit/(?:(?P<id>\d+)/)?'
|
|
|
|
|
=> 'PhabricatorProjectBoardEditController',
|
|
|
|
|
'delete/(?:(?P<id>\d+)/)?'
|
|
|
|
|
=> 'PhabricatorProjectBoardDeleteController',
|
|
|
|
|
'column/(?:(?P<id>\d+)/)?'
|
|
|
|
|
=> 'PhabricatorProjectColumnDetailController',
|
|
|
|
|
'reorder/'
|
|
|
|
|
=> 'PhabricatorProjectBoardReorderController',
|
|
|
|
|
),
|
2012-10-05 16:06:16 -07:00
|
|
|
'update/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/'
|
2012-08-07 11:54:49 -07:00
|
|
|
=> 'PhabricatorProjectUpdateController',
|
2013-10-22 13:49:37 -07:00
|
|
|
'history/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectHistoryController',
|
2014-05-19 12:40:57 -07:00
|
|
|
'(?P<action>watch|unwatch)/(?P<id>[1-9]\d*)/'
|
|
|
|
|
=> 'PhabricatorProjectWatchController',
|
2014-05-22 15:16:16 -07:00
|
|
|
|
|
|
|
|
),
|
|
|
|
|
'/tag/' => array(
|
|
|
|
|
'(?P<slug>[^/]+)/' => 'PhabricatorProjectProfileController',
|
2014-06-13 14:09:21 -07:00
|
|
|
'(?P<slug>[^/]+)/board/' => 'PhabricatorProjectBoardViewController',
|
2012-08-07 11:54:49 -07:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-10 04:29:07 -07:00
|
|
|
protected function getCustomCapabilities() {
|
|
|
|
|
return array(
|
2014-07-25 08:20:39 +10:00
|
|
|
ProjectCreateProjectsCapability::CAPABILITY => array(),
|
2013-10-10 04:29:07 -07:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-07 11:54:49 -07:00
|
|
|
}
|