MDL-29614 whitespace fixes
[moodle.git] / theme / formal_white / layout / report.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 $haslogininfo = (empty($PAGE->layout_options['nologininfo']));
9 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
11 $custommenu = $OUTPUT->custom_menu();
12 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
14 $bodyclasses = array();
15 if (!$showsidepre) {
16     $bodyclasses[] = 'content-only';
17 }
18 if ($hascustommenu) {
19     $bodyclasses[] = 'has_custom_menu';
20 }
22 /************************************************************************************************/
23 if (!empty($PAGE->theme->settings->logo)) {
24     $logourl = $PAGE->theme->settings->logo;
25 } else {
26     $logourl = $OUTPUT->pix_url('logo_small', 'theme');
27 }
29 $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
31 $displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
32 /************************************************************************************************/
34 echo $OUTPUT->doctype() ?>
35 <html <?php echo $OUTPUT->htmlattributes() ?>>
36 <head>
37     <title><?php echo $PAGE->title ?></title>
38     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
39     <?php echo $OUTPUT->standard_head_html() ?>
40 </head>
41 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
42     <?php echo $OUTPUT->standard_top_of_body_html(); ?>
43     <div id="page">
45     <?php if ($hasframe) { ?>
46         <div id="frametop">
47             <div id="framebottom">
48                 <div id="frametopright">
49                     <div>&nbsp;</div>
50                 </div>
51                 <div id="frameleft">
52                     <div id="frameright">
53                         <div id="wrapper">
54 <?php } ?>
56 <!-- begin of page-header -->
57                             <?php if ($hasheading) { ?>
58                             <div id="page-header">
59                             <?php if ($displaylogo) { ?>
60                                 <div id="headerlogo">
61                                     <img src="<?php echo $logourl ?>" alt="Custom logo here" />
62                                 </div>
63                             <?php } else { ?>
64                                 <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
65                             <?php } ?>
67                                 <div class="headermenu">
68                                     <?php
69                                     echo $OUTPUT->login_info();
70                                     if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
71                                         echo $OUTPUT->lang_menu();
72                                     }
73                                     echo $PAGE->headingmenu;
74                                     ?>
75                                 </div>
76                             </div>
77                             <?php } ?>
78 <!-- end of page-header -->
80 <!-- begin of custom menu -->
81                             <?php if ($hascustommenu) { ?>
82                             <div id="custommenu"><?php echo $custommenu; ?></div>
83                             <?php } ?>
84 <!-- end of custom menu -->
86 <!-- begin of navigation bar -->
87                             <?php if ($hasnavbar) { ?>
88                             <div class="navbar clearfix">
89                                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
90                                 <div class="navbutton"><?php echo $PAGE->button; ?></div>
91                             </div>
92                             <?php } ?>
93 <!-- end of navigation bar -->
95 <!-- start of moodle content -->
96                             <div id="page-content" class="clearfix">
97                                 <div id="report-main-content">
98                                     <div class="region-content">
99                                         <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
100                                     </div>
101                                 </div>
102                                 <?php if ($hassidepre) { ?>
103                                 <div id="report-region-wrap">
104                                     <div id="report-region-pre" class="block-region">
105                                         <div class="region-content">
106                                             <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
107                                         </div>
108                                     </div>
109                                 </div>
110                                 <?php } ?>
111                             </div>
112 <!-- end of moodle content -->
114                             <div class="clearfix"></div>
116 <?php if ($hasframe) { ?>
117                         </div> <!-- end of wrapper -->
118                     </div> <!-- </frameright> -->
119                 </div> <!-- </frameleft> -->
120                 <div id="framebottomright">
121                     <div>&nbsp;</div>
122                 </div>
123             </div> <!-- </framebottom> -->
124         </div> <!-- </frametop> -->
126 <?php }
128 if ($hasfooter) {
129     if ($hasframe) { ?>
131         <!-- START OF FOOTER -->
132         <div id="page-footer">
133             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
134             <div id="footerframetop">
135                 <div id="footerframebottom">
136                     <div id="footerframetopright">
137                         <div>&nbsp;</div>
138                     </div>
139                     <div id="footerframeleft">
140                         <div id="footerframeright">
142                             <!-- the content to show -->
143                             <div id="footerwrapper">
144                                 <?php echo $PAGE->theme->settings->footnote; ?>
145                             </div> <!-- </footerwrapper> -->
147                         </div> <!-- </footerframeright> -->
148                     </div> <!-- </footerframeleft> -->
149                     <div id="footerframebottomright">
150                         <div>&nbsp;</div>
151                     </div>
152                 </div> <!-- </footerframebottom> -->
153             </div> <!-- </footerframetop> -->
154             <?php }
155             //one more div is waiting to be closed
157     } else { ?>
159         <!-- START OF FOOTER -->
160         <div id="page-footer" class="noframefooter">
161             <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
162             <div id="page-footer-content">
164                 <!-- the content to show -->
165                 <div id="footerwrapper">
166                     <?php echo $PAGE->theme->settings->footnote; ?>
167                 </div> <!-- </footerwrapper> -->
169             </div> <!-- </page-footer-content> -->
170             <?php }
171             //one more div is waiting to be closed
173     } ?>
175             <div class="moodledocsleft">
176                 <?php
177                 //echo $OUTPUT->login_info();
178                 //echo $OUTPUT->home_link();
179                 echo $OUTPUT->standard_footer_html();
180                 ?>
181             </div>
182             <div class="moodledocs">
183                 <?php echo page_doc_link(get_string('moodledocslink')); ?>
184             </div>
185         </div> <!-- </page-footer> -->
186     </div> <!-- </page"> -->
188     <div class="clearfix"></div>
190 <?php  } //the waiting div has been closed: </page-footer>
191     echo $OUTPUT->standard_end_of_body_html(); ?>
192 </body>
193 </html>