Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-40089 theme_clean: simplified layouts and converted to new OUTPUT…

… API
  • Loading branch information...
commit 85044443072fe32a4017faaf7daaf99a1c64b085 1 parent 602255d
Sam Hemelryk samhemelryk authored
5 theme/clean/config.php
@@ -55,3 +55,8 @@
55 55
56 56 $THEME->rendererfactory = 'theme_overridden_renderer_factory';
57 57 $THEME->csspostprocess = 'clean_process_css';
  58 +
  59 +$THEME->blockrtlmanipulations = array(
  60 + 'side-pre' => 'side-post',
  61 + 'side-post' => 'side-pre'
  62 +);
91 theme/clean/layout/columns1.php
... ... @@ -0,0 +1,91 @@
  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 +// Get the HTML for the settings bits.
  18 +$html = theme_clean_get_html_for_settings($OUTPUT, $PAGE);
  19 +
  20 +echo $OUTPUT->doctype() ?>
  21 +<html <?php echo $OUTPUT->htmlattributes(); ?>>
  22 +<head>
  23 + <title><?php echo $OUTPUT->page_title(); ?></title>
  24 + <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  25 + <?php echo $OUTPUT->standard_head_html() ?>
  26 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  27 +</head>
  28 +
  29 +<body <?php echo $OUTPUT->body_attributes(); ?>>
  30 +
  31 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  32 +
  33 +<header role="banner" class="navbar navbar-fixed-top<?php echo $html->navbarclass ?>">
  34 + <nav role="navigation" class="navbar-inner">
  35 + <div class="container-fluid">
  36 + <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
  37 + <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  38 + <span class="icon-bar"></span>
  39 + <span class="icon-bar"></span>
  40 + <span class="icon-bar"></span>
  41 + </a>
  42 + <div class="nav-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 +</header>
  52 +
  53 +<div id="page" class="container-fluid">
  54 +
  55 + <header id="page-header" class="clearfix">
  56 + <div id="page-navbar">
  57 + <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
  58 + <?php echo $OUTPUT->navbar(); ?>
  59 + </div>
  60 + <?php echo $html->heading; ?>
  61 + <div id="course-header">
  62 + <?php echo $OUTPUT->course_header(); ?>
  63 + </div>
  64 + </header>
  65 +
  66 + <div id="page-content">
  67 + <div id="region-bs-main-and-pre">
  68 + <section id="region-main">
  69 + <?php
  70 + echo $OUTPUT->course_content_header();
  71 + echo $OUTPUT->main_content();
  72 + echo $OUTPUT->course_content_footer();
  73 + ?>
  74 + </section>
  75 + </div>
  76 + </div>
  77 +
  78 + <footer id="page-footer">
  79 + <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
  80 + <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
  81 + <?php
  82 + echo $html->footnote;
  83 + echo $OUTPUT->standard_footer_html();
  84 + ?>
  85 + </footer>
  86 +
  87 + <?php echo $OUTPUT->standard_end_of_body_html() ?>
  88 +
  89 +</div>
  90 +</body>
  91 +</html>
