mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-27 05:59:08 +01:00
Summary: Fixes T3566 List of poll actions should include ability to close an open poll or reopen a closed poll. Test Plan: Poll author should be able to close/reopen poll. Non-author should get policy screen when attempting to close/reopen poll. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T3566 Differential Revision: https://secure.phabricator.com/D8846
62 lines
1.5 KiB
PHP
62 lines
1.5 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('Slowvote User Guide');
|
|
}
|
|
|
|
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',
|
|
'close/(?P<id>[1-9]\d*)/' => 'PhabricatorSlowvoteCloseController',
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getCustomCapabilities() {
|
|
return array(
|
|
PhabricatorSlowvoteCapabilityDefaultView::CAPABILITY => array(
|
|
'caption' => pht('Default view policy for new polls.'),
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|