MDL-34916 theme_formal_white: added support for relative path of logos
[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/************************************************************************************************/
9ad11a6c
K
27if (!empty($PAGE->theme->settings->customlogourl)) {
28 $logourl = $PAGE->theme->settings->customlogourl;
e765d3c3
K
29 if (strtolower(substr($logourl, 0, 4)) != 'http') {
30 $logourl = $CFG->wwwroot.'/'.$logourl;
31 }
42906f46
EL
32} else {
33 $logourl = $OUTPUT->pix_url('logo_small', 'theme');
34}
35
36$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
37
9ad11a6c 38$displaylogo = !isset($PAGE->theme->settings->headercontent) || $PAGE->theme->settings->headercontent;
42906f46
EL
39/************************************************************************************************/
40
41echo $OUTPUT->doctype() ?>
42<html <?php echo $OUTPUT->htmlattributes() ?>>
43<head>
44 <title><?php echo $PAGE->title ?></title>
45 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
46 <?php echo $OUTPUT->standard_head_html() ?>
47</head>
48<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
49 <?php echo $OUTPUT->standard_top_of_body_html(); ?>
50 <div id="page">
51
52 <?php if ($hasframe) { ?>
53 <div id="frametop">
54 <div id="framebottom">
55 <div id="frametopright">
56 <div>&nbsp;</div>
57 </div>
58 <div id="frameleft">
59 <div id="frameright">
60 <div id="wrapper">
61<?php } ?>
62
63<!-- begin of page-header -->
64 <?php if ($hasheading) { ?>
65 <div id="page-header">
66 <?php if ($displaylogo) { ?>
67 <div id="headerlogo">
68 <img src="<?php echo $logourl ?>" alt="Custom logo here" />
69 </div>
70 <?php } else { ?>
71 <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
72 <?php } ?>
73
74 <div class="headermenu">
75 <?php
76 echo $OUTPUT->login_info();
77 if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
78 echo $OUTPUT->lang_menu();
79 }
80 echo $PAGE->headingmenu;
81 ?>
82 </div>
83 </div>
84 <?php } ?>
85<!-- end of page-header -->
86
87<!-- begin of custom menu -->
88 <?php if ($hascustommenu) { ?>
89 <div id="custommenu"><?php echo $custommenu; ?></div>
90 <?php } ?>
91<!-- end of custom menu -->
92
93<!-- begin of navigation bar -->
94 <?php if ($hasnavbar) { ?>
95 <div class="navbar clearfix">
96 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
97 <div class="navbutton"><?php echo $PAGE->button; ?></div>
98 </div>
99 <?php } ?>
100<!-- end of navigation bar -->
101
102<!-- start of moodle content -->
103 <div id="page-content" class="clearfix">
214381bf
K
104
105 <!-- main mandatory content of the moodle page -->
42906f46
EL
106 <div id="report-main-content">
107 <div class="region-content">
108 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
109 </div>
110 </div>
214381bf
K
111 <!-- end of main mandatory content of the moodle page -->
112
113 <!-- left column block - diplayed only if... -->
42906f46
EL
114 <?php if ($hassidepre) { ?>
115 <div id="report-region-wrap">
116 <div id="report-region-pre" class="block-region">
117 <div class="region-content">
118 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
119 </div>
120 </div>
121 </div>
122 <?php } ?>
214381bf
K
123 <!-- end of left column block - diplayed only if... -->
124
42906f46
EL
125 </div>
126<!-- end of moodle content -->
127
128 <div class="clearfix"></div>
129
130<?php if ($hasframe) { ?>
214381bf 131 </div> <!-- </wrapper> -->
42906f46
EL
132 </div> <!-- </frameright> -->
133 </div> <!-- </frameleft> -->
134 <div id="framebottomright">
135 <div>&nbsp;</div>
136 </div>
137 </div> <!-- </framebottom> -->
138 </div> <!-- </frametop> -->
139
140<?php }
141
142if ($hasfooter) {
143 if ($hasframe) { ?>
144
145 <!-- START OF FOOTER -->
146 <div id="page-footer">
147 <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
148 <div id="footerframetop">
149 <div id="footerframebottom">
150 <div id="footerframetopright">
151 <div>&nbsp;</div>
152 </div>
153 <div id="footerframeleft">
154 <div id="footerframeright">
155
156 <!-- the content to show -->
157 <div id="footerwrapper">
158 <?php echo $PAGE->theme->settings->footnote; ?>
159 </div> <!-- </footerwrapper> -->
160
161 </div> <!-- </footerframeright> -->
162 </div> <!-- </footerframeleft> -->
163 <div id="footerframebottomright">
164 <div>&nbsp;</div>
165 </div>
166 </div> <!-- </footerframebottom> -->
167 </div> <!-- </footerframetop> -->
168 <?php }
169 //one more div is waiting to be closed
170
171 } else { ?>
172
173 <!-- START OF FOOTER -->
174 <div id="page-footer" class="noframefooter">
175 <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
176 <div id="page-footer-content">
177
178 <!-- the content to show -->
179 <div id="footerwrapper">
180 <?php echo $PAGE->theme->settings->footnote; ?>
181 </div> <!-- </footerwrapper> -->
182
183 </div> <!-- </page-footer-content> -->
184 <?php }
185 //one more div is waiting to be closed
186
187 } ?>
42906f46
EL
188 <div class="moodledocsleft">
189 <?php
190 //echo $OUTPUT->login_info();
191 //echo $OUTPUT->home_link();
192 echo $OUTPUT->standard_footer_html();
193 ?>
194 </div>
195 <div class="moodledocs">
196 <?php echo page_doc_link(get_string('moodledocslink')); ?>
197 </div>
198 </div> <!-- </page-footer> -->
199 </div> <!-- </page"> -->
200
201 <div class="clearfix"></div>
202
203<?php } //the waiting div has been closed: </page-footer>
204 echo $OUTPUT->standard_end_of_body_html(); ?>
205</body>
206</html>