Merge branch 'MDL-63040-master' of git://github.com/peterRd/moodle

This commit is contained in:
David Monllao
2018-10-29 10:42:51 +01:00
4 changed files with 25 additions and 5 deletions
+5
View File
@@ -4257,6 +4257,11 @@ EOD;
*/
protected function render_context_header(context_header $contextheader) {
$showheader = empty($this->page->layout_options['nocontextheader']);
if (!$showheader) {
return '';
}
// All the html stuff goes here.
$html = html_writer::start_div('page-context-header');
+1 -1
View File
@@ -82,7 +82,7 @@ $THEME->layouts = [
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true, 'langmenu' => true),
'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
),
// My public page.
'mypublic' => array(
+18 -3
View File
@@ -15,16 +15,31 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template boost/header
This template renders the header.
Example context (json):
{
"contextheader": "context_header_html",
"settingsmenu": "settings_html",
"hasnavbar": false,
"navbar": "navbar_if_available",
"courseheader": "course_header_html"
}
Page header.
}}
<header id="page-header" class="row">
<div class="col-12 pt-3 pb-3">
<div class="card">
<div class="card-body">
<div class="card {{^contextheader}}border-0{{/contextheader}}">
<div class="card-body {{^contextheader}}p-2{{/contextheader}}">
<div class="d-flex">
{{#contextheader}}
<div class="mr-auto">
{{{contextheader}}}
{{{contextheader}}}
</div>
{{/contextheader}}
{{#settingsmenu}}
<div class="context-header-settings-menu">
+1 -1
View File
@@ -88,7 +88,7 @@ $THEME->layouts = array(
'file' => 'columns3.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('langmenu' => true),
'options' => array('langmenu' => true, 'nocontextheader' => true),
),
// My public page.
'mypublic' => array(