theme MDL-23369 removed logged in notification from popups
[moodle.git] / theme / base / layout / general.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 $bodyclasses = array();
17 if ($showsidepre && !$showsidepost) {
18     $bodyclasses[] = 'side-pre-only';
19 } else if ($showsidepost && !$showsidepre) {
20     $bodyclasses[] = 'side-post-only';
21 } else if (!$showsidepost && !$showsidepre) {
22     $bodyclasses[] = 'content-only';
23 }
24 if ($hascustommenu) {
25     $bodyclasses[] = 'has_custom_menu';
26 }
28 echo $OUTPUT->doctype() ?>
29 <html <?php echo $OUTPUT->htmlattributes() ?>>
30 <head>
31     <title><?php echo $PAGE->title ?></title>
32     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
33     <?php echo $OUTPUT->standard_head_html() ?>
34 </head>
35 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
36 <?php echo $OUTPUT->standard_top_of_body_html() ?>
37 <div id="page">
38 <?php if ($hasheading || $hasnavbar) { ?>
39     <div id="page-header">
40         <?php if ($hasheading) { ?>
41         <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
42         <div class="headermenu"><?php
43             if ($haslogininfo) {
44                 echo $OUTPUT->login_info();
45             }
46             if (!empty($PAGE->layout_options['langmenu'])) {
47                 echo $OUTPUT->lang_menu();
48             }
49             echo $PAGE->headingmenu
50         ?></div><?php } ?>
51         <?php if ($hascustommenu) { ?>
52         <div id="custommenu"><?php echo $custommenu; ?></div>
53         <?php } ?>
54         <?php if ($hasnavbar) { ?>
55             <div class="navbar clearfix">
56                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
57                 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
58             </div>
59         <?php } ?>
60     </div>
61 <?php } ?>
62 <!-- END OF HEADER -->
64     <div id="page-content">
65         <div id="region-main-box">
66             <div id="region-post-box">
67             
68                 <div id="region-main-wrap">
69                     <div id="region-main">
70                         <div class="region-content">
71                             <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
72                         </div>
73                     </div>
74                 </div>
75                 
76                 <?php if ($hassidepre) { ?>
77                 <div id="region-pre" class="block-region">
78                     <div class="region-content">
79                         <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
80                     </div>
81                 </div>
82                 <?php } ?>
83                 
84                 <?php if ($hassidepost) { ?>
85                 <div id="region-post" class="block-region">
86                     <div class="region-content">
87                         <?php echo $OUTPUT->blocks_for_region('side-post') ?>
88                     </div>
89                 </div>
90                 <?php } ?>
91             </div>
92         </div>
93     </div>
95 <!-- START OF FOOTER -->
96     <?php if ($hasfooter) { ?>
97     <div id="page-footer" class="clearfix">
98         <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
99         <?php
100         echo $OUTPUT->login_info();
101         echo $OUTPUT->home_link();
102         echo $OUTPUT->standard_footer_html();
103         ?>
104     </div>
105     <?php } ?>
106 </div>
107 <?php echo $OUTPUT->standard_end_of_body_html() ?>
108 </body>
109 </html>