added mandatory lines to formal_white report layout
[moodle.git] / theme / formal_white / layout / report.php
1 <?php
3 defined('MOODLE_INTERNAL') || die();
5 $hasheading = $PAGE->heading;
6 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
7 $hasfooter = (empty($PAGE->layout_options['nofooter']));
9 $hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
10 $haslogininfo = (empty($PAGE->layout_options['nologininfo']));
12 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
14 $custommenu = $OUTPUT->custom_menu();
15 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
17 $bodyclasses = array();
18 if (!$showsidepre) {
19     $bodyclasses[] = 'content-only';
20 }
22 if ($hascustommenu) {
23     $bodyclasses[] = 'has_custom_menu';
24 }
26 /************************************************************************************************/
27 if (!empty($PAGE->theme->settings->logo)) {
28     $logourl = $PAGE->theme->settings->logo;
29 } else {
30     $logourl = $OUTPUT->pix_url('logo_small', 'theme');
31 }
33 $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
35 $displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
36 /************************************************************************************************/
38 echo $OUTPUT->doctype() ?>
39 <html <?php echo $OUTPUT->htmlattributes() ?>>
40 <head>
41     <title><?php echo $PAGE->title ?></title>
42     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
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(); ?>
47     <div id="page">
49     <?php if ($hasframe) { ?>
50         <div id="frametop">
51             <div id="framebottom">
52                 <div id="frametopright">
53                     <div>&nbsp;</div>
54                 </div>
55                 <div id="frameleft">
56                     <div id="frameright">
57                         <div id="wrapper">
58 <?php } ?>
60 <!-- begin of page-header -->
61                             <?php if ($hasheading) { ?>
62                             <div id="page-header">
63                             <?php if ($displaylogo) { ?>
64                                 <div id="headerlogo">
65                                     <img src="<?php echo $logourl ?>" alt="Custom logo here" />
66                                 </div>
67                             <?php } else { ?>
68                                 <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
69                             <?php } ?>
71                                 <div class="headermenu">
72                                     <?php
73                                     echo $OUTPUT->login_info();
74                                     if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
75                                         echo $OUTPUT->lang_menu();
76                                     }
77                                     echo $PAGE->headingmenu;
78                                     ?>
79                                 </div>
80                             </div>
81                             <?php } ?>
82 <!-- end of page-header -->
84 <!-- begin of custom menu -->
85                             <?php if ($hascustommenu) { ?>
86                             <div id="custommenu"><?php echo $custommenu; ?></div>
87                             <?php } ?>
88 <!-- end of custom menu -->
90 <!-- begin of navigation bar -->
91                             <?php if ($hasnavbar) { ?>
92                             <div class="navbar clearfix">
93                                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
94                                 <div class="navbutton"><?php echo $PAGE->button; ?></div>
95                             </div>
96                             <?php } ?>
97 <!-- end of navigation bar -->
99 <!-- start of moodle content -->
100                             <div id="page-content" class="clearfix">
102                                 <!-- main mandatory content of the moodle page  -->
103                                 <div id="report-main-content">
104                                     <div class="region-content">
105                                         <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
106                                     </div>
107                                 </div>
108                                 <!-- end of main mandatory content of the moodle page -->
110                                 <!-- left column block - diplayed only if... -->
111                                 <?php if ($hassidepre) { ?>
112                                 <div id="report-region-wrap">
113                                     <div id="report-region-pre" class="block-region">
114                                         <div class="region-content">
115                                             <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
116                                         </div>
117                                     </div>
118                                 </div>
119                                 <?php } ?>
120                                 <!-- end of left column block - diplayed only if... -->
122                             </div>
123 <!-- end of moodle content -->
125                             <div class="clearfix"></div>
127 <?php if ($hasframe) { ?>
128                         </div> <!-- </wrapper> -->
129                     </div> <!-- </frameright> -->
130                 </div> <!-- </frameleft> -->
131                 <div id="framebottomright">
132                     <div>&nbsp;</div>
133                 </div>
134             </div> <!-- </framebottom> -->
135         </div> <!-- </frametop> -->
137 <?php }
139 if ($hasfooter) {
140     if ($hasframe) { ?>
142         <!-- START OF FOOTER -->
143         <div id="page-footer">
144             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
145             <div id="footerframetop">
146                 <div id="footerframebottom">
147                     <div id="footerframetopright">
148                         <div>&nbsp;</div>
149                     </div>
150                     <div id="footerframeleft">
151                         <div id="footerframeright">
153                             <!-- the content to show -->
154                             <div id="footerwrapper">
155                                 <?php echo $PAGE->theme->settings->footnote; ?>
156                             </div> <!-- </footerwrapper> -->
158                         </div> <!-- </footerframeright> -->
159                     </div> <!-- </footerframeleft> -->
160                     <div id="footerframebottomright">
161                         <div>&nbsp;</div>
162                     </div>
163                 </div> <!-- </footerframebottom> -->
164             </div> <!-- </footerframetop> -->
165             <?php }
166             //one more div is waiting to be closed
168     } else { ?>
170         <!-- START OF FOOTER -->
171         <div id="page-footer" class="noframefooter">
172             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
173             <div id="page-footer-content">
175                 <!-- the content to show -->
176                 <div id="footerwrapper">
177                     <?php echo $PAGE->theme->settings->footnote; ?>
178                 </div> <!-- </footerwrapper> -->
180             </div> <!-- </page-footer-content> -->
181             <?php }
182             //one more div is waiting to be closed
184     } ?>
185             <div class="moodledocsleft">
186                 <?php
187                 //echo $OUTPUT->login_info();
188                 //echo $OUTPUT->home_link();
189                 echo $OUTPUT->standard_footer_html();
190                 ?>
191             </div>
192             <div class="moodledocs">
193                 <?php echo page_doc_link(get_string('moodledocslink')); ?>
194             </div>
195         </div> <!-- </page-footer> -->
196     </div> <!-- </page"> -->
198     <div class="clearfix"></div>
200 <?php  } //the waiting div has been closed: </page-footer>
201     echo $OUTPUT->standard_end_of_body_html(); ?>
202 </body>
203 </html>