secure.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. // This file is part of The Bootstrap 3 Moodle theme
  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. $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
  17. $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  18. $regions = bootstrap_grid($hassidepre, $hassidepost);
  19. $PAGE->requires->jquery();
  20. $PAGE->requires->jquery_plugin('bootstrap', 'theme_bootstrap');
  21. $settingshtml = theme_bootstrap_html_for_settings($PAGE);
  22. echo $OUTPUT->doctype() ?>
  23. <html <?php echo $OUTPUT->htmlattributes(); ?>>
  24. <head>
  25. <title><?php echo $OUTPUT->page_title(); ?></title>
  26. <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  27. <?php echo $settingshtml->brandfontlink; ?>
  28. <?php echo $OUTPUT->standard_head_html() ?>
  29. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui">
  30. </head>
  31. <body <?php echo $OUTPUT->body_attributes(); ?>>
  32. <?php echo $OUTPUT->standard_top_of_body_html() ?>
  33. <nav role="navigation" class="<?php echo $settingshtml->navbarclass ?>">
  34. <div class="navbar-header">
  35. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#moodle-navbar">
  36. <span class="sr-only">Toggle navigation</span>
  37. <span class="icon-bar"></span>
  38. <span class="icon-bar"></span>
  39. <span class="icon-bar"></span>
  40. </button>
  41. <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
  42. <div id="moodle-navbar" class="navbar-collapse collapse">
  43. <?php echo $OUTPUT->custom_menu(); ?>
  44. <ul class="nav pull-right">
  45. <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
  46. <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
  47. </ul>
  48. </div>
  49. </div>
  50. </nav>
  51. <div id="page" class="container">
  52. <header id="page-header" class="clearfix">
  53. <?php echo $OUTPUT->page_heading(); ?>
  54. </header>
  55. <div id="page-content" class="row">
  56. <div id="region-main" class="<?php echo $regions['content']; ?>">
  57. <?php
  58. echo $OUTPUT->course_content_header();
  59. echo $OUTPUT->main_content();
  60. echo $OUTPUT->course_content_footer();
  61. ?>
  62. </div>
  63. <?php
  64. if ($hassidepre) {
  65. echo $OUTPUT->blocks('side-pre', $regions['pre']);
  66. }?>
  67. <?php
  68. if ($hassidepost) {
  69. echo $OUTPUT->blocks('side-post', $regions['post']);
  70. }?>
  71. </div>
  72. <?php echo $OUTPUT->standard_end_of_body_html() ?>
  73. </div>
  74. </body>
  75. </html>