Scaffolding for Fund
Summary:
Ref T5835. This is all pretty boilerplate, and does not interact with Phortune at all yet.
You can create "Initiatives", which have a title and description, and support most of the expected infrastructure (policies, transactions, mentions, edges, appsearch, remakrup, etc).
Only notable decisions:
- Initiatives have an explicit owner. I think it's good to have a single clearly-responsible user behind an initiative.
- I think that's it?
Test Plan:
- Created an initiative.
- Edited an initiative.
- Changed application policy defaults.
- Searched for initiatives.
- Subscribed to an initiative.
- Opened/closed an initiative.
- Used `I123` and `{I123}` in remarkup.
- Destroyed an initiative.
Reviewers: chad, btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T5835
Differential Revision: https://secure.phabricator.com/D10481
2014-09-11 22:38:58 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorFundApplication extends PhabricatorApplication {
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
return pht('Fund');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
return '/fund/';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
return pht('Donate');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getIconName() {
|
|
|
|
return 'phund';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x99\xA5";
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
}
|
|
|
|
|
2014-09-18 03:25:57 +02:00
|
|
|
public function isPrototype() {
|
Scaffolding for Fund
Summary:
Ref T5835. This is all pretty boilerplate, and does not interact with Phortune at all yet.
You can create "Initiatives", which have a title and description, and support most of the expected infrastructure (policies, transactions, mentions, edges, appsearch, remakrup, etc).
Only notable decisions:
- Initiatives have an explicit owner. I think it's good to have a single clearly-responsible user behind an initiative.
- I think that's it?
Test Plan:
- Created an initiative.
- Edited an initiative.
- Changed application policy defaults.
- Searched for initiatives.
- Subscribed to an initiative.
- Opened/closed an initiative.
- Used `I123` and `{I123}` in remarkup.
- Destroyed an initiative.
Reviewers: chad, btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T5835
Differential Revision: https://secure.phabricator.com/D10481
2014-09-11 22:38:58 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRemarkupRules() {
|
|
|
|
return array(
|
|
|
|
new FundInitiativeRemarkupRule(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/I(?P<id>[1-9]\d*)' => 'FundInitiativeViewController',
|
|
|
|
'/fund/' => array(
|
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?' => 'FundInitiativeListController',
|
|
|
|
'create/' => 'FundInitiativeEditController',
|
2014-09-12 15:31:11 +02:00
|
|
|
'edit/(?:(?P<id>\d+)/)?' => 'FundInitiativeEditController',
|
|
|
|
'close/(?P<id>\d+)/' => 'FundInitiativeCloseController',
|
|
|
|
'back/(?P<id>\d+)/' => 'FundInitiativeBackController',
|
|
|
|
'backers/(?:(?P<id>\d+)/)?(?:query/(?P<queryKey>[^/]+)/)?'
|
|
|
|
=> 'FundBackerListController',
|
Scaffolding for Fund
Summary:
Ref T5835. This is all pretty boilerplate, and does not interact with Phortune at all yet.
You can create "Initiatives", which have a title and description, and support most of the expected infrastructure (policies, transactions, mentions, edges, appsearch, remakrup, etc).
Only notable decisions:
- Initiatives have an explicit owner. I think it's good to have a single clearly-responsible user behind an initiative.
- I think that's it?
Test Plan:
- Created an initiative.
- Edited an initiative.
- Changed application policy defaults.
- Searched for initiatives.
- Subscribed to an initiative.
- Opened/closed an initiative.
- Used `I123` and `{I123}` in remarkup.
- Destroyed an initiative.
Reviewers: chad, btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T5835
Differential Revision: https://secure.phabricator.com/D10481
2014-09-11 22:38:58 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getCustomCapabilities() {
|
|
|
|
return array(
|
|
|
|
FundDefaultViewCapability::CAPABILITY => array(
|
|
|
|
'caption' => pht('Default view policy for newly created initiatives.'),
|
|
|
|
),
|
|
|
|
FundCreateInitiativesCapability::CAPABILITY => array(
|
|
|
|
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|