Add "thread" role and allow threads to render without thread lists

Summary: The actual layout on mobile is a bit silly since the thread ends up being like 5px tall for now, but it technically works. Ref T2644.

Test Plan: {F38106}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T2421

Differential Revision: https://secure.phabricator.com/D5506
This commit is contained in:
epriestley
2013-04-01 12:52:30 -07:00
parent 0b2bcf2793
commit 5ba5cb5675
7 changed files with 119 additions and 68 deletions

View File

@@ -54,14 +54,32 @@ final class ConpherenceViewController extends
$header = $this->renderHeaderPaneContent();
$messages = $this->renderMessagePaneContent();
$content = $header + $messages;
return id(new AphrontAjaxResponse())->setContent($content);
if ($request->isAjax()) {
return id(new AphrontAjaxResponse())->setContent($content);
}
$layout = id(new ConpherenceLayoutView())
->setBaseURI($this->getApplicationURI())
->setThread($conpherence)
->setHeader($header)
->setMessages($messages['messages'])
->setReplyForm($messages['form'])
->setRole('thread');
return $this->buildApplicationPage(
$layout,
array(
'title' => $conpherence->getTitle(),
'device' => true,
));
}
private function renderHeaderPaneContent() {
require_celerity_resource('conpherence-header-pane-css');
$conpherence = $this->getConpherence();
$header = $this->buildHeaderPaneContent($conpherence);
return array('header' => $header);
return array('header' => hsprintf('%s', $header));
}
@@ -107,7 +125,7 @@ final class ConpherenceViewController extends
pht('Show Older Messages'));
return array(
'messages' => $scrollbutton.$transactions,
'messages' => hsprintf('%s%s', $scrollbutton, $transactions),
'form' => $form
);