Skip to content
Permalink
Browse files
Merge branch 'MDL-63040-master' of git://github.com/peterRd/moodle
  • Loading branch information
David Monllao committed Oct 29, 2018
2 parents fca51b9 + f9d156c commit 4bd78d79a8581e614339719f8ba6f5fb8436d2ed
Showing with 25 additions and 5 deletions.
  1. +5 −0 lib/outputrenderers.php
  2. +1 −1 theme/boost/config.php
  3. +18 −3 theme/boost/templates/header.mustache
  4. +1 −1 theme/bootstrapbase/config.php
@@ -4257,6 +4257,11 @@ public function render_skip_links($links) {
*/
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');

@@ -82,7 +82,7 @@
'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(
@@ -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">
@@ -88,7 +88,7 @@
'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(

0 comments on commit 4bd78d7

Please sign in to comment.