MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files...
[moodle.git] / theme / formfactor / layout / general.php
CommitLineData
1c601a53
PM
1<?php
2
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);
8
2bf93a3c
SH
9$custommenu = $OUTPUT->custom_menu();
10$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
11
1c601a53
PM
12$bodyclasses = array();
13if ($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';
19}
20
21echo $OUTPUT->doctype() ?>
22<html <?php echo $OUTPUT->htmlattributes() ?>>
23<head>
24 <title><?php echo $PAGE->title ?></title>
25 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
26 <?php echo $OUTPUT->standard_head_html() ?>
27</head>
0ae36f66 28<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
1c601a53
PM
29<?php echo $OUTPUT->standard_top_of_body_html() ?>
30
31<div id="page">
a79db405 32
1c601a53 33<?php if ($hasheading || $hasnavbar) { ?>
a79db405
PM
34
35 <div id="page-header" class="clearfix">
d80a7da7
ME
36 <div id="page-header-wrapper">
37
38 <?php if ($hasheading) { ?>
39 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
40 <div class="headermenu">
41 <?php
42 echo $OUTPUT->login_info();
43 if (!empty($PAGE->layout_options['langmenu'])) {
44 echo $OUTPUT->lang_menu();
45 }
46 echo $PAGE->headingmenu
47 ?>
48 </div>
49 <?php } ?>
50
51 </div>
1c601a53 52 </div>
a79db405 53
0ae36f66 54 <?php if ($hasheading) { ?>
43d65a95
PM
55 <?php if ($hascustommenu) { ?>
56 <div id="custommenu"><?php echo $custommenu; ?></div>
57 <?php } else { ?>
58 <ul id="page-navigation" class="clearfix">
59 <li>&nbsp;</li>
60 </ul>
61 <?php } ?>
d80a7da7 62 <?php } ?>
0ae36f66 63
a79db405 64 <?php if ($hasnavbar) { ?>
d80a7da7
ME
65 <div class="navbar clearfix">
66 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
a79db405
PM
67 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
68 </div>
69 <?php } ?>
0ae36f66 70
1c601a53
PM
71<?php } ?>
72<!-- END OF HEADER -->
73
a79db405 74<div id="page-content-wrapper">
1c601a53
PM
75 <div id="page-content">
76 <div id="region-main-box">
77 <div id="region-post-box">
0ae36f66 78
1c601a53
PM
79 <div id="region-main-wrap">
80 <div id="region-main">
81 <div class="region-content">
3b3f3028 82 <?php echo $OUTPUT->main_content() ?>
1c601a53
PM
83 </div>
84 </div>
85 </div>
0ae36f66 86
1c601a53 87 <?php if ($hassidepre) { ?>
d80a7da7 88 <div id="region-pre" class="block-region">
1c601a53
PM
89 <div class="region-content">
90 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
91 </div>
92 </div>
93 <?php } ?>
0ae36f66 94
1c601a53 95 <?php if ($hassidepost) { ?>
d80a7da7 96 <div id="region-post" class="block-region">
1c601a53
PM
97 <div class="region-content">
98 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
99 </div>
100 </div>
101 <?php } ?>
0ae36f66 102
1c601a53
PM
103 </div>
104 </div>
105 </div>
a79db405 106</div>
1c601a53
PM
107
108<!-- START OF FOOTER -->
109 <?php if ($hasfooter) { ?>
110 <div id="page-footer" class="clearfix">
111 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
112 <?php
113 echo $OUTPUT->login_info();
114 echo $OUTPUT->home_link();
115 echo $OUTPUT->standard_footer_html();
116 ?>
117 </div>
118 <?php } ?>
119</div>
120<?php echo $OUTPUT->standard_end_of_body_html() ?>
121</body>
c54c8b35 122</html>