From c8f9faba0cc89d41cec1b287935bb86915c6d94d Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 28 Nov 2012 16:40:19 +0800 Subject: [PATCH] MDL-36339 Modify themes to add course headers and footers provided by course format --- theme/formal_white/config.php | 10 +++++----- theme/formal_white/layout/general.php | 23 ++++++++++++++++++++++ theme/formal_white/layout/report.php | 24 +++++++++++++++++++++++ theme/formfactor/config.php | 10 +++++----- theme/formfactor/layout/general.php | 20 +++++++++++++++++++ theme/formfactor/style/core.css | 3 +++ theme/fusion/config.php | 10 +++++----- theme/fusion/layout/general.php | 20 +++++++++++++++++++ theme/fusion/style/core.css | 4 ++++ theme/leatherbound/config.php | 10 +++++----- theme/leatherbound/layout/general.php | 28 ++++++++++++++++++++++----- theme/leatherbound/layout/report.php | 28 ++++++++++++++++++++++----- theme/magazine/config.php | 10 +++++----- theme/magazine/layout/general.php | 22 +++++++++++++++++++-- theme/magazine/style/core.css | 14 ++++++++++++++ theme/mymobile/config.php | 12 ++++++------ theme/mymobile/layout/general.php | 19 ++++++++++++++++++ theme/nimble/config.php | 10 +++++----- theme/nimble/layout/general.php | 21 +++++++++++++++++++- theme/nonzero/config.php | 10 +++++----- theme/nonzero/layout/general.php | 24 +++++++++++++++++++++-- theme/overlay/config.php | 8 ++++---- theme/overlay/layout/general.php | 20 ++++++++++++++++++- theme/overlay/style/pagelayout.css | 3 +++ theme/sky_high/config.php | 12 ++++++------ theme/sky_high/layout/general.php | 18 +++++++++++++++++ theme/sky_high/layout/report.php | 18 +++++++++++++++++ theme/splash/config.php | 12 ++++++------ theme/splash/layout/general.php | 18 +++++++++++++++++ theme/splash/layout/report.php | 18 +++++++++++++++++ theme/standardold/config.php | 10 +++++----- theme/standardold/layout/general.php | 18 +++++++++++++++++ 32 files changed, 409 insertions(+), 78 deletions(-) diff --git a/theme/formal_white/config.php b/theme/formal_white/config.php index f537c482087..e6ea9211faa 100644 --- a/theme/formal_white/config.php +++ b/theme/formal_white/config.php @@ -145,19 +145,19 @@ $THEME->layouts = array( 'popup' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), // No blocks and minimal footer - used for legacy frame layouts only! 'frametop' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true), + 'options' => array('nofooter'=>true, 'nocoursefooter'=>true), ), // Embeded pages, like iframe embeded in moodleform (chat) 'embedded' => array( 'file' => 'embedded.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true), ), // Used during upgrade and install, and for the 'This site is undergoing maintenance' message. // This must not have any blocks, and it is good idea if it does not have links to @@ -165,13 +165,13 @@ $THEME->layouts = array( 'maintenance' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), // Should display the content and basic headers only. 'print' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), 'report' => array( 'file' => 'report.php', diff --git a/theme/formal_white/layout/general.php b/theme/formal_white/layout/general.php index 1024307d936..b7fbcfe31fc 100644 --- a/theme/formal_white/layout/general.php +++ b/theme/formal_white/layout/general.php @@ -15,6 +15,16 @@ $showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-p $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); if ($showsidepre && !$showsidepost) { $bodyclasses[] = 'side-pre-only'; @@ -91,6 +101,12 @@ echo $OUTPUT->doctype() ?> + + +
+ + +
@@ -115,7 +131,9 @@ echo $OUTPUT->doctype() ?>
+ main_content() ?> +
@@ -146,6 +164,11 @@ echo $OUTPUT->doctype() ?> + + + + +
diff --git a/theme/formal_white/layout/report.php b/theme/formal_white/layout/report.php index 05551e94978..04c2cff3aa9 100644 --- a/theme/formal_white/layout/report.php +++ b/theme/formal_white/layout/report.php @@ -14,6 +14,16 @@ $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pr $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); if (!$showsidepre) { $bodyclasses[] = 'content-only'; @@ -86,6 +96,12 @@ echo $OUTPUT->doctype() ?> + + +
+ + +
@@ -107,7 +123,9 @@ echo $OUTPUT->doctype() ?>
+ main_content() ?> +
@@ -127,6 +145,12 @@ echo $OUTPUT->doctype() ?> + + + + + +
diff --git a/theme/formfactor/config.php b/theme/formfactor/config.php index ddc32e8c6d2..0ec27f93187 100644 --- a/theme/formfactor/config.php +++ b/theme/formfactor/config.php @@ -127,28 +127,28 @@ $THEME->layouts = array( 'popup' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), 'frametop' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true), + 'options' => array('nofooter'=>true, 'nocoursefooter'=>true), ), 'maintenance' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), 'embedded' => array( 'file' => 'embedded.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), // Should display the content and basic headers only. 'print' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), ); diff --git a/theme/formfactor/layout/general.php b/theme/formfactor/layout/general.php index 7d4b5196354..a33ecd3b0b1 100644 --- a/theme/formfactor/layout/general.php +++ b/theme/formfactor/layout/general.php @@ -9,6 +9,16 @@ $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); if ($hassidepre && !$hassidepost) { $bodyclasses[] = 'side-pre-only'; @@ -61,6 +71,10 @@ echo $OUTPUT->doctype() ?> + +
+ + + + + + + main_content() ?> + @@ -130,6 +146,10 @@ echo $OUTPUT->doctype() ?> + + + + diff --git a/theme/fusion/style/core.css b/theme/fusion/style/core.css index 7e94997cb79..47bb5635ef1 100644 --- a/theme/fusion/style/core.css +++ b/theme/fusion/style/core.css @@ -189,6 +189,10 @@ h6{ padding: 2px 5px 0 0; } +#course-header, #course-footer { + margin:5px 20px 0 0; +} + /* Navbar ----------------------------*/ diff --git a/theme/leatherbound/config.php b/theme/leatherbound/config.php index 992a3388c01..3e2d9d126ba 100644 --- a/theme/leatherbound/config.php +++ b/theme/leatherbound/config.php @@ -131,29 +131,29 @@ $THEME->layouts = array( 'popup' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), 'frametop' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true), + 'options' => array('nofooter'=>true, 'nocoursefooter'=>true), ), 'maintenance' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), 'embedded' => array( 'theme' => 'canvas', 'file' => 'embedded.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), // Should display the content and basic headers only. 'print' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), 'report' => array( 'file' => 'report.php', diff --git a/theme/leatherbound/layout/general.php b/theme/leatherbound/layout/general.php index c0f4daad085..1d259d0d579 100644 --- a/theme/leatherbound/layout/general.php +++ b/theme/leatherbound/layout/general.php @@ -8,6 +8,16 @@ $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); if ($hassidepre && !$hassidepost) { $bodyclasses[] = 'side-pre-only'; @@ -32,10 +42,9 @@ echo $OUTPUT->doctype() ?> standard_top_of_body_html() ?>
- + + -
+
+ + + +
@@ -61,7 +74,6 @@ echo $OUTPUT->doctype() ?>
-
@@ -71,7 +83,9 @@ echo $OUTPUT->doctype() ?>
+ main_content() ?> +
@@ -97,6 +111,10 @@ echo $OUTPUT->doctype() ?>
+ + + + + +
+ + @@ -119,8 +133,9 @@ echo $OUTPUT->doctype() ?>
- - main_content() ?> + + main_content() ?> +
@@ -159,6 +174,9 @@ echo $OUTPUT->doctype() ?> + + + @@ -141,6 +156,10 @@ echo $OUTPUT->doctype() ?> + + + + + + + diff --git a/theme/sky_high/layout/report.php b/theme/sky_high/layout/report.php index 68cc55b10cc..562c76c9b2c 100644 --- a/theme/sky_high/layout/report.php +++ b/theme/sky_high/layout/report.php @@ -8,6 +8,16 @@ $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pr $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); if ($showsidepre) { $bodyclasses[] = 'side-pre-only'; @@ -71,6 +81,9 @@ echo $OUTPUT->doctype() ?>
+ +
+ + + + diff --git a/theme/splash/config.php b/theme/splash/config.php index c428ce5a167..3dea47d296a 100644 --- a/theme/splash/config.php +++ b/theme/splash/config.php @@ -109,19 +109,19 @@ $THEME->layouts = array( 'popup' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), // No blocks and minimal footer - used for legacy frame layouts only! 'frametop' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter', 'noblocks'=>true), + 'options' => array('nofooter', 'noblocks'=>true, 'nocoursefooter'=>true), ), // Embeded pages, like iframe embeded in moodleform 'embedded' => array( 'file' => 'embedded.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true), ), // Used during upgrade and install, and for the 'This site is undergoing maintenance' message. // This must not have any blocks, and it is good idea if it does not have links to @@ -129,19 +129,19 @@ $THEME->layouts = array( 'maintenance' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), // Should display the content and basic headers only. 'print' => array( 'file' => 'general.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true), ), // The pagelayout used when a redirection is occuring. 'redirect' => array( 'file' => 'embedded.php', 'regions' => array(), - 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true), + 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true), ), 'report' => array( 'file' => 'report.php', diff --git a/theme/splash/layout/general.php b/theme/splash/layout/general.php index 3def7ed9012..29f9ea778d5 100644 --- a/theme/splash/layout/general.php +++ b/theme/splash/layout/general.php @@ -34,6 +34,16 @@ $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custom splash_check_colourswitch(); splash_initialise_colourswitcher($PAGE); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); $bodyclasses[] = 'splash-'.splash_get_colour(); if ($hassidepre && !$hassidepost) { @@ -148,6 +158,9 @@ echo $OUTPUT->doctype() ?> + +
+ diff --git a/theme/splash/layout/report.php b/theme/splash/layout/report.php index 10d73901f02..2c8b0eab69f 100644 --- a/theme/splash/layout/report.php +++ b/theme/splash/layout/report.php @@ -34,6 +34,16 @@ $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custom splash_check_colourswitch(); splash_initialise_colourswitcher($PAGE); +$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; +if (empty($PAGE->layout_options['nocourseheaderfooter'])) { + $courseheader = $OUTPUT->course_header(); + $coursecontentheader = $OUTPUT->course_content_header(); + if (empty($PAGE->layout_options['nocoursefooter'])) { + $coursecontentfooter = $OUTPUT->course_content_footer(); + $coursefooter = $OUTPUT->course_footer(); + } +} + $bodyclasses = array(); $bodyclasses[] = 'splash-'.splash_get_colour(); if ($hassidepre && !$hassidepost) { @@ -148,6 +158,9 @@ echo $OUTPUT->doctype() ?> + +
+