2012-10-01 12:56:02 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorApplicationSlowvote extends PhabricatorApplication {
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
return '/vote/';
|
|
|
|
}
|
|
|
|
|
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-10-01 12:56:02 -07:00
|
|
|
return 'slowvote';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
return 'Conduct Polls';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x9C\x94";
|
|
|
|
}
|
|
|
|
|
2012-10-03 12:39:18 -07:00
|
|
|
public function getHelpURI() {
|
|
|
|
return PhabricatorEnv::getDoclink('article/Slowvote_User_Guide.html');
|
|
|
|
}
|
|
|
|
|
2012-10-03 15:16:26 -07:00
|
|
|
public function getFlavorText() {
|
|
|
|
return pht('Design by committee.');
|
|
|
|
}
|
2012-10-03 12:39:18 -07:00
|
|
|
|
2012-10-03 15:46:19 -07:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
}
|
|
|
|
|
2013-04-16 08:18:52 -07:00
|
|
|
public function getRemarkupRules() {
|
|
|
|
return array(
|
|
|
|
new SlowvoteRemarkupRule(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2012-10-01 12:56:02 -07:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
2012-10-05 16:06:16 -07:00
|
|
|
'/V(?P<id>[1-9]\d*)' => 'PhabricatorSlowvotePollController',
|
2012-10-01 12:56:02 -07:00
|
|
|
'/vote/' => array(
|
2013-07-13 10:41:49 -07:00
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
|
|
=> 'PhabricatorSlowvoteListController',
|
2013-07-15 10:50:38 -07:00
|
|
|
'create/' => 'PhabricatorSlowvoteEditController',
|
2013-07-15 11:07:37 -07:00
|
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteEditController',
|
2013-05-03 15:48:59 -07:00
|
|
|
'(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteVoteController',
|
2013-07-15 04:45:43 -07:00
|
|
|
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteCommentController',
|
2012-10-01 12:56:02 -07:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2013-10-16 10:36:00 -07:00
|
|
|
public function getCustomCapabilities() {
|
|
|
|
return array(
|
|
|
|
PhabricatorSlowvoteCapabilityDefaultView::CAPABILITY => array(
|
|
|
|
'caption' => pht('Default view policy for new polls.'),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2012-10-01 12:56:02 -07:00
|
|
|
}
|