102 theme/clean/layout/columns2.php
... ... @@ -0,0 +1,102 @@
  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 +// Get the HTML for the settings bits.
  18 +$html = theme_clean_get_html_for_settings($OUTPUT, $PAGE);
  19 +
  20 +echo $OUTPUT->doctype() ?>
  21 +<html <?php echo $OUTPUT->htmlattributes(); ?>>
  22 +<head>
  23 + <title><?php echo $OUTPUT->page_title(); ?></title>
  24 + <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  25 + <?php echo $OUTPUT->standard_head_html() ?>
  26 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  27 +</head>
  28 +
  29 +<body <?php echo $OUTPUT->body_attributes('two-column'); ?>>
  30 +
  31 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  32 +
  33 +<header role="banner" class="navbar navbar-fixed-top<?php echo $html->navbarclass ?>">
  34 + <nav role="navigation" class="navbar-inner">
  35 + <div class="container-fluid">
  36 + <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
  37 + <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  38 + <span class="icon-bar"></span>
  39 + <span class="icon-bar"></span>
  40 + <span class="icon-bar"></span>
  41 + </a>
  42 + <div class="nav-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 +</header>
  52 +
  53 +<div id="page" class="container-fluid">
  54 +
  55 + <header id="page-header" class="clearfix">
  56 + <div id="page-navbar">
  57 + <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
  58 + <?php echo $OUTPUT->navbar(); ?>
  59 + </div>
  60 + <?php echo $html->heading; ?>
  61 + <div id="course-header">
  62 + <?php echo $OUTPUT->course_header(); ?>
  63 + </div>
  64 + </header>
  65 +
  66 + <div id="page-content" class="row-fluid">
  67 + <div id="region-bs-main-and-pre" class="span9">
  68 + <div class="row-fluid">
  69 + <section id="region-main" class="span9 pull-right">
  70 + <?php
  71 + echo $OUTPUT->course_content_header();
  72 + echo $OUTPUT->main_content();
  73 + echo $OUTPUT->course_content_footer();
  74 + ?>
  75 + </section>
  76 + <?php
  77 + if (!right_to_left()) {
  78 + echo $OUTPUT->blocks('side-pre', 'span3 desktop-first-column');
  79 + } ?>
  80 + </div>
  81 + </div>
  82 + <?php
  83 + if (right_to_left()) {
  84 + echo $OUTPUT->blocks('side-post', 'span3');
  85 + }
  86 + ?>
  87 + </div>
  88 +
  89 + <footer id="page-footer">
  90 + <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
  91 + <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
  92 + <?php
  93 + echo $html->footnote;
  94 + echo $OUTPUT->standard_footer_html();
  95 + ?>
  96 + </footer>
  97 +
  98 + <?php echo $OUTPUT->standard_end_of_body_html() ?>
  99 +
  100 +</div>
  101 +</body>
  102 +</html>
211 theme/clean/layout/columns3.php
@@ -28,81 +28,23 @@
28 28 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29 29 */
30 30
31   -$hasheading = ($PAGE->heading);
32   -$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
33   -$hasfooter = (empty($PAGE->layout_options['nofooter']));
34   -$hasheader = (empty($PAGE->layout_options['noheader']));
35   -
36   -$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
37   -$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
38   -
39   -$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
40   -$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
41   -
42   -// If there can be a sidepost region on this page and we are editing, always
43   -// show it so blocks can be dragged into it.
44   -if ($PAGE->user_is_editing()) {
45   - if ($PAGE->blocks->is_known_region('side-pre')) {
46   - $showsidepre = true;
47   - }
48   - if ($PAGE->blocks->is_known_region('side-post')) {
49   - $showsidepost = true;
50   - }
51   -}
52   -
53   -$haslogo = (!empty($PAGE->theme->settings->logo));
54   -
55   -$hasfootnote = (!empty($PAGE->theme->settings->footnote));
56   -$navbar_inverse = '';
57   -if (!empty($PAGE->theme->settings->invert)) {
58   - $navbar_inverse = 'navbar-inverse';
59   -}
60   -$custommenu = $OUTPUT->custom_menu();
61   -$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
62   -
63   -$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
64   -
65   -if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
66   - $courseheader = $OUTPUT->course_header();
67   - $coursecontentheader = $OUTPUT->course_content_header();
68   - if (empty($PAGE->layout_options['nocoursefooter'])) {
69   - $coursecontentfooter = $OUTPUT->course_content_footer();
70   - $coursefooter = $OUTPUT->course_footer();
71   - }
72   -}
73   -
74   -$layout = 'pre-and-post';
75   -if ($showsidepre && !$showsidepost) {
76   - if (!right_to_left()) {
77   - $layout = 'side-pre-only';
78   - } else {
79   - $layout = 'side-post-only';
80   - }
81   -} else if ($showsidepost && !$showsidepre) {
82   - if (!right_to_left()) {
83   - $layout = 'side-post-only';
84   - } else {
85   - $layout = 'side-pre-only';
86   - }
87   -} else if (!$showsidepost && !$showsidepre) {
88   - $layout = 'content-only';
89   -}
90   -$bodyclasses[] = $layout;
  31 +// Get the HTML for the settings bits.
  32 +$html = theme_clean_get_html_for_settings($OUTPUT, $PAGE);
