Merge branch 'MDL-31729_22' of git://github.com/timhunt/moodle into MOODLE_22_STABLE
[moodle.git] / theme / boxxie / layout / general.php
blob7d6369473c4a63978fd089a95882f0f26e8f693b
1 <?php
3 $hasheading = ($PAGE->heading);
4 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
5 $hasfooter = (empty($PAGE->layout_options['nofooter']));
6 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
7 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
9 $custommenu = $OUTPUT->custom_menu();
10 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
12 $bodyclasses = array();
13 if ($hassidepre && !$hassidepost) {
14 $bodyclasses[] = 'side-pre-only';
15 } else if ($hassidepost && !$hassidepre) {
16 $bodyclasses[] = 'side-post-only';
17 } else if (!$hassidepost && !$hassidepre) {
18 $bodyclasses[] = 'content-only';
21 if ($hascustommenu) {
22 $bodyclasses[] = 'has-custom-menu';
25 echo $OUTPUT->doctype() ?>
26 <html <?php echo $OUTPUT->htmlattributes() ?>>
27 <head>
28 <title><?php echo $PAGE->title; ?></title>
29 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
30 <?php echo $OUTPUT->standard_head_html() ?>
31 </head>
33 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
35 <?php echo $OUTPUT->standard_top_of_body_html() ?>
37 <?php if ($hasheading || $hasnavbar) { ?>
39 <div id="page-wrapper">
40 <div id="page" class="clearfix">
42 <div id="page-header" class="clearfix">
43 <?php if ($PAGE->heading) { ?>
44 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
45 <div class="headermenu">
46 <?php echo $OUTPUT->login_info();
47 if (!empty($PAGE->layout_options['langmenu'])) {
48 echo $OUTPUT->lang_menu();
50 echo $PAGE->headingmenu; ?>
51 </div>
52 <?php } ?>
53 <?php if ($hascustommenu) { ?>
54 <div id="custommenu"><?php echo $custommenu; ?></div>
55 <?php } ?>
56 </div>
58 <div class="myclear"></div>
60 <?php if ($hasnavbar) { ?>
61 <div class="navbar clearfix">
62 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
63 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
64 </div>
65 <?php } ?>
67 <?php } ?>
69 <div id="page-content">
70 <div id="region-main-box">
71 <div id="region-post-box">
73 <div id="region-main-wrap">
74 <div id="region-main">
75 <div class="region-content">
76 <?php echo $OUTPUT->main_content() ?>
77 </div>
78 </div>
79 </div>
81 <?php if ($hassidepre) { ?>
82 <div id="region-pre">
83 <div class="region-content">
84 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
85 </div>
86 </div>
87 <?php } ?>
89 <?php if ($hassidepost) { ?>
90 <div id="region-post">
91 <div class="region-content">
92 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
93 </div>
94 </div>
95 <?php } ?>
97 </div>
98 </div>
99 </div>
101 <div class="myclear"></div>
102 <?php if ($hasfooter) { ?>
104 <div id="page-footer" class="clearfix">
105 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
106 <?php echo $OUTPUT->login_info(); ?>
107 </div>
109 <?php }
111 if ($hasheading || $hasnavbar) { ?>
112 <div class="myclear"></div>
113 </div> <!-- END #page -->
115 </div> <!-- END #page-wrapper -->
117 <?php } ?>
119 <div id="page-footer-bottom">
121 <?php if ($hasfooter) {
123 echo $OUTPUT->home_link();
124 echo $OUTPUT->standard_footer_html();
126 } ?>
128 </div>
131 <?php echo $OUTPUT->standard_end_of_body_html() ?>
132 </body>
133 </html>