PageRenderTime 73ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/theme/formal_white/layout/report.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 257 lines | 184 code | 40 blank | 33 comment | 30 complexity | 7d0b109125ed92dc816b2746d0056c9a MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
  1. <?php
  2. // This file is part of Moodle - http://moodle.org/
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * Moodle's formal_white theme
  18. *
  19. * DO NOT MODIFY THIS THEME!
  20. * COPY IT FIRST, THEN RENAME THE COPY AND MODIFY IT INSTEAD.
  21. *
  22. * For full information about creating Moodle themes, see:
  23. * http://docs.moodle.org/dev/Themes_2.0
  24. *
  25. * @package theme_formal_white
  26. * @copyright 2013 Mediatouch 2000, mediatouch.it
  27. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  28. */
  29. defined('MOODLE_INTERNAL') || die();
  30. $hasheading = $PAGE->heading;
  31. $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
  32. $hasfooter = (empty($PAGE->layout_options['nofooter']));
  33. $hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
  34. $haslogininfo = (empty($PAGE->layout_options['nologininfo']));
  35. $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
  36. $custommenu = $OUTPUT->custom_menu();
  37. $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
  38. $courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
  39. if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
  40. $courseheader = $OUTPUT->course_header();
  41. $coursecontentheader = $OUTPUT->course_content_header();
  42. if (empty($PAGE->layout_options['nocoursefooter'])) {
  43. $coursecontentfooter = $OUTPUT->course_content_footer();
  44. $coursefooter = $OUTPUT->course_footer();
  45. }
  46. }
  47. $bodyclasses = array();
  48. if (!$showsidepre) {
  49. $bodyclasses[] = 'content-only';
  50. }
  51. if ($hascustommenu) {
  52. $bodyclasses[] = 'has_custom_menu';
  53. }
  54. /************************************************************************************************/
  55. if (!empty($PAGE->theme->settings->customlogourl)) {
  56. $logourl = $PAGE->theme->setting_file_url('customlogourl', 'customlogourl');
  57. } else {
  58. $logourl = $OUTPUT->pix_url('logo_small', 'theme');
  59. }
  60. $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
  61. $displaylogo = !isset($PAGE->theme->settings->headercontent) || $PAGE->theme->settings->headercontent;
  62. /************************************************************************************************/
  63. echo $OUTPUT->doctype() ?>
  64. <html <?php echo $OUTPUT->htmlattributes() ?>>
  65. <head>
  66. <title><?php echo $PAGE->title ?></title>
  67. <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  68. <?php echo $OUTPUT->standard_head_html() ?>
  69. </head>
  70. <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
  71. <?php echo $OUTPUT->standard_top_of_body_html(); ?>
  72. <div id="page">
  73. <?php if ($hasframe) { ?>
  74. <div id="frametop">
  75. <div id="framebottom">
  76. <div id="frametopright">
  77. <div>&nbsp;</div>
  78. </div>
  79. <div id="frameleft">
  80. <div id="frameright">
  81. <div id="wrapper">
  82. <?php } ?>
  83. <!-- begin of page-header -->
  84. <?php if ($hasheading) { ?>
  85. <div id="page-header">
  86. <div class="headermenu">
  87. <?php
  88. echo $OUTPUT->login_info();
  89. if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
  90. echo $OUTPUT->lang_menu();
  91. }
  92. echo $PAGE->headingmenu;
  93. ?>
  94. </div>
  95. <?php if ($displaylogo) { ?>
  96. <div id="headerlogo">
  97. <img src="<?php echo $logourl ?>" alt="Custom logo here" />
  98. </div>
  99. <?php } else { ?>
  100. <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
  101. <?php } ?>
  102. </div>
  103. <?php } ?>
  104. <!-- end of page-header -->
  105. <!-- begin of course header -->
  106. <?php if (!empty($courseheader)) { ?>
  107. <div id="course-header"><?php echo $courseheader; ?></div>
  108. <?php } ?>
  109. <!-- end of course header -->
  110. <!-- begin of custom menu -->
  111. <?php if ($hascustommenu) { ?>
  112. <div id="custommenu"><?php echo $custommenu; ?></div>
  113. <?php } ?>
  114. <!-- end of custom menu -->
  115. <!-- begin of navigation bar -->
  116. <?php if ($hasnavbar) { ?>
  117. <div class="navbar clearfix">
  118. <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
  119. <div class="navbutton"><?php echo $PAGE->button; ?></div>
  120. </div>
  121. <?php } ?>
  122. <!-- end of navigation bar -->
  123. <!-- start of moodle content -->
  124. <div id="page-content" class="clearfix">
  125. <!-- main mandatory content of the moodle page -->
  126. <div id="report-main-content">
  127. <div class="region-content">
  128. <?php echo $coursecontentheader; ?>
  129. <?php echo $OUTPUT->main_content() ?>
  130. <?php echo $coursecontentfooter; ?>
  131. </div>
  132. </div>
  133. <!-- end of main mandatory content of the moodle page -->
  134. <!-- left column block - diplayed only if... -->
  135. <?php if ($hassidepre) { ?>
  136. <div id="report-region-wrap">
  137. <div id="report-region-pre" class="block-region">
  138. <div class="region-content">
  139. <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
  140. </div>
  141. </div>
  142. </div>
  143. <?php } ?>
  144. <!-- end of left column block - diplayed only if... -->
  145. </div>
  146. <!-- end of moodle content -->
  147. <!-- begin of course footer -->
  148. <?php if (!empty($coursefooter)) { ?>
  149. <div id="course-footer"><?php echo $coursefooter; ?></div>
  150. <?php } ?>
  151. <!-- end of course footer -->
  152. <div class="clearfix"></div>
  153. <?php if ($hasframe) { ?>
  154. </div> <!-- </wrapper> -->
  155. </div> <!-- </frameright> -->
  156. </div> <!-- </frameleft> -->
  157. <div id="framebottomright">
  158. <div>&nbsp;</div>
  159. </div>
  160. </div> <!-- </framebottom> -->
  161. </div> <!-- </frametop> -->
  162. <?php }
  163. if ($hasfooter) {
  164. if ($hasframe) { ?>
  165. <!-- START OF FOOTER -->
  166. <div id="page-footer">
  167. <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
  168. <div id="footerframetop">
  169. <div id="footerframebottom">
  170. <div id="footerframetopright">
  171. <div>&nbsp;</div>
  172. </div>
  173. <div id="footerframeleft">
  174. <div id="footerframeright">
  175. <!-- the content to show -->
  176. <div id="footerwrapper">
  177. <?php echo $PAGE->theme->settings->footnote; ?>
  178. </div> <!-- </footerwrapper> -->
  179. </div> <!-- </footerframeright> -->
  180. </div> <!-- </footerframeleft> -->
  181. <div id="footerframebottomright">
  182. <div>&nbsp;</div>
  183. </div>
  184. </div> <!-- </footerframebottom> -->
  185. </div> <!-- </footerframetop> -->
  186. <?php }
  187. // one more div is waiting to be closed
  188. } else { ?>
  189. <!-- START OF FOOTER -->
  190. <div id="page-footer" class="noframefooter">
  191. <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
  192. <div id="page-footer-content">
  193. <!-- the content to show -->
  194. <div id="footerwrapper">
  195. <?php echo $PAGE->theme->settings->footnote; ?>
  196. </div> <!-- </footerwrapper> -->
  197. </div> <!-- </page-footer-content> -->
  198. <?php }
  199. // one more div is waiting to be closed
  200. } ?>
  201. <div class="moodledocsleft">
  202. <?php
  203. // echo $OUTPUT->login_info();
  204. // echo $OUTPUT->home_link();
  205. echo $OUTPUT->standard_footer_html();
  206. ?>
  207. </div>
  208. <div class="moodledocs">
  209. <?php echo page_doc_link(get_string('moodledocslink')); ?>
  210. </div>
  211. </div> <!-- </page-footer> -->
  212. </div> <!-- </page> -->
  213. <div class="clearfix"></div>
  214. <?php } // the waiting div has been closed: </page-footer>
  215. echo $OUTPUT->standard_end_of_body_html(); ?>
  216. </body>
  217. </html>