Basic Answer Wiki for Ponder

Summary: Adds an additional field for questions, an answer wiki, should should usually be community editable.

Test Plan: New question, edit question, no wiki, lots of wiki.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14003
This commit is contained in:
Chad Little
2015-08-29 13:59:33 -07:00
parent 96e7f766ff
commit 2665970762
6 changed files with 57 additions and 1 deletions

View File

@@ -98,10 +98,20 @@ final class PonderQuestionViewController extends PonderController {
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->addTextCrumb('Q'.$id, '/Q'.$id);
$answer_wiki = null;
if ($question->getAnswerWiki()) {
$answer = phutil_tag_div('mlt mlb msr msl', $question->getAnswerWiki());
$answer_wiki = id(new PHUIObjectBoxView())
->setHeaderText(pht('Answer Summary'))
->setColor(PHUIObjectBoxView::COLOR_BLUE)
->appendChild($answer);
}
$ponder_view = id(new PHUITwoColumnView())
->setMainColumn(array(
$object_box,
$comment_view,
$answer_wiki,
$answers,
$answer_add_panel,
))