From 61cf49aff2620be935758eb13bb96c16c102eaeb Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Sat, 1 May 2010 07:10:22 +0000 Subject: [PATCH] theme-anomarly MDL-20175 Upgraded after recent theme changes --- theme/anomaly/config.php | 2 +- theme/anomaly/layout/general.php | 86 +++++++++++++++--------------- theme/anomaly/style/navigation.css | 65 ---------------------- 3 files changed, 44 insertions(+), 109 deletions(-) delete mode 100644 theme/anomaly/style/navigation.css diff --git a/theme/anomaly/config.php b/theme/anomaly/config.php index 497b7cfb238..33f22506f01 100644 --- a/theme/anomaly/config.php +++ b/theme/anomaly/config.php @@ -7,7 +7,7 @@ $THEME->name = 'anomaly'; -$THEME->sheets = array('base', 'general', 'layout', 'browser','navigation'); +$THEME->sheets = array('base', 'general', 'layout', 'browser'); /// This variable is an array containing the names of all the /// stylesheet files you want included in this theme, and in what order //////////////////////////////////////////////////////////////////////////////// diff --git a/theme/anomaly/layout/general.php b/theme/anomaly/layout/general.php index 8d6ad58b024..eb893fbe7c3 100644 --- a/theme/anomaly/layout/general.php +++ b/theme/anomaly/layout/general.php @@ -1,24 +1,19 @@ sidepre = theme_enable_block_region('side-pre'); -$properties->sidepost = theme_enable_block_region('side-post'); -$properties->hasnavbar = false; + +$hasheading = ($PAGE->heading); +$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); +$hasfooter = (empty($PAGE->layout_options['nofooter'])); +$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)); $bodyclasses = array(); - -if ($properties->sidepre && !$properties->sidepost) { +if ($hassidepre && !$hassidepost) { $bodyclasses[] = 'side-pre-only'; -} else if ($properties->sidepost && !$properties->sidepre) { +} else if ($hassidepost && !$hassidepre) { $bodyclasses[] = 'side-post-only'; -} - -if (!$properties->sidepost && !$properties->sidepre) { +} else if (!$hassidepost && !$hassidepre) { $bodyclasses[] = 'content-only'; } -if (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) { - $bodyclasses[] = 'hasnavbar'; - $properties->hasnavbar = true; -} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -27,12 +22,13 @@ echo $OUTPUT->doctype() ?> standard_head_html() ?> - -standard_top_of_body_html(); ?> + +standard_top_of_body_html() ?> +
+ + +
+ + +
-
-
-
-
+
+
+ +
+
- -
+ +
-
sidepre) { - echo $OUTPUT->blocks_for_region('side-pre'); - } ?> +
+ blocks_for_region('side-pre') ?>
+ + +
-
sidepost) { - echo $OUTPUT->blocks_for_region('side-post'); - } ?> +
+ blocks_for_region('side-post') ?>
+
- layout_options['nofooter'])) { ?> -