91 33
92 34 echo $OUTPUT->doctype() ?>
93   -<html <?php echo $OUTPUT->htmlattributes() ?>>
  35 +<html <?php echo $OUTPUT->htmlattributes(); ?>>
94 36 <head>
95   - <title><?php echo $PAGE->title ?></title>
96   - <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  37 + <title><?php echo $OUTPUT->page_title(); ?></title>
  38 + <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
97 39 <?php echo $OUTPUT->standard_head_html() ?>
98 40 <meta name="viewport" content="width=device-width, initial-scale=1.0">
99 41 </head>
100 42
101   -<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
  43 +<body <?php echo $OUTPUT->body_attributes(); ?>>
102 44
103 45 <?php echo $OUTPUT->standard_top_of_body_html() ?>
104 46
105   -<header role="banner" class="navbar <?php echo $navbar_inverse ?> navbar-fixed-top">
  47 +<header role="banner" class="navbar navbar-fixed-top<?php echo $html->navbarclass ?>">
106 48 <nav role="navigation" class="navbar-inner">
107 49 <div class="container-fluid">
108 50 <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
@@ -112,13 +54,11 @@
112 54 <span class="icon-bar"></span>
113 55 </a>
114 56 <div class="nav-collapse collapse">
115   - <?php if ($hascustommenu) {
116   - echo $custommenu;
117   - } ?>
118   - <ul class="nav pull-right">
119   - <li><?php echo $PAGE->headingmenu ?></li>
120   - <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
121   - </ul>
  57 + <?php echo $OUTPUT->custom_menu(); ?>
  58 + <ul class="nav pull-right">
  59 + <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
  60 + <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
  61 + </ul>
