mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Stick the page footer in the right place on Formation View pages
Summary: Ref T13516. This isn't terribly clean, but get the page footer into the bottom of the content page on FormationView pages so it doesn't overlap into the side panel. Test Plan: With and without a footer, viewed normal and FormationView pages. Saw footers in appropriate places at appropriate times. Maniphest Tasks: T13516 Differential Revision: https://secure.phabricator.com/D21166
This commit is contained in:
parent
d05d8f6558
commit
5a460e4ea5
4 changed files with 37 additions and 7 deletions
|
@ -12,7 +12,7 @@ return array(
|
|||
'core.pkg.css' => '589cd2fe',
|
||||
'core.pkg.js' => '49814bac',
|
||||
'dark-console.pkg.js' => '187792c2',
|
||||
'differential.pkg.css' => 'b3469b93',
|
||||
'differential.pkg.css' => '8e1a7922',
|
||||
'differential.pkg.js' => 'c8f88d74',
|
||||
'diffusion.pkg.css' => '42c75c37',
|
||||
'diffusion.pkg.js' => 'a98c0bf7',
|
||||
|
@ -156,7 +156,7 @@ return array(
|
|||
'rsrc/css/phui/phui-fontkit.css' => '1ec937e5',
|
||||
'rsrc/css/phui/phui-form-view.css' => '01b796c0',
|
||||
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
||||
'rsrc/css/phui/phui-formation-view.css' => '1e6b744b',
|
||||
'rsrc/css/phui/phui-formation-view.css' => 'd2dec8ed',
|
||||
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
||||
'rsrc/css/phui/phui-header-view.css' => '36c86a58',
|
||||
'rsrc/css/phui/phui-hovercard.css' => '6ca90fa0',
|
||||
|
@ -847,7 +847,7 @@ return array(
|
|||
'phui-fontkit-css' => '1ec937e5',
|
||||
'phui-form-css' => '1f177cb7',
|
||||
'phui-form-view-css' => '01b796c0',
|
||||
'phui-formation-view-css' => '1e6b744b',
|
||||
'phui-formation-view-css' => 'd2dec8ed',
|
||||
'phui-head-thing-view-css' => 'd7f293df',
|
||||
'phui-header-view-css' => '36c86a58',
|
||||
'phui-hovercard' => '074f0783',
|
||||
|
|
|
@ -191,4 +191,16 @@ final class PHUIFormationView
|
|||
return $items;
|
||||
}
|
||||
|
||||
public function setFooter($footer) {
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->getColumn() instanceof PHUIFormationContentView) {
|
||||
$item->getColumn()->appendChild($footer);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception(
|
||||
pht('Unable to find a content column to place the footer inside.'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
private $tabs;
|
||||
private $crumbs;
|
||||
private $navigation;
|
||||
private $footer;
|
||||
|
||||
public function setShowFooter($show_footer) {
|
||||
$this->showFooter = $show_footer;
|
||||
|
@ -196,6 +197,22 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
|
||||
|
||||
protected function willRenderPage() {
|
||||
$footer = $this->renderFooter();
|
||||
|
||||
// NOTE: A cleaner solution would be to let body layout elements implement
|
||||
// some kind of "LayoutInterface" so content can be embedded inside frames,
|
||||
// but there's only really one use case for this for now.
|
||||
$children = $this->renderChildren();
|
||||
if ($children) {
|
||||
$layout = head($children);
|
||||
if ($layout instanceof PHUIFormationView) {
|
||||
$layout->setFooter($footer);
|
||||
$footer = null;
|
||||
}
|
||||
}
|
||||
|
||||
$this->footer = $footer;
|
||||
|
||||
parent::willRenderPage();
|
||||
|
||||
if (!$this->getRequest()) {
|
||||
|
@ -501,8 +518,6 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
|
||||
$body = parent::getBody();
|
||||
|
||||
$footer = $this->renderFooter();
|
||||
|
||||
$nav = $this->getNavigation();
|
||||
$tabs = $this->getTabs();
|
||||
if ($nav) {
|
||||
|
@ -511,7 +526,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
$nav->setCrumbs($crumbs);
|
||||
}
|
||||
$nav->appendChild($body);
|
||||
$nav->appendFooter($footer);
|
||||
$nav->appendFooter($this->footer);
|
||||
$content = phutil_implode_html('', array($nav->render()));
|
||||
} else {
|
||||
$content = array();
|
||||
|
@ -530,7 +545,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
}
|
||||
|
||||
$content[] = $body;
|
||||
$content[] = $footer;
|
||||
$content[] = $this->footer;
|
||||
|
||||
$content = phutil_implode_html('', $content);
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
background-repeat: no-repeat;
|
||||
|
||||
display: none;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.device-desktop .phui-formation-resizer {
|
||||
|
@ -138,6 +139,8 @@
|
|||
top: {$menu.main.height};
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
background: {$lightgreybackground};
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.phui-flank-view-fixed .phui-flank-view-body {
|
||||
|
|
Loading…
Reference in a new issue