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:
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user