diff --git a/theme/canvas/config.php b/theme/canvas/config.php index 925a72b0701..d5d7d470d54 100644 --- a/theme/canvas/config.php +++ b/theme/canvas/config.php @@ -194,16 +194,13 @@ $THEME->hidefromselector = true; // switched on. ///////////////////////////////////////////////////// - - -// $THEME->enable_dock = false; +$THEME->enable_dock = true; //////////////////////////////////////////////////// // Do you want to use the new navigation dock? //////////////////////////////////////////////////// - -// $THEME->editor_sheets +$THEME->editor_sheets = array('editor'); //////////////////////////////////////////////////// // An array of stylesheets to include within the @@ -264,6 +261,4 @@ $THEME->hidefromselector = true; //////////////////////////////////////////////////// // Sets a custom render factory to use with the // theme, used when working with custom renderers. -//////////////////////////////////////////////////// - -$THEME->editor_sheets = array('editor'); \ No newline at end of file +//////////////////////////////////////////////////// \ No newline at end of file diff --git a/theme/canvas/layout/frontpage.php b/theme/canvas/layout/frontpage.php index a8b573d1f0a..3c3b0f66d9c 100644 --- a/theme/canvas/layout/frontpage.php +++ b/theme/canvas/layout/frontpage.php @@ -1,19 +1,24 @@ 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); + +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $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'; } +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -30,20 +35,24 @@ echo $OUTPUT->doctype() ?> -
+
- + + + +
+
@@ -51,57 +60,57 @@ echo $OUTPUT->doctype() ?> -
-
-
-
+
+
+
+
-
-
-
- main_content() ?> -
-
-
+
+
+
+ main_content() ?> +
+
+
- -
-
- blocks_for_region('side-pre') ?> -
-
- + +
+
+ blocks_for_region('side-pre') ?> +
+
+ - -
-
- blocks_for_region('side-post') ?> -
-
- + +
+
+ blocks_for_region('side-post') ?> +
+
+ -
-
-
-
+
+
+
+
- -
+
diff --git a/theme/canvas/layout/general.php b/theme/canvas/layout/general.php index cda6005acd4..09261f02e69 100644 --- a/theme/canvas/layout/general.php +++ b/theme/canvas/layout/general.php @@ -3,17 +3,27 @@ $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); +$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); +$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT)); +$haslogininfo = (empty($PAGE->layout_options['nologininfo'])); + +$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); +$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT)); + +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $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'; } +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -49,6 +59,10 @@ echo $OUTPUT->doctype() ?> + +
+ + -
+
blocks_for_region('side-pre') ?>
@@ -84,7 +98,7 @@ echo $OUTPUT->doctype() ?> -
+
blocks_for_region('side-post') ?>
diff --git a/theme/canvas/layout/report.php b/theme/canvas/layout/report.php index fce6e89e427..9141174123d 100644 --- a/theme/canvas/layout/report.php +++ b/theme/canvas/layout/report.php @@ -3,17 +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); +$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); +$haslogininfo = (empty($PAGE->layout_options['nologininfo'])); + +$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); + +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $bodyclasses = array(); -if ($hassidepre && !$hassidepost) { +if ($showsidepre ) { $bodyclasses[] = 'side-pre-only'; -} else if ($hassidepost && !$hassidepre) { - $bodyclasses[] = 'side-post-only'; -} else if (!$hassidepost && !$hassidepre) { +} else { $bodyclasses[] = 'content-only'; } +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -49,6 +55,10 @@ echo $OUTPUT->doctype() ?>
+ +
+ +