Add layout roles and CSS rules for devices for Conpherence
Summary: Currently, `/conpherence/` shows the widget panel on devices. Make it show the thread list instead.
Test Plan: {F38099}
Reviewers: btrahan
Reviewed By: btrahan
CC: aran, chad
Maniphest Tasks: T2421
Differential Revision: https://secure.phabricator.com/D5505
This commit is contained in:
@@ -54,16 +54,17 @@ final class ConpherenceListController
|
||||
->setUnreadThreads($unread)
|
||||
->setReadThreads($read);
|
||||
|
||||
$main_pane = id(new ConpherenceLayoutView())
|
||||
$layout = id(new ConpherenceLayoutView())
|
||||
->setBaseURI($this->getApplicationURI())
|
||||
->setThreadView($thread_view);
|
||||
->setThreadView($thread_view)
|
||||
->setRole('list');
|
||||
|
||||
if ($conpherence) {
|
||||
$main_pane->setThread($conpherence);
|
||||
$layout->setThread($conpherence);
|
||||
}
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$main_pane,
|
||||
$layout,
|
||||
array(
|
||||
'title' => $title,
|
||||
'device' => true,
|
||||
|
||||
@@ -5,6 +5,12 @@ final class ConpherenceLayoutView extends AphrontView {
|
||||
private $thread;
|
||||
private $baseURI;
|
||||
private $threadView;
|
||||
private $role;
|
||||
|
||||
public function setRole($role) {
|
||||
$this->role = $role;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getThreadView() {
|
||||
return $this->threadView;
|
||||
@@ -37,6 +43,7 @@ final class ConpherenceLayoutView extends AphrontView {
|
||||
'form_pane' => 'conpherence-form',
|
||||
'menu_pane' => 'conpherence-menu',
|
||||
'selectedID' => ($this->thread ? $this->thread->getID() : null),
|
||||
'role' => $this->role,
|
||||
));
|
||||
|
||||
Javelin::initBehavior('conpherence-drag-and-drop-photo',
|
||||
@@ -51,7 +58,7 @@ final class ConpherenceLayoutView extends AphrontView {
|
||||
'div',
|
||||
array(
|
||||
'sigil' => 'conpherence-layout',
|
||||
'class' => 'conpherence-layout',
|
||||
'class' => 'conpherence-layout conpherence-role-'.$this->role,
|
||||
),
|
||||
array(
|
||||
javelin_tag(
|
||||
|
||||
Reference in New Issue
Block a user