f068b23ee89a23500aae272ca931ccfc67cddd48
[moodle.git] / theme / base / layout / frontpage.php
1 <?php
3 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
4 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
5 $showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
6 $showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT);
8 $custommenu = $OUTPUT->custom_menu();
9 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
11 $bodyclasses = array();
12 if ($showsidepre && !$showsidepost) {
13     $bodyclasses[] = 'side-pre-only';
14 } else if ($showsidepost && !$showsidepre) {
15     $bodyclasses[] = 'side-post-only';
16 } else if (!$showsidepost && !$showsidepre) {
17     $bodyclasses[] = 'content-only';
18 }
19 if ($hascustommenu) {
20     $bodyclasses[] = 'has_custom_menu';
21 }
23 echo $OUTPUT->doctype() ?>
24 <html <?php echo $OUTPUT->htmlattributes() ?>>
25 <head>
26     <title><?php echo $PAGE->title ?></title>
27     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
28     <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
29     <?php echo $OUTPUT->standard_head_html() ?>
30 </head>
31 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
32 <?php echo $OUTPUT->standard_top_of_body_html() ?>
34 <div id="page">
36     <div id="page-header" class="clearfix">
37         <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
38         <div class="headermenu"><?php
39             echo $OUTPUT->login_info();
40             echo $OUTPUT->lang_menu();
41             echo $PAGE->headingmenu;
42         ?></div>
43         <?php if ($hascustommenu) { ?>
44         <div id="custommenu"><?php echo $custommenu; ?></div>
45          <?php } ?>
46     </div>
47 <!-- END OF HEADER -->
49     <div id="page-content">
50         <div id="region-main-box">
51             <div id="region-post-box">
53                 <div id="region-main-wrap">
54                     <div id="region-main">
55                         <div class="region-content">
56                             <?php echo $OUTPUT->main_content() ?>
57                         </div>
58                     </div>
59                 </div>
61                 <?php if ($hassidepre) { ?>
62                 <div id="region-pre" class="block-region">
63                     <div class="region-content">
64                         <?php
65                             echo $OUTPUT->blocks_for_region('side-pre');
66                         ?>
67                     </div>
68                 </div>
69                 <?php } ?>
71                 <?php if ($hassidepost) { ?>
72                 <div id="region-post" class="block-region">
73                     <div class="region-content">
74                         <?php
75                             echo $OUTPUT->blocks_for_region('side-post');
76                         ?>
77                     </div>
78                 </div>
79                 <?php } ?>
81             </div>
82         </div>
83     </div>
85 <!-- START OF FOOTER -->
86     <div id="page-footer">
87         <p class="helplink">
88         <?php echo page_doc_link(get_string('moodledocslink')) ?>
89         </p>
91         <?php
92         echo $OUTPUT->login_info();
93         echo $OUTPUT->home_link();
94         echo $OUTPUT->standard_footer_html();
95         ?>
96     </div>
97     <div class="clearfix"></div>
98 </div>
99 <?php echo $OUTPUT->standard_end_of_body_html() ?>
100 </body>
101 </html>