mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Allow setting of tabs at StandardPageView
Summary: Rather than have tabs live in two column view, sometimes like `admin` we'll want a global set of tabs that work well with all layouts and crumbs. Test Plan: I tested this in an upcoming diff for instances. {F5080228} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18332
This commit is contained in:
parent
7621376aab
commit
fedf08743f
3 changed files with 35 additions and 3 deletions
|
@ -9,7 +9,7 @@ return array(
|
|||
'names' => array(
|
||||
'conpherence.pkg.css' => 'e68cf1fa',
|
||||
'conpherence.pkg.js' => 'b5b51108',
|
||||
'core.pkg.css' => 'd9c9cfd0',
|
||||
'core.pkg.css' => '851ae625',
|
||||
'core.pkg.js' => '5d80e0db',
|
||||
'darkconsole.pkg.js' => '1f9a31bc',
|
||||
'differential.pkg.css' => '45951e9e',
|
||||
|
@ -42,7 +42,7 @@ return array(
|
|||
'rsrc/css/application/base/main-menu-view.css' => '16053029',
|
||||
'rsrc/css/application/base/notification-menu.css' => '73fefdfa',
|
||||
'rsrc/css/application/base/phui-theme.css' => '9f261c6b',
|
||||
'rsrc/css/application/base/standard-page-view.css' => 'eb5b80c5',
|
||||
'rsrc/css/application/base/standard-page-view.css' => 'a0dae682',
|
||||
'rsrc/css/application/chatlog/chatlog.css' => 'd295b020',
|
||||
'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4',
|
||||
'rsrc/css/application/config/config-options.css' => 'd55ed093',
|
||||
|
@ -802,7 +802,7 @@ return array(
|
|||
'phabricator-shaped-request' => '7cbe244b',
|
||||
'phabricator-slowvote-css' => 'a94b7230',
|
||||
'phabricator-source-code-view-css' => 'aea41829',
|
||||
'phabricator-standard-page-view' => 'eb5b80c5',
|
||||
'phabricator-standard-page-view' => 'a0dae682',
|
||||
'phabricator-textareautils' => '320810c8',
|
||||
'phabricator-title' => '485aaa6c',
|
||||
'phabricator-tooltip' => '358b8c04',
|
||||
|
|
|
@ -19,6 +19,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
private $showFooter = true;
|
||||
private $showDurableColumn = true;
|
||||
private $quicksandConfig = array();
|
||||
private $tabs;
|
||||
private $crumbs;
|
||||
private $navigation;
|
||||
|
||||
|
@ -159,6 +160,17 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
return $this->crumbs;
|
||||
}
|
||||
|
||||
public function setTabs(PHUIListView $tabs) {
|
||||
$tabs->setType(PHUIListView::TABBAR_LIST);
|
||||
$tabs->addClass('phabricator-standard-page-tabs');
|
||||
$this->tabs = $tabs;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTabs() {
|
||||
return $this->tabs;
|
||||
}
|
||||
|
||||
public function setNavigation(AphrontSideNavFilterView $navigation) {
|
||||
$this->navigation = $navigation;
|
||||
return $this;
|
||||
|
@ -528,6 +540,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
$footer = $this->renderFooter();
|
||||
|
||||
$nav = $this->getNavigation();
|
||||
$tabs = $this->getTabs();
|
||||
if ($nav) {
|
||||
$crumbs = $this->getCrumbs();
|
||||
if ($crumbs) {
|
||||
|
@ -541,9 +554,17 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
|
||||
$crumbs = $this->getCrumbs();
|
||||
if ($crumbs) {
|
||||
if ($this->getTabs()) {
|
||||
$crumbs->setBorder(true);
|
||||
}
|
||||
$content[] = $crumbs;
|
||||
}
|
||||
|
||||
$tabs = $this->getTabs();
|
||||
if ($tabs) {
|
||||
$content[] = $tabs;
|
||||
}
|
||||
|
||||
$content[] = $body;
|
||||
$content[] = $footer;
|
||||
|
||||
|
|
|
@ -176,3 +176,14 @@ a.handle-status-closed:hover {
|
|||
position: absolute;
|
||||
left: -50px;
|
||||
}
|
||||
|
||||
.phabricator-standard-page-tabs {
|
||||
padding: 0 32px;
|
||||
margin-bottom: 32px;
|
||||
background: {$page.content};
|
||||
box-shadow: 0 0 3px 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.phabricator-standard-page-tabs.phui-list-tabbar .phui-list-item-href {
|
||||
padding: 12px 24px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue