Restore Ponder question commenting

Summary: Ref T3373. Same issues as the other commenting patch; it's huge and the JS is a bit buggy. Backend is fine, though.

Test Plan: Made some comments on a question.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3373

Differential Revision: https://secure.phabricator.com/D6610
This commit is contained in:
epriestley
2013-07-28 17:58:34 -07:00
parent d4b24a2c07
commit b6130ad49e
6 changed files with 83 additions and 110 deletions

View File

@@ -152,6 +152,7 @@ final class PonderQuestionViewController extends PonderController {
private function buildQuestionTransactions(PonderQuestion $question) {
$viewer = $this->getRequest()->getUser();
$id = $question->getID();
$xactions = id(new PonderQuestionTransactionQuery())
->setViewer($viewer)
@@ -174,9 +175,16 @@ final class PonderQuestionViewController extends PonderController {
->setTransactions($xactions)
->setMarkupEngine($engine);
// TODO: Add comment form.
$add_comment = id(new PhabricatorApplicationTransactionCommentView())
->setUser($viewer)
->setShowPreview(false)
->setAction($this->getApplicationURI("/question/comment/{$id}/"))
->setSubmitButtonName(pht('Comment'));
return $timeline;
return array(
$timeline,
$add_comment,
);
}
private function buildAnswers(array $answers) {