MDL-31189 whitespace fixes
[moodle.git] / theme / sky_high / layout / general.php
1 <?php
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());
6 $hasfooter = (empty($PAGE->layout_options['nofooter']));
7 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
8 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
10 $custommenu = $OUTPUT->custom_menu();
11 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
13 $bodyclasses = array();
14 if ($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 }
21 if ($hassidepre || $hassidepost) {
22     $bodyclasses[] = 'background';
23 }
25 if (!empty($PAGE->theme->settings->logo)) {
26     $logourl = $PAGE->theme->settings->logo;
27 } else {
28     $logourl = NULL;
29 }
31 if (!empty($PAGE->theme->settings->footnote)) {
32     $footnote = $PAGE->theme->settings->footnote;
33 } else {
34     $footnote = '<!-- There was no custom footnote set -->';
35 }
37 echo $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')?>" />
42     <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
43     <?php echo $OUTPUT->standard_head_html() ?>
44 </head>
45 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
46 <?php echo $OUTPUT->standard_top_of_body_html() ?>
48 <div id="page">
49     <div id="wrapper" class="clearfix">
51 <!-- START OF HEADER -->
53     <div id="page-header" class="clearfix">
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 } ?>
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>
73     </div>
75 <!-- END OF HEADER -->
77 <!-- START OF CONTENT -->
78 <?php if ($hascustommenu) { ?>
79       <div id="custommenu"><?php echo $custommenu; ?></div>
80 <?php } ?>
81 <div class="navbar clearfix">
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>
88 <div id="page-content-wrapper">
89     <div id="page-content">
90         <div id="region-main-box">
91             <div id="region-post-box">
93                 <div id="region-main-wrap">
94                     <div id="region-main">
95                         <div class="region-content">
96                             <?php echo $OUTPUT->main_content() ?>
97                         </div>
98                     </div>
99                 </div>
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 } ?>
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 } ?>
117             </div>
118         </div>
119     </div>
120 </div>
122 <!-- END OF CONTENT -->
124 </div>
126 <!-- END OF WRAPPER -->
128 <!-- START OF FOOTER -->
129     <?php if ($hasfooter) { ?>
130     <div id="page-footer">
132 <!-- START OF FOOTER-INNER -->
134         <div id="page-footer-inner">
135             <div class="footnote"><?php echo $footnote; ?></div>
136             <?php
137             echo $OUTPUT->login_info();
138             ?>
139         </div>
141 <!-- END OF FOOTER-INNER -->
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(); ?>
148 </div>
149 <?php } ?>
151 <!-- END OF FOOTER -->
153 </div>
155 <!-- END OF PAGE -->
156 <?php echo $OUTPUT->standard_end_of_body_html() ?>
157 </body>
158 </html>