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