Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10679 from hypeJunction/shell
feat(views): a more flexible extendable html page shell
- Loading branch information
Showing
8 changed files
with
126 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/** | ||
* A wrapper to render a section of the page shell | ||
* | ||
* @uses $vars['section'] Section name (e.g. navbar, header etc) | ||
* @uses $vars['html'] Content of the element | ||
*/ | ||
$section = elgg_extract('section', $vars); | ||
$html = elgg_extract('html', $vars); | ||
|
||
if ($section && elgg_view_exists("page/elements/$section/before")) { | ||
echo elgg_view("page/elements/$section/before", $vars); | ||
} | ||
|
||
if (!empty($html)) { | ||
$class = ['elgg-page-section']; | ||
if ($section) { | ||
$class[] = "elgg-page-$section"; | ||
} | ||
|
||
$inner = elgg_format_element('div', [ | ||
'class' => 'elgg-inner', | ||
], $html); | ||
|
||
echo elgg_format_element('div', [ | ||
'class' => $class, | ||
], $inner); | ||
} | ||
|
||
if ($section && elgg_view_exists("page/elements/$section/after")) { | ||
echo elgg_view("page/elements/$section/after", $vars); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
<?php | ||
|
||
/** | ||
* Elgg topbar | ||
* The standard elgg top toolbar | ||
*/ | ||
if (!elgg_is_logged_in()) { | ||
return; | ||
} | ||
|
||
// Elgg logo | ||
echo elgg_view_menu('topbar', array('sort_by' => 'priority', array('elgg-menu-hz'))); | ||
echo elgg_view_menu('topbar', [ | ||
'sort_by' => 'priority', | ||
'class' => 'elgg-menu-hz', | ||
]); |
This file was deleted.
Oops, something went wrong.