Have TransactionComments return a PHUIObjectBoxView

Summary: Simplifies the code a bit and fixes all the wonky previews. Fixes T4053

Test Plan: Test all pages, logged in and logged out.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4053

Differential Revision: https://secure.phabricator.com/D7622
This commit is contained in:
Chad Little
2013-11-21 16:09:04 -08:00
parent 6ead3a160b
commit b154b07f0e
12 changed files with 110 additions and 154 deletions

View File

@@ -210,19 +210,15 @@ final class PonderQuestionViewController extends PonderController {
->setUser($viewer)
->setObjectPHID($question->getPHID())
->setShowPreview(false)
->setHeaderText(pht('Question Comment'))
->setAction($this->getApplicationURI("/question/comment/{$id}/"))
->setSubmitButtonName(pht('Comment'));
$object_box = id(new PHUIObjectBoxView())
->setFlush(true)
->setHeaderText(pht('Question Comment'))
->appendChild($add_comment);
return $this->wrapComments(
count($xactions),
array(
$timeline,
$object_box,
$add_comment,
));
}
@@ -286,15 +282,11 @@ final class PonderQuestionViewController extends PonderController {
->setUser($viewer)
->setObjectPHID($answer->getPHID())
->setShowPreview(false)
->setHeaderText(pht('Answer Comment'))
->setAction($this->getApplicationURI("/answer/comment/{$id}/"))
->setSubmitButtonName(pht('Comment'));
$comment_box = id(new PHUIObjectBoxView())
->setFlush(true)
->setHeaderText(pht('Answer Comment'))
->appendChild($form);
$details[] = $comment_box;
$details[] = $form;
$out[] = $this->wrapComments(
count($xactions),