mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-39573 theme: bootstrap - always show pre and post regions when editing
This commit is contained in:
parent
84bf8a3971
commit
6693089b90
2 changed files with 22 additions and 0 deletions
|
@ -25,6 +25,17 @@ $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->regio
|
|||
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
|
||||
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
|
||||
|
||||
// If there can be a sidepost region on this page and we are editing, always
|
||||
// show it so blocks can be dragged into it.
|
||||
if ($PAGE->user_is_editing()) {
|
||||
if ($PAGE->blocks->is_known_region('side-pre')) {
|
||||
$showsidepre = true;
|
||||
}
|
||||
if ($PAGE->blocks->is_known_region('side-post')) {
|
||||
$showsidepost = true;
|
||||
}
|
||||
}
|
||||
|
||||
$custommenu = $OUTPUT->custom_menu();
|
||||
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
|
||||
|
||||
|
|
|
@ -39,6 +39,17 @@ $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->regio
|
|||
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
|
||||
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
|
||||
|
||||
// If there can be a sidepost region on this page and we are editing, always
|
||||
// show it so blocks can be dragged into it.
|
||||
if ($PAGE->user_is_editing()) {
|
||||
if ($PAGE->blocks->is_known_region('side-pre')) {
|
||||
$showsidepre = true;
|
||||
}
|
||||
if ($PAGE->blocks->is_known_region('side-post')) {
|
||||
$showsidepost = true;
|
||||
}
|
||||
}
|
||||
|
||||
$haslogo = (!empty($PAGE->theme->settings->logo));
|
||||
|
||||
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue