mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-22834 - added dock support styles
This commit is contained in:
parent
e4249c5b32
commit
abbdb60539
4 changed files with 128 additions and 20 deletions
|
@ -3,18 +3,23 @@
|
|||
$hasheading = ($PAGE->heading);
|
||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$hasfooter = (empty($PAGE->layout_options['nofooter']));
|
||||
|
||||
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
|
||||
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
|
||||
|
||||
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
|
||||
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
|
||||
|
||||
$bodyclasses = array();
|
||||
if ($hassidepre && !$hassidepost) {
|
||||
if ($showsidepre && !$showsidepost) {
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
} else if ($hassidepost && !$hassidepre) {
|
||||
} else if ($showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
} else if (!$hassidepost && !$hassidepre) {
|
||||
} else if (!$showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
|
@ -61,7 +66,7 @@ echo $OUTPUT->doctype() ?>
|
|||
</div>
|
||||
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="region-pre">
|
||||
<div id="region-pre" class="block-region">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
|
@ -69,7 +74,7 @@ echo $OUTPUT->doctype() ?>
|
|||
<?php } ?>
|
||||
|
||||
<?php if ($hassidepost) { ?>
|
||||
<div id="region-post">
|
||||
<div id="region-post" class="block-region">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue