public function render() { require_celerity_resource('ponder-core-view-css'); $question = $this->question; $handles = $this->handles; $user = $this->user; $panel = id(new AphrontPanelView())->addClass("ponder-panel"); $contentview = new PonderPostBodyView(); $contentview->setTarget($question)->setQuestion($question)->setUser($user)->setHandles($handles)->setAction(PonderConstants::ASKED_LITERAL); $commentview = new PonderCommentListView(); $commentview->setUser($user)->setHandles($handles)->setComments($question->getComments())->setTarget($question->getPHID())->setQuestionID($question->getID())->setActionURI(new PhutilURI('/ponder/comment/add/')); $panel->appendChild($contentview); $panel->appendChild($commentview); return $panel->render(); }
public function render() { require_celerity_resource('ponder-post-css'); $question = $this->question; $user = $this->user; $handles = $this->handles; $panel = id(new AphrontPanelView())->addClass("ponder-panel")->setHeader("Responses:"); foreach ($this->answers as $cur_answer) { $view = new PonderPostBodyView(); $view->setQuestion($question)->setTarget($cur_answer)->setAction(PonderConstants::ANSWERED_LITERAL)->setHandles($handles)->setUser($user); $commentview = new PonderCommentListView(); $commentview->setUser($user)->setHandles($handles)->setComments($cur_answer->getComments())->setTarget($cur_answer->getPHID())->setQuestionID($question->getID())->setActionURI(new PhutilURI('/ponder/comment/add/')); $panel->appendChild($view); $panel->appendChild($commentview); $panel->appendChild('<div style="height: 40px; clear : both"></div>'); } return $panel->render(); }