Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIDocumentView.php
Show All 18 Lines | final class PHUIDocumentView extends AphrontTagView { | ||||
private $fluid; | private $fluid; | ||||
public function setOffset($offset) { | public function setOffset($offset) { | ||||
$this->offset = $offset; | $this->offset = $offset; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setHeader(PHUIHeaderView $header) { | public function setHeader(PHUIHeaderView $header) { | ||||
$header->setTall(true); | |||||
$this->header = $header; | $this->header = $header; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setSideNav(PHUIListView $list, $display = self::NAV_BOTTOM) { | public function setSideNav(PHUIListView $list, $display = self::NAV_BOTTOM) { | ||||
$list->setType(PHUIListView::SIDENAV_LIST); | $list->setType(PHUIListView::SIDENAV_LIST); | ||||
$this->sidenav = $list; | $this->sidenav = $list; | ||||
$this->mobileview = $display; | $this->mobileview = $display; | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | if ($this->sidenav) { | ||||
array( | array( | ||||
'class' => 'phui-document-sidenav', | 'class' => 'phui-document-sidenav', | ||||
), | ), | ||||
$this->sidenav); | $this->sidenav); | ||||
} | } | ||||
$book = null; | $book = null; | ||||
if ($this->bookname) { | if ($this->bookname) { | ||||
$book = phutil_tag( | $book = pht('%s (%s)', $this->bookname, $this->bookdescription); | ||||
'div', | |||||
array( | |||||
'class' => 'phui-document-bookname grouped', | |||||
), | |||||
array( | |||||
phutil_tag( | |||||
'span', | |||||
array('class' => 'bookname'), | |||||
$this->bookname), | |||||
phutil_tag( | |||||
'span', | |||||
array('class' => 'bookdescription'), | |||||
$this->bookdescription), | |||||
)); | |||||
} | } | ||||
$topnav = null; | $topnav = null; | ||||
if ($this->topnav) { | if ($this->topnav) { | ||||
$topnav = phutil_tag( | $topnav = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-document-topnav', | 'class' => 'phui-document-topnav', | ||||
Show All 17 Lines | if ($this->fontKit) { | ||||
array( | array( | ||||
'class' => 'phui-font-'.$this->fontKit, | 'class' => 'phui-font-'.$this->fontKit, | ||||
), | ), | ||||
$this->renderChildren()); | $this->renderChildren()); | ||||
} else { | } else { | ||||
$main_content = $this->renderChildren(); | $main_content = $this->renderChildren(); | ||||
} | } | ||||
$this->header->setSubheader($book); | |||||
$content_inner = phutil_tag( | $content_inner = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-document-inner', | 'class' => 'phui-document-inner', | ||||
), | ), | ||||
array( | array( | ||||
$book, | |||||
$this->header, | $this->header, | ||||
$topnav, | $topnav, | ||||
$main_content, | $main_content, | ||||
$crumbs, | $crumbs, | ||||
)); | )); | ||||
if ($this->mobileview == self::NAV_BOTTOM) { | if ($this->mobileview == self::NAV_BOTTOM) { | ||||
$order = array($content_inner, $sidenav); | $order = array($content_inner, $sidenav); | ||||
Show All 22 Lines |