added mandatory lines to formal_white report layout
[moodle.git] / theme / formal_white / layout / report.php
CommitLineData
42906f46
EL
1<?php
2
214381bf
K
3defined('MOODLE_INTERNAL') || die();
4
5$hasheading = $PAGE->heading;
42906f46
EL
6$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
7$hasfooter = (empty($PAGE->layout_options['nofooter']));
214381bf 8
42906f46
EL
9$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
10$haslogininfo = (empty($PAGE->layout_options['nologininfo']));
11
12$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
13
14$custommenu = $OUTPUT->custom_menu();
15$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
16
17$bodyclasses = array();
18if (!$showsidepre) {
19 $bodyclasses[] = 'content-only';
20}
214381bf 21
42906f46
EL
22if ($hascustommenu) {
23 $bodyclasses[] = 'has_custom_menu';
24}
25
26/************************************************************************************************/
27if (!empty($PAGE->theme->settings->logo)) {
28 $logourl = $PAGE->theme->settings->logo;
29} else {
30 $logourl = $OUTPUT->pix_url('logo_small', 'theme');
31}
32
33$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
34
35$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
36/************************************************************************************************/
37
38echo $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">
48
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 } ?>
59
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 } ?>
70
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 -->
83
84<!-- begin of custom menu -->
85 <?php if ($hascustommenu) { ?>
86 <div id="custommenu"><?php echo $custommenu; ?></div>
87 <?php } ?>
88<!-- end of custom menu -->
89
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 -->
98
99<!-- start of moodle content -->
100 <div id="page-content" class="clearfix">
214381bf
K
101
102 <!-- main mandatory content of the moodle page -->
42906f46
EL
103 <div id="report-main-content">
104 <div class="region-content">
105 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
106 </div>
107 </div>
214381bf
K
108 <!-- end of main mandatory content of the moodle page -->
109
110 <!-- left column block - diplayed only if... -->
42906f46
EL
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 } ?>
214381bf
K
120 <!-- end of left column block - diplayed only if... -->
121
42906f46
EL
122 </div>
123<!-- end of moodle content -->
124
125 <div class="clearfix"></div>
126
127<?php if ($hasframe) { ?>
214381bf 128 </div> <!-- </wrapper> -->
42906f46
EL
129 </div> <!-- </frameright> -->
130 </div> <!-- </frameleft> -->
131 <div id="framebottomright">
132 <div>&nbsp;</div>
133 </div>
134 </div> <!-- </framebottom> -->
135 </div> <!-- </frametop> -->
136
137<?php }
138
139if ($hasfooter) {
140 if ($hasframe) { ?>
141
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">
152
153 <!-- the content to show -->
154 <div id="footerwrapper">
155 <?php echo $PAGE->theme->settings->footnote; ?>
156 </div> <!-- </footerwrapper> -->
157
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
167
168 } else { ?>
169
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">
174
175 <!-- the content to show -->
176 <div id="footerwrapper">
177 <?php echo $PAGE->theme->settings->footnote; ?>
178 </div> <!-- </footerwrapper> -->
179
180 </div> <!-- </page-footer-content> -->
181 <?php }
182 //one more div is waiting to be closed
183
184 } ?>
42906f46
EL
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"> -->
197
198 <div class="clearfix"></div>
199
200<?php } //the waiting div has been closed: </page-footer>
201 echo $OUTPUT->standard_end_of_body_html(); ?>
202</body>
203</html>