ed64bd7cd3bd9849f50ec59fb4382f22244643e1
[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->customlogourl)) {
28     $logourl = $PAGE->theme->settings->customlogourl;
29     if (strtolower(substr($logourl, 0, 4)) != 'http') {
30         $logourl = $CFG->wwwroot.'/'.$logourl;
31     }
32 } else {
33     $logourl = $OUTPUT->pix_url('logo_small', 'theme');
34 }
36 $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
38 $displaylogo = !isset($PAGE->theme->settings->headercontent) || $PAGE->theme->settings->headercontent;
39 /************************************************************************************************/
41 echo $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">
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 } ?>
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 } ?>
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 -->
87 <!-- begin of custom menu -->
88                             <?php if ($hascustommenu) { ?>
89                             <div id="custommenu"><?php echo $custommenu; ?></div>
90                             <?php } ?>
91 <!-- end of custom menu -->
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 -->
102 <!-- start of moodle content -->
103                             <div id="page-content" class="clearfix">
105                                 <!-- main mandatory content of the moodle page  -->
106                                 <div id="report-main-content">
107                                     <div class="region-content">
108                                         <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
109                                     </div>
110                                 </div>
111                                 <!-- end of main mandatory content of the moodle page -->
113                                 <!-- left column block - diplayed only if... -->
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 } ?>
123                                 <!-- end of left column block - diplayed only if... -->
125                             </div>
126 <!-- end of moodle content -->
128                             <div class="clearfix"></div>
130 <?php if ($hasframe) { ?>
131                         </div> <!-- </wrapper> -->
132                     </div> <!-- </frameright> -->
133                 </div> <!-- </frameleft> -->
134                 <div id="framebottomright">
135                     <div>&nbsp;</div>
136                 </div>
137             </div> <!-- </framebottom> -->
138         </div> <!-- </frametop> -->
140 <?php }
142 if ($hasfooter) {
143     if ($hasframe) { ?>
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">
156                             <!-- the content to show -->
157                             <div id="footerwrapper">
158                                 <?php echo $PAGE->theme->settings->footnote; ?>
159                             </div> <!-- </footerwrapper> -->
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
171     } else { ?>
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">
178                 <!-- the content to show -->
179                 <div id="footerwrapper">
180                     <?php echo $PAGE->theme->settings->footnote; ?>
181                 </div> <!-- </footerwrapper> -->
183             </div> <!-- </page-footer-content> -->
184             <?php }
185             //one more div is waiting to be closed
187     } ?>
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"> -->
201     <div class="clearfix"></div>
203 <?php  } //the waiting div has been closed: </page-footer>
204     echo $OUTPUT->standard_end_of_body_html(); ?>
205 </body>
206 </html>