122 62 </div>
123 63 </div>
124 64 </nav>
@@ -126,103 +66,44 @@
126 66
127 67 <div id="page" class="container-fluid">
128 68
129   -<?php if ($hasheader) { ?>
130   -<header id="page-header" class="clearfix">
131   - <?php if ($hasnavbar) { ?>
132   - <nav class="breadcrumb-button"><?php echo $PAGE->button; ?></nav>
133   - <?php echo $OUTPUT->navbar(); ?>
134   - <?php } ?>
135   -
136   - <?php
137   - if (!$haslogo) { ?>
138   - <h1><?php echo $PAGE->heading ?></h1>
139   - <?php
140   - } else { ?>
141   - <a class="logo" href="<?php echo $CFG->wwwroot; ?>" title="<?php print_string('home'); ?>"></a>
142   - <?php
143   - } ?>
144   -
145   - <?php if (!empty($courseheader)) { ?>
146   - <div id="course-header"><?php echo $courseheader; ?></div>
147   - <?php } ?>
148   -</header>
149   -<?php } ?>
150   -
151   -<div id="page-content" class="row-fluid">
152   -
153   -<?php if ($layout === 'pre-and-post') { ?>
154   - <div id="region-bs-main-and-pre" class="span9">
155   - <div class="row-fluid">
156   - <section id="region-main" class="span8 pull-right">
157   -<?php } else if ($layout === 'side-post-only') { ?>
158   - <section id="region-main" class="span9">
159   -<?php } else if ($layout === 'side-pre-only') { ?>
160   - <section id="region-main" class="span9 pull-right">
161   -<?php } else if ($layout === 'content-only') { ?>
162   - <section id="region-main" class="span12">
163   -<?php } ?>
164   -
165   -
166   - <?php echo $coursecontentheader; ?>
167   - <?php echo $OUTPUT->main_content() ?>
168   - <?php echo $coursecontentfooter; ?>
169   - </section>
170   -
171   -
172   -<?php if ($layout !== 'content-only') {
173   - if ($layout === 'pre-and-post') { ?>
174   - <aside class="span4 desktop-first-column">
175   - <?php } else if ($layout === 'side-pre-only') { ?>
176   - <aside class="span3 desktop-first-column">
177   - <?php } ?>
178   - <div id="region-pre" class="block-region">
179   - <div class="region-content">
180   - <?php
181   - if (!right_to_left()) {
182   - echo $OUTPUT->blocks_for_region('side-pre');
183   - } else if ($hassidepost) {
184   - echo $OUTPUT->blocks_for_region('side-post');
185   - }
186   - ?>
187   - </div>
188   - </div>
189   - </aside>
190   - <?php if ($layout === 'pre-and-post') {
191   - ?></div></div><?php // Close row-fluid and span9.
192   - }
193   -
194   - if ($layout === 'side-post-only' OR $layout === 'pre-and-post') { ?>
195   - <aside class="span3">
196   - <div id="region-post" class="block-region">
197   - <div class="region-content">
198   - <?php if (!right_to_left()) {
199   - echo $OUTPUT->blocks_for_region('side-post');
200   - } else {
201   - echo $OUTPUT->blocks_for_region('side-pre');
202   - } ?>
  69 + <header id="page-header" class="clearfix">
  70 + <div id="page-navbar">
  71 + <nav class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></nav>
  72 + <?php echo $OUTPUT->navbar(); ?>
203 73 </div>
  74 + <?php echo $html->heading; ?>
  75 + <div id="course-header">
  76 + <?php echo $OUTPUT->course_header(); ?>
204 77 </div>
205   - </aside>
206   - <?php } ?>
207   -<?php } ?>
208   -</div>
209   -
210   -<footer id="page-footer">
211   - <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
212   -
213   - <?php
214   -if ($hasfootnote) { ?>
215   - <div class="footnote text-center">
216   - <?php echo $PAGE->theme->settings->footnote; ?>
217   - </div>
218   - <?php
219   -} ?>
  78 + </header>
  79 +
  80 + <div id="page-content" class="row-fluid">
  81 + <div id="region-bs-main-and-pre" class="span9">
  82 + <div class="row-fluid">
  83 + <section id="region-main" class="span8 pull-right">
  84 + <?php
  85 + echo $OUTPUT->course_content_header();
  86 + echo $OUTPUT->main_content();
  87 + echo $OUTPUT->course_content_footer();
  88 + ?>
  89 + </section>
  90 + <?php echo $OUTPUT->blocks('side-pre', 'span4 desktop-first-column'); ?>
  91 + </div>
  92 + </div>
  93 + <?php echo $OUTPUT->blocks('side-post', 'span3'); ?>
  94 + </div>
220 95
221   - <?php echo $OUTPUT->standard_footer_html(); ?>
222   -</footer>
  96 + <footer id="page-footer">
  97 + <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
  98 + <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
  99 + <?php
  100 + echo $html->footnote;
  101 + echo $OUTPUT->standard_footer_html();
  102 + ?>
  103 + </footer>
223 104
224   -<?php echo $OUTPUT->standard_end_of_body_html() ?>
  105 + <?php echo $OUTPUT->standard_end_of_body_html() ?>
225 106
226 107 </div>
227 108 </body>
228   -</html>
  109 +</html>
35 theme/clean/layout/embedded.php
... ... @@ -0,0 +1,35 @@
  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 +echo $OUTPUT->doctype() ?>
  18 +<html <?php echo $OUTPUT->htmlattributes(); ?>>
  19 +<head>
  20 + <title><?php echo $OUTPUT->page_title(); ?></title>
  21 + <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  22 + <?php echo $OUTPUT->standard_head_html() ?>
  23 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  24 +</head>
  25 +
  26 +<body <?php echo $OUTPUT->body_attributes(); ?>>
  27 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  28 +<div id="page">
  29 + <div id="page-content" class="clearfix">
  30 + <?php echo $OUTPUT->main_content(); ?>
  31 + </div>
  32 +</div>
  33 +<?php echo $OUTPUT->standard_end_of_body_html() ?>
  34 +</body>
  35 +</html>
