mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-12 06:48:31 +01:00
Summary: Full new UI, testing some upcoming treatments for consideration in other View controllers. Small tweaks to allow PHUITwoColumnView to have fixed and fluid width, and let TransactionCommentView go fullWidth. Test Plan: Tested a number of Ponder cases, New Question, with and without summary, with and without answers, with and without comments. Mobile, Tablet, and Desktop layouts. Verify Project and Profile UI's still in tact. {F1120961} {F1120962} {F1120963} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15315
101 lines
2.7 KiB
PHP
101 lines
2.7 KiB
PHP
<?php
|
|
|
|
final class PhabricatorPonderApplication extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/ponder/';
|
|
}
|
|
|
|
public function getName() {
|
|
return pht('Ponder');
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Questions and Answers');
|
|
}
|
|
|
|
public function getIcon() {
|
|
return 'fa-university';
|
|
}
|
|
|
|
public function getFactObjectsForAnalysis() {
|
|
return array(
|
|
new PonderQuestion(),
|
|
);
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x97\xB3";
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new PonderRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/Q(?P<id>[1-9]\d*)'
|
|
=> 'PonderQuestionViewController',
|
|
'/ponder/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PonderQuestionListController',
|
|
'answer/add/'
|
|
=> 'PonderAnswerSaveController',
|
|
'answer/edit/(?P<id>\d+)/'
|
|
=> 'PonderAnswerEditController',
|
|
'answer/comment/(?P<id>\d+)/'
|
|
=> 'PonderAnswerCommentController',
|
|
'answer/history/(?P<id>\d+)/'
|
|
=> 'PonderAnswerHistoryController',
|
|
'question/edit/(?:(?P<id>\d+)/)?'
|
|
=> 'PonderQuestionEditController',
|
|
'question/create/'
|
|
=> 'PonderQuestionEditController',
|
|
'question/comment/(?P<id>\d+)/'
|
|
=> 'PonderQuestionCommentController',
|
|
'question/history/(?P<id>\d+)/'
|
|
=> 'PonderQuestionHistoryController',
|
|
'preview/'
|
|
=> 'PhabricatorMarkupPreviewController',
|
|
'question/status/(?P<id>[1-9]\d*)/'
|
|
=> 'PonderQuestionStatusController',
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getMailCommandObjects() {
|
|
return array(
|
|
'question' => array(
|
|
'name' => pht('Email Commands: Questions'),
|
|
'header' => pht('Interacting with Ponder Questions'),
|
|
'object' => new PonderQuestion(),
|
|
'summary' => pht(
|
|
'This page documents the commands you can use to interact with '.
|
|
'questions in Ponder.'),
|
|
),
|
|
);
|
|
}
|
|
|
|
protected function getCustomCapabilities() {
|
|
return array(
|
|
PonderDefaultViewCapability::CAPABILITY => array(
|
|
'template' => PonderQuestionPHIDType::TYPECONST,
|
|
'capability' => PhabricatorPolicyCapability::CAN_VIEW,
|
|
),
|
|
PonderModerateCapability::CAPABILITY => array(
|
|
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
|
'template' => PonderQuestionPHIDType::TYPECONST,
|
|
'capability' => PhabricatorPolicyCapability::CAN_EDIT,
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getApplicationSearchDocumentTypes() {
|
|
return array(
|
|
PonderQuestionPHIDType::TYPECONST,
|
|
);
|
|
}
|
|
|
|
}
|