moodle/theme/boxxie/layout/general.php

152 lines
4.6 KiB
PHP
Raw Normal View History

2010-04-11 18:48:33 +00:00
<?php
$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);
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'side-pre-only';
} else if ($hassidepost && !$hassidepre) {
$bodyclasses[] = 'side-post-only';
} else if (!$hassidepost && !$hassidepre) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$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();
}
}
2010-04-11 18:48:33 +00:00
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
2010-04-12 01:23:55 +00:00
<title><?php echo $PAGE->title; ?></title>
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
2010-04-11 18:48:33 +00:00
</head>
2011-03-27 12:29:36 +02:00
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
2010-04-12 01:23:55 +00:00
2010-04-11 18:48:33 +00:00
<?php echo $OUTPUT->standard_top_of_body_html() ?>
2010-04-12 01:23:55 +00:00
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
2010-04-12 01:23:55 +00:00
<div id="page-wrapper">
<div id="page" class="clearfix">
2011-03-27 12:29:36 +02:00
2010-04-20 03:03:08 +00:00
<div id="page-header" class="clearfix">
2010-04-12 01:23:55 +00:00
<?php if ($PAGE->heading) { ?>
2010-04-11 18:48:33 +00:00
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu">
<?php echo $OUTPUT->login_info();
2010-04-12 01:23:55 +00:00
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu; ?>
</div>
<?php } ?>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
</div>
2010-09-09 13:32:11 +00:00
<div class="myclear"></div>
2011-03-27 12:29:36 +02:00
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
2010-04-12 01:23:55 +00:00
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
2011-03-27 12:29:36 +02:00
2010-04-11 18:48:33 +00:00
<?php } ?>
2011-03-27 12:29:36 +02:00
2010-04-11 18:48:33 +00:00
<div id="page-content">
<div id="region-main-box">
<div id="region-post-box">
2011-03-27 12:29:36 +02:00
<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>
2011-03-27 12:29:36 +02:00
<?php if ($hassidepre) { ?>
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
</div>
<?php } ?>
2011-03-27 12:29:36 +02:00
<?php if ($hassidepost) { ?>
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>
</div>
<?php } ?>
2011-03-27 12:29:36 +02:00
2010-04-12 01:23:55 +00:00
</div>
2010-04-11 18:48:33 +00:00
</div>
</div>
2011-03-27 12:29:36 +02:00
2010-09-09 13:32:11 +00:00
<div class="myclear"></div>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
2010-04-12 01:23:55 +00:00
<?php if ($hasfooter) { ?>
2011-03-27 12:29:36 +02:00
2010-04-11 18:48:33 +00:00
<div id="page-footer" class="clearfix">
2010-04-12 01:23:55 +00:00
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
2010-04-19 03:50:06 +00:00
<?php echo $OUTPUT->login_info(); ?>
2010-04-11 18:48:33 +00:00
</div>
2010-04-12 01:23:55 +00:00
<?php }
if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
2010-09-09 13:32:11 +00:00
<div class="myclear"></div>
2010-04-12 01:23:55 +00:00
</div> <!-- END #page -->
2011-03-27 12:29:36 +02:00
2010-04-12 01:23:55 +00:00
</div> <!-- END #page-wrapper -->
<?php } ?>
2010-04-19 03:50:06 +00:00
2010-04-25 23:38:19 +00:00
<div id="page-footer-bottom">
2010-04-19 03:50:06 +00:00
<?php if ($hasfooter) {
echo $OUTPUT->home_link();
echo $OUTPUT->standard_footer_html();
2011-03-27 12:29:36 +02:00
2010-04-19 03:50:06 +00:00
} ?>
2010-04-25 23:38:19 +00:00
2011-03-27 12:29:36 +02:00
</div>
2010-04-12 01:23:55 +00:00
2010-04-11 18:48:33 +00:00
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>