
Summary: Ref T3373. This is still pretty messy: - The JS bugs out a bit with multiple primary object PHIDs on a single page. I'll fix this in a followup. - The comment form itself is enormous, I'll restore some show/hide stuff in a followup. Test Plan: Added answer comments in Ponder. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3373 Differential Revision: https://secure.phabricator.com/D6608
69 lines
1.8 KiB
PHP
69 lines
1.8 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationPonder extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/ponder/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Find Answers');
|
|
}
|
|
|
|
public function getIconName() {
|
|
return 'ponder';
|
|
}
|
|
|
|
public function getFactObjectsForAnalysis() {
|
|
return array(
|
|
new PonderQuestion(),
|
|
);
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x97\xB3";
|
|
}
|
|
|
|
public function loadStatus(PhabricatorUser $user) {
|
|
// replace with "x new unanswered questions" or some such
|
|
$status = array();
|
|
|
|
return $status;
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new PonderRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_COMMUNICATION;
|
|
}
|
|
|
|
public function isBeta() {
|
|
return true;
|
|
}
|
|
|
|
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/preview/' => 'PonderAnswerPreviewController',
|
|
'question/edit/(?:(?P<id>\d+)/)?' => 'PonderQuestionEditController',
|
|
'question/preview/' => 'PonderQuestionPreviewController',
|
|
'question/(?P<status>open|close)/(?P<id>[1-9]\d*)/' =>
|
|
'PonderQuestionStatusController',
|
|
'comment/add/' => 'PonderCommentSaveController',
|
|
'(?P<kind>question)/vote/' => 'PonderVoteSaveController',
|
|
'(?P<kind>answer)/vote/' => 'PonderVoteSaveController'
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|