mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 11:11:10 +01:00
e381022bc7
Summary: Ref T603. Gives the create/edit interface a policy control, and adds an application-level default. Test Plan: Created and edited polls. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7321
61 lines
1.4 KiB
PHP
61 lines
1.4 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationSlowvote extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/vote/';
|
|
}
|
|
|
|
public function getIconName() {
|
|
return 'slowvote';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return 'Conduct Polls';
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x9C\x94";
|
|
}
|
|
|
|
public function getHelpURI() {
|
|
return PhabricatorEnv::getDoclink('article/Slowvote_User_Guide.html');
|
|
}
|
|
|
|
public function getFlavorText() {
|
|
return pht('Design by committee.');
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_UTILITIES;
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new SlowvoteRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/V(?P<id>[1-9]\d*)' => 'PhabricatorSlowvotePollController',
|
|
'/vote/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorSlowvoteListController',
|
|
'create/' => 'PhabricatorSlowvoteEditController',
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteEditController',
|
|
'(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteVoteController',
|
|
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteCommentController',
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getCustomCapabilities() {
|
|
return array(
|
|
PhabricatorSlowvoteCapabilityDefaultView::CAPABILITY => array(
|
|
'caption' => pht('Default view policy for new polls.'),
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|