d462c17d16ddcfd7f113a8997703c811a4e57e68
[moodle.git] / theme / afterburner / layout / default.php
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 = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
7 $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
8 $haslogininfo = (empty($PAGE->layout_options['nologininfo']));
10 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
11 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
13 $custommenu = $OUTPUT->custom_menu();
14 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
16 $hasfootnote = (!empty($PAGE->theme->settings->footnote));
18 $bodyclasses = array();
19 if ($showsidepre && !$showsidepost) {
20     $bodyclasses[] = 'side-pre-only';
21 } else if ($showsidepost && !$showsidepre) {
22     $bodyclasses[] = 'side-post-only';
23 } else if (!$showsidepost && !$showsidepre) {
24     $bodyclasses[] = 'content-only';
25 }
26 if ($hascustommenu) {
27     $bodyclasses[] = 'has_custom_menu';
28 }
30 echo $OUTPUT->doctype() ?>
31 <html <?php echo $OUTPUT->htmlattributes() ?>>
32 <head>
33     <title><?php echo $PAGE->title ?></title>
34     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
35     <?php echo $OUTPUT->standard_head_html() ?>
36 </head>
38 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
39 <?php echo $OUTPUT->standard_top_of_body_html() ?>
40 <div id="page-wrapper">
41   <div id="page">
42    <?php if ($hasheading || $hasnavbar) { ?>
43     <div id="page-header">
44         <?php if ($hasheading) { ?>
45          <div id="logo">
46          </div>
47          <div class="headermenu"><?php
48             if ($haslogininfo) {
49                 echo $OUTPUT->login_info();
50             }
51             if (!empty($PAGE->layout_options['langmenu'])) {
52                 echo $OUTPUT->lang_menu();
53             }
54             echo $PAGE->headingmenu
55             ?></div>
56         <?php } ?>
57     </div>
58 <?php } ?>
59 <!-- END OF HEADER -->
60 <!-- START CUSTOMMENU AND NAVBAR -->
61     <div id="navcontainer">
62         <?php if ($hascustommenu) { ?>
63                 <div id="custommenu" class="javascript-disabled"><?php echo $custommenu; ?></div>
64         <?php } ?>
66     </div>
68         <?php if ($hasnavbar) { ?>
69             <div class="navbar clearfix">
70                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
71                 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
72             </div>
73         <?php } ?>
75 <!-- END OF CUSTOMMENU AND NAVBAR -->
76     <div id="page-content">
77        <div id="region-main-box">
78            <div id="region-post-box">
79               <div id="region-main-wrap">
80                  <div id="region-main-pad">
81                    <div id="region-main">
82                      <div class="region-content">
83                             <?php echo $OUTPUT->main_content() ?>
84                      </div>
85                    </div>
86                  </div>
87                </div>
89                 <?php if ($hassidepre) { ?>
90                 <div id="region-pre" class="block-region">
91                    <div class="region-content">
92                         <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
93                    </div>
94                 </div>
95                 <?php } ?>
97                 <?php if ($hassidepost) { ?>
98                 <div id="region-post" class="block-region">
99                    <div class="region-content">
100                         <?php echo $OUTPUT->blocks_for_region('side-post') ?>
101                    </div>
102                 </div>
103                 <?php } ?>
104             </div>
105         </div>
106     </div>
108     <!-- START OF FOOTER -->
109     <?php if ($hasfooter) { ?>
110     <div id="page-footer" class="clearfix">
112         <div class="footer-left">
114                         <?php if ($hasfootnote) { ?>
115                                 <div id="footnote"><?php echo $PAGE->theme->settings->footnote;?></div>
116                         <?php } ?>
118             <a href="http://moodle.org" title="Moodle">
119                 <img src="<?php echo $OUTPUT->pix_url('footer/moodle-logo','theme')?>" alt="Moodle logo" />
120             </a>
121         </div>
123         <div class="footer-right">
124             <?php echo $OUTPUT->login_info();?>
125         </div>
127         <?php echo $OUTPUT->standard_footer_html(); ?>
128     </div>
129     <?php } ?>
130     <div class="clearfix"></div>
131 </div>
132 </div>
133 <?php echo $OUTPUT->standard_end_of_body_html() ?>
134 </body>
135 </html>