Skip to content

Commit

Permalink
MDL-36339 Modify themes to add course headers and footers provided by…
Browse files Browse the repository at this point in the history
… course format
  • Loading branch information
marinaglancy authored and stronk7 committed Dec 18, 2012
1 parent cf04387 commit 656581f
Show file tree
Hide file tree
Showing 32 changed files with 409 additions and 78 deletions.
10 changes: 5 additions & 5 deletions theme/formal_white/config.php
Expand Up @@ -145,33 +145,33 @@
'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
// other places - for example there should not be a home link in the footer...
'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',
Expand Down
23 changes: 23 additions & 0 deletions theme/formal_white/layout/general.php
Expand Up @@ -15,6 +15,16 @@
$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';
Expand Down Expand Up @@ -91,6 +101,12 @@
<?php } ?>
<!-- end of page-header -->

<!-- begin of course header -->
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<!-- end of course header -->

<!-- begin of custom menu -->
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
Expand All @@ -115,7 +131,9 @@
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
Expand Down Expand Up @@ -146,6 +164,11 @@
</div>
<!-- end of moodle content -->

<!-- begin of course footer -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<!-- end of course footer -->
<div class="clearfix"></div>

<?php if ($hasframe) { ?>
Expand Down
24 changes: 24 additions & 0 deletions theme/formal_white/layout/report.php
Expand Up @@ -14,6 +14,16 @@
$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';
Expand Down Expand Up @@ -86,6 +96,12 @@
<?php } ?>
<!-- end of page-header -->

<!-- begin of course header -->
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<!-- end of course header -->

<!-- begin of custom menu -->
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
Expand All @@ -107,7 +123,9 @@
<!-- main mandatory content of the moodle page -->
<div id="report-main-content">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
<!-- end of main mandatory content of the moodle page -->
Expand All @@ -127,6 +145,12 @@
</div>
<!-- end of moodle content -->

<!-- begin of course footer -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<!-- end of course footer -->

<div class="clearfix"></div>

<?php if ($hasframe) { ?>
Expand Down
10 changes: 5 additions & 5 deletions theme/formfactor/config.php
Expand Up @@ -127,28 +127,28 @@
'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),
),

);
Expand Down
20 changes: 20 additions & 0 deletions theme/formfactor/layout/general.php
Expand Up @@ -9,6 +9,16 @@
$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';
Expand Down Expand Up @@ -61,6 +71,10 @@
<?php } ?>
<?php } ?>

<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>

<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
Expand All @@ -79,7 +93,9 @@
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
Expand All @@ -105,6 +121,10 @@
</div>
</div>

<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>

<!-- START OF FOOTER -->
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
Expand Down
3 changes: 3 additions & 0 deletions theme/formfactor/style/core.css
Expand Up @@ -11,6 +11,7 @@ body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { font-family: "Trebuchet MS",


#page-site-index .headermain { margin:0.85em 0;font-size:2.5em; }
#course-header { margin:0 50px; }

/* Menu Navigation
--------------------------*/
Expand Down Expand Up @@ -54,6 +55,8 @@ body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { font-family: "Trebuchet MS",
#page-footer { margin:25px 0; }
#page-footer .logininfo { margin: 1em 0; }

#course-footer { margin:0 50px; }

/* custum menu */
#custommenu {
margin:0 50px;
Expand Down
10 changes: 5 additions & 5 deletions theme/fusion/config.php
Expand Up @@ -143,29 +143,29 @@
'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' => 'general.php',
Expand Down
20 changes: 20 additions & 0 deletions theme/fusion/layout/general.php
Expand Up @@ -10,6 +10,16 @@
$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 ($showsidepost) {
$bodyclasses[] = 'side-post-only';
Expand Down Expand Up @@ -77,6 +87,10 @@

<?php } ?>

<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>


<!-- START OF CONTENT -->

Expand Down Expand Up @@ -106,7 +120,9 @@
</div>
<?php } ?>

<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
Expand All @@ -130,6 +146,10 @@

<!-- END OF CONTENT -->

<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>

<?php if ($hasheading || $hasnavbar) { ?>
</div>

Expand Down
4 changes: 4 additions & 0 deletions theme/fusion/style/core.css
Expand Up @@ -189,6 +189,10 @@ h6{
padding: 2px 5px 0 0;
}

#course-header, #course-footer {
margin:5px 20px 0 0;
}

/* Navbar
----------------------------*/

Expand Down
10 changes: 5 additions & 5 deletions theme/leatherbound/config.php
Expand Up @@ -131,29 +131,29 @@
'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',
Expand Down

0 comments on commit 656581f

Please sign in to comment.