default.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. $knownregionpre = $PAGE->blocks->is_known_region('side-pre');
  19. $knownregionpost = $PAGE->blocks->is_known_region('side-post');
  20. $regions = bootstrap_grid($hassidepre, $hassidepost);
  21. $PAGE->set_popup_notification_allowed(false);
  22. $PAGE->requires->jquery();
  23. $PAGE->requires->jquery_plugin('bootstrap', 'theme_bootstrap');
  24. $settingshtml = theme_bootstrap_html_for_settings($PAGE);
  25. echo $OUTPUT->doctype() ?>
  26. <html <?php echo $OUTPUT->htmlattributes(); ?>>
  27. <head>
  28. <title><?php echo $OUTPUT->page_title(); ?></title>
  29. <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  30. <?php echo $settingshtml->brandfontlink; ?>
  31. <?php echo $OUTPUT->standard_head_html(); ?>
  32. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui">
  33. </head>
  34. <body <?php echo $OUTPUT->body_attributes(); ?>>
  35. <?php echo $OUTPUT->standard_top_of_body_html() ?>
  36. <nav role="navigation" class="<?php echo $settingshtml->navbarclass; ?>">
  37. <div class="<?php echo $settingshtml->containerclass; ?>">
  38. <div class="navbar-header">
  39. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#moodle-navbar">
  40. <span class="sr-only">Toggle navigation</span>
  41. <span class="icon-bar"></span>
  42. <span class="icon-bar"></span>
  43. <span class="icon-bar"></span>
  44. </button>
  45. <a class="navbar-brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
  46. </div>
  47. <div id="moodle-navbar" class="navbar-collapse collapse">
  48. <?php echo $OUTPUT->custom_menu(); ?>
  49. <?php echo $OUTPUT->user_menu(); ?>
  50. <ul class="nav pull-right">
  51. <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
  52. </ul>
  53. </div>
  54. </div>
  55. </nav>
  56. <header class="moodleheader">
  57. <div class="<?php echo $settingshtml->containerclass; ?>">
  58. <?php echo $OUTPUT->page_heading(); ?>
  59. </div>
  60. </header>
  61. <div id="page" class="<?php echo $settingshtml->containerclass; ?>">
  62. <header id="page-header" class="clearfix">
  63. <div id="page-navbar" class="clearfix">
  64. <nav class="breadcrumb-nav" role="navigation" aria-label="breadcrumb"><?php echo $OUTPUT->navbar(); ?></nav>
  65. <div class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></div>
  66. </div>
  67. <div id="course-header">
  68. <?php echo $OUTPUT->course_header(); ?>
  69. </div>
  70. </header>
  71. <div id="page-content" class="row">
  72. <div id="region-main" class="<?php echo $regions['content']; ?>">
  73. <?php
  74. echo $OUTPUT->course_content_header();
  75. echo $OUTPUT->main_content();
  76. echo $OUTPUT->course_content_footer();
  77. ?>
  78. </div>
  79. <?php
  80. if ($knownregionpre) {
  81. echo $OUTPUT->blocks('side-pre', $regions['pre']);
  82. }?>
  83. <?php
  84. if ($knownregionpost) {
  85. echo $OUTPUT->blocks('side-post', $regions['post']);
  86. }?>
  87. </div>
  88. <footer id="page-footer">
  89. <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
  90. <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
  91. <?php
  92. echo $OUTPUT->login_info();
  93. echo $OUTPUT->home_link();
  94. echo $OUTPUT->standard_footer_html();
  95. ?>
  96. </footer>
  97. <?php echo $OUTPUT->standard_end_of_body_html() ?>
  98. </div>
  99. </body>
  100. </html>