From b00982db34e06a942dfcb076b8bcc31f56677238 Mon Sep 17 00:00:00 2001 From: stabijoh Date: Wed, 27 Apr 2011 08:38:15 -0400 Subject: [PATCH] MDL-23188 Implement custom menu where possible in core themes, serenity and anomaly --- theme/anomaly/layout/general.php | 11 ++++- theme/anomaly/layout/report.php | 11 ++++- theme/anomaly/style/general.css | 65 +++++++++++++++++++++++++ theme/serenity/layout/frontpage.php | 9 +++- theme/serenity/layout/general.php | 10 +++- theme/serenity/style/core.css | 75 ++++++++++++++++++++++++++++- 6 files changed, 176 insertions(+), 5 deletions(-) diff --git a/theme/anomaly/layout/general.php b/theme/anomaly/layout/general.php index 9048711009b..7c5fa8c6c08 100644 --- a/theme/anomaly/layout/general.php +++ b/theme/anomaly/layout/general.php @@ -7,7 +7,8 @@ $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 ($showsidepre && !$showsidepost) { @@ -17,6 +18,9 @@ if ($showsidepre && !$showsidepost) { } else if (!$showsidepost && !$showsidepre) { $bodyclasses[] = 'content-only'; } +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -42,6 +46,11 @@ echo $OUTPUT->doctype() ?> } echo $PAGE->headingmenu ?> + + +
+ + + + +
+ + - + +
+ diff --git a/theme/serenity/layout/general.php b/theme/serenity/layout/general.php index 367f4d95b2c..11f205f4dee 100644 --- a/theme/serenity/layout/general.php +++ b/theme/serenity/layout/general.php @@ -8,6 +8,8 @@ $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)); +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $bodyclasses = array(); if ($showsidepre && !$showsidepost) { @@ -17,7 +19,9 @@ if ($showsidepre && !$showsidepost) { } else if (!$showsidepost && !$showsidepre) { $bodyclasses[] = 'content-only'; } - +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -48,6 +52,10 @@ echo $OUTPUT->doctype() ?> + + +
+