mirror of
https://github.com/moodle/moodle.git
synced 2025-04-23 09:23:09 +02:00
MDL-63303 message: move message drawer to end of <body>
Fix some of the behat tests that are looking for generic button names that match some of the buttons in the message drawer which happen to appear earlier in the DOM.
This commit is contained in:
parent
663ccd58ed
commit
c75559cfff
lib
message
theme
boost
bootstrapbase/layout
clean/layout
@ -946,6 +946,39 @@ class core_renderer extends renderer_base {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* The standard HTML that should be output just before the <footer> tag.
|
||||
* Designed to be called in theme layout.php files.
|
||||
*
|
||||
* @return string HTML fragment.
|
||||
*/
|
||||
public function standard_after_main_region_html() {
|
||||
global $CFG;
|
||||
$output = '';
|
||||
if ($this->page->pagelayout !== 'embedded' && !empty($CFG->additionalhtmlbottomofbody)) {
|
||||
$output .= "\n".$CFG->additionalhtmlbottomofbody;
|
||||
}
|
||||
|
||||
// Give subsystems an opportunity to inject extra html content. The callback
|
||||
// must always return a string containing valid html.
|
||||
foreach (\core_component::get_core_subsystems() as $name => $path) {
|
||||
if ($path) {
|
||||
$output .= component_callback($name, 'standard_after_main_region_html', [], '');
|
||||
}
|
||||
}
|
||||
|
||||
// Give plugins an opportunity to inject extra html content. The callback
|
||||
// must always return a string containing valid html.
|
||||
$pluginswithfunction = get_plugins_with_function('standard_after_main_region_html', 'lib.php');
|
||||
foreach ($pluginswithfunction as $plugins) {
|
||||
foreach ($plugins as $function) {
|
||||
$output .= $function();
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the standard string that says whether you are logged in (and switched
|
||||
* roles/logged in as another user).
|
||||
|
@ -808,7 +808,7 @@ function core_message_render_navbar_output(\renderer_base $renderer) {
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
function core_message_before_standard_top_of_body_html() {
|
||||
function core_message_standard_after_main_region_html() {
|
||||
global $USER, $CFG, $PAGE;
|
||||
|
||||
// Early bail out conditions.
|
||||
|
@ -1200,7 +1200,7 @@ $message-drawer-width: 320px;
|
||||
right: 0;
|
||||
height: calc(100% - #{$navbar-height});
|
||||
width: $message-drawer-width;
|
||||
z-index: $zindex-fixed;
|
||||
z-index: $zindex-sticky;
|
||||
box-shadow: -2px 2px 4px rgba(0, 0, 0, .08);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -14077,7 +14077,7 @@ a.ygtvspacer:hover {
|
||||
right: 0;
|
||||
height: calc(100% - 50px);
|
||||
width: 320px;
|
||||
z-index: 1030;
|
||||
z-index: 1020;
|
||||
box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.08);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -56,6 +56,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{{ output.standard_after_main_region_html }}}
|
||||
|
||||
</div>
|
||||
{{{ output.standard_end_of_body_html }}}
|
||||
</body>
|
||||
|
@ -87,6 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{{ output.standard_after_main_region_html }}}
|
||||
{{> theme_boost/nav-drawer }}
|
||||
{{> theme_boost/footer }}
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -69,6 +70,8 @@ echo $OUTPUT->doctype() ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
<p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
|
||||
|
@ -69,6 +69,7 @@ echo $OUTPUT->doctype() ?>
|
||||
</section>
|
||||
<?php echo $OUTPUT->blocks('side-pre', $sidepre); ?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
|
@ -78,6 +78,7 @@ echo $OUTPUT->doctype() ?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->blocks('side-post', $sidepost); ?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
|
@ -70,6 +70,7 @@ echo $OUTPUT->doctype() ?>
|
||||
?>
|
||||
</section>
|
||||
</div>
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
|
@ -72,6 +72,7 @@ echo $OUTPUT->doctype() ?>
|
||||
<?php echo $OUTPUT->blocks('side-pre', $sidepre);
|
||||
?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
|
@ -85,6 +85,7 @@ echo $OUTPUT->doctype() ?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->blocks('side-post', $sidepost); ?>
|
||||
</div>
|
||||
<?php echo $OUTPUT->standard_after_main_region_html() ?>
|
||||
|
||||
<footer id="page-footer">
|
||||
<div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user