MDL-31189 whitespace fixes
[moodle.git] / theme / sky_high / layout / general.php
CommitLineData
dc38e364
S
1<?php
2
3$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
4$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
5$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
739efc85 6$hasfooter = (empty($PAGE->layout_options['nofooter']));
dc38e364
S
7$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
8$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
9
10$custommenu = $OUTPUT->custom_menu();
11$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
12
13$bodyclasses = array();
14if ($showsidepre && !$showsidepost) {
15 $bodyclasses[] = 'side-pre-only';
16} else if ($showsidepost && !$showsidepre) {
17 $bodyclasses[] = 'side-post-only';
18} else if (!$showsidepost && !$showsidepre) {
19 $bodyclasses[] = 'content-only';
20}
21if ($hassidepre || $hassidepost) {
df31835a 22 $bodyclasses[] = 'background';
dc38e364
S
23}
24
25if (!empty($PAGE->theme->settings->logo)) {
26 $logourl = $PAGE->theme->settings->logo;
27} else {
28 $logourl = NULL;
29}
30
31if (!empty($PAGE->theme->settings->footnote)) {
32 $footnote = $PAGE->theme->settings->footnote;
33} else {
34 $footnote = '<!-- There was no custom footnote set -->';
35}
36
37echo $OUTPUT->doctype() ?>
38<html <?php echo $OUTPUT->htmlattributes() ?>>
39<head>
40 <title><?php echo $PAGE->title ?></title>
41 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
0ae36f66 42 <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
dc38e364
S
43 <?php echo $OUTPUT->standard_head_html() ?>
44</head>
0ae36f66 45<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
dc38e364
S
46<?php echo $OUTPUT->standard_top_of_body_html() ?>
47
48<div id="page">
df31835a 49 <div id="wrapper" class="clearfix">
0ae36f66 50
dc38e364 51<!-- START OF HEADER -->
0ae36f66 52
dc38e364 53 <div id="page-header" class="clearfix">
df31835a
EL
54 <div id="page-header-wrapper">
55 <?php if($logourl == NULL) { ?>
56 <h1 class="headermain">
57 <?php echo $PAGE->heading ?>
58 </h1>
59 <?php } else { ?>
60 <img class="logo" src="<?php echo $logourl;?>" alt="Custom logo here" /><h1 class="headerwlogo">- <?php echo $PAGE->heading ?></h1>
61 <?php } ?>
62
63 <div class="headermenu">
64 <?php
65 echo $OUTPUT->login_info();
66 if (!empty($PAGE->layout_options['langmenu'])) {
67 echo $OUTPUT->lang_menu();
68 }
69 echo $PAGE->headingmenu
70 ?>
71 </div>
72 </div>
dc38e364 73 </div>
0ae36f66 74
dc38e364
S
75<!-- END OF HEADER -->
76
77<!-- START OF CONTENT -->
78<?php if ($hascustommenu) { ?>
79 <div id="custommenu"><?php echo $custommenu; ?></div>
80<?php } ?>
81<div class="navbar clearfix">
df31835a
EL
82 <?php if ($hasnavbar) { ?>
83 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
84 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
85 <?php } ?>
86</div>
0ae36f66 87
dc38e364
S
88<div id="page-content-wrapper">
89 <div id="page-content">
90 <div id="region-main-box">
91 <div id="region-post-box">
0ae36f66 92
dc38e364
S
93 <div id="region-main-wrap">
94 <div id="region-main">
95 <div class="region-content">
3b3f3028 96 <?php echo $OUTPUT->main_content() ?>
dc38e364
S
97 </div>
98 </div>
99 </div>
0ae36f66 100
dc38e364
S
101 <?php if ($hassidepre) { ?>
102 <div id="region-pre" class="block-region">
103 <div class="region-content">
104 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
105 </div>
106 </div>
107 <?php } ?>
0ae36f66 108
dc38e364
S
109 <?php if ($hassidepost) { ?>
110 <div id="region-post" class="block-region">
111 <div class="region-content">
112 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
113 </div>
114 </div>
115 <?php } ?>
0ae36f66 116
dc38e364
S
117 </div>
118 </div>
119 </div>
120</div>
121
122<!-- END OF CONTENT -->
123
739efc85 124</div>
0ae36f66 125
739efc85 126<!-- END OF WRAPPER -->
dc38e364
S
127
128<!-- START OF FOOTER -->
df31835a
EL
129 <?php if ($hasfooter) { ?>
130 <div id="page-footer">
dc38e364 131
739efc85
ME
132<!-- START OF FOOTER-INNER -->
133
df31835a
EL
134 <div id="page-footer-inner">
135 <div class="footnote"><?php echo $footnote; ?></div>
136 <?php
137 echo $OUTPUT->login_info();
138 ?>
139 </div>
739efc85
ME
140
141<!-- END OF FOOTER-INNER -->
142
df31835a
EL
143 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')); ?></p>
144 <?php echo $OUTPUT->home_link(); ?>
145 <?php echo $OUTPUT->standard_footer_html(); ?>
739efc85
ME
146
147
df31835a
EL
148</div>
149<?php } ?>
dc38e364
S
150
151<!-- END OF FOOTER -->
739efc85 152
dc38e364 153</div>
739efc85
ME
154
155<!-- END OF PAGE -->
156<?php echo $OUTPUT->standard_end_of_body_html() ?>
dc38e364
S
157</body>
158</html>