70 theme/clean/layout/secure.php
... ... @@ -0,0 +1,70 @@
  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 +echo $OUTPUT->doctype() ?>
  18 +<html <?php echo $OUTPUT->htmlattributes(); ?>>
  19 +<head>
  20 + <title><?php echo $OUTPUT->page_title(); ?></title>
  21 + <link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" />
  22 + <?php echo $OUTPUT->standard_head_html() ?>
  23 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  24 +</head>
  25 +
  26 +<body <?php echo $OUTPUT->body_attributes(); ?>>
  27 +
  28 +<?php echo $OUTPUT->standard_top_of_body_html() ?>
  29 +
  30 +<header role="banner" class="navbar navbar-fixed-top">
  31 + <nav role="navigation" class="navbar-inner">
  32 + <div class="container-fluid">
  33 + <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
  34 + <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  35 + <span class="icon-bar"></span>
  36 + <span class="icon-bar"></span>
  37 + <span class="icon-bar"></span>
  38 + </a>
  39 + <div class="nav-collapse collapse">
  40 + <ul class="nav pull-right">
  41 + <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
  42 + </ul>
  43 + </div>
  44 + </div>
  45 + </nav>
  46 +</header>
  47 +
  48 +<div id="page" class="container-fluid">
  49 +
  50 + <header id="page-header" class="clearfix">
  51 + <?php echo $html->heading; ?>
  52 + </header>
  53 +
  54 + <div id="page-content" class="row-fluid">
  55 + <div id="region-bs-main-and-pre" class="span9">
  56 + <div class="row-fluid">
  57 + <section id="region-main" class="span8 pull-right">
  58 + <?php echo $OUTPUT->main_content(); ?>
  59 + </section>
  60 + <?php echo $OUTPUT->blocks('side-pre', 'span4 desktop-first-column'); ?>
  61 + </div>
  62 + </div>
  63 + <?php echo $OUTPUT->blocks('side-post', 'span3'); ?>
  64 + </div>
  65 +
  66 + <?php echo $OUTPUT->standard_end_of_body_html() ?>
  67 +
  68 +</div>
  69 +</body>
  70 +</html>
33 theme/clean/lib.php
@@ -78,3 +78,36 @@ function clean_set_customcss($css, $customcss) {
78 78
79 79 return $css;
80 80 }
  81 +
  82 +/**
  83 + * Returns an object containing HTML for the areas affected by settings.
  84 + *
  85 + * @param renderer_base $output Pass in $OUTPUT.
  86 + * @param moodle_page $page Pass in $PAGE.
  87 + * @return stdClass An object with the following properties:
  88 + * - navbarclass A CSS class to use on the navbar. By default ''.
  89 + * - heading HTML to use for the heading. A logo if one is selected or the default heading.
  90 + * - footnote HTML to use as a footnote. By default ''.
  91 + */
  92 +function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page) {
  93 + global $CFG;
  94 + $return = new stdClass;
  95 +
  96 + $return->navbarclass = '';
  97 + if (!empty($page->theme->settings->invert)) {
  98 + $return->navbarclass .= ' navbar-inverse';
  99 + }
  100 +
  101 + if (!empty($page->theme->settings->logo)) {
  102 + $return->heading = html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
  103 + } else {
  104 + $return->heading = $output->page_heading();
  105 + }
  106 +
  107 + $return->footnote = '';
  108 + if (!empty($page->theme->settings->footnote)) {
  109 + $return->footnote = '<div class="footnote text-center">'.$page->theme->settings->footnote.'</div>';
  110 + }
  111 +
  112 + return $return;
  113 +}

0 comments on commit 8504444

Please sign in to comment.
Something went wrong with that request. Please try again.