MDL-33118 theme_mymobile: changed MAIN_CONTENT_TOKEN in layout/embedded.php to new...
[moodle.git] / theme / mymobile / layout / embedded.php
blob172bc3dcdaa5082da57b06a4a2546ea8103ee76c
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.
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/>.
17 /**
18 * Embedded layout for the mymobile theme
20 * @package theme
21 * @subpackage mymobile
22 * @copyright John Stabinger
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 if (!empty($PAGE->theme->settings->colourswatch)) {
27 $showswatch = $PAGE->theme->settings->colourswatch;
28 } else {
29 $showswatch = "light";
31 if ($showswatch == "light") {
32 $datatheme = 'b';
33 $databodytheme = 'd';
34 } else {
35 $datatheme = 'a';
36 $databodytheme = 'c';
38 $mypagetype = $PAGE->pagetype;
40 echo $OUTPUT->doctype() ?>
41 <html <?php echo $OUTPUT->htmlattributes() ?>>
42 <head>
43 <title><?php echo $PAGE->title ?></title>
44 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
45 <?php if ($mypagetype != 'mod-chat-gui_ajax-index') { ?>
46 <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
47 <?php } ?>
48 <?php echo $OUTPUT->standard_head_html() ?>
49 </head>
50 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
51 <?php echo $OUTPUT->standard_top_of_body_html() ?>
52 <!-- END OF HEADER -->
53 <?php if ($mypagetype == 'mod-chat-gui_ajax-index') { ?>
54 <div data-role="page" id="chatpage" data-fullscreen="true" data-title="<?php p($SITE->shortname) ?>">
55 <?php echo $OUTPUT->main_content(); ?>
56 <input type="button" value="back" data-role="none" id="chatback" onClick="history.back()">
57 </div>
58 <?php } else { ?>
59 <div id="content2" data-role="page" data-title="<?php p($SITE->shortname) ?>" data-theme="<?php echo $datatheme;?>">
60 <div data-role="header" data-theme="<?php echo $datatheme;?>">
61 <h1><?php echo $PAGE->heading ?>&nbsp;</h1>
62 <?php if ($mypagetype != "help") { ?>
63 <a class="ui-btn-right" data-ajax="false" data-icon="home" href="<?php p($CFG->wwwroot) ?>" data-iconpos="notext"><?php p(get_string('home')); ?></a>
64 <?php } ?>
65 </div>
66 <div data-role="content" data-theme="<?php echo $databodytheme;?>">
67 <?php echo $OUTPUT->main_content(); ?>
68 </div>
69 </div>
70 <?php } ?>
71 <!-- START OF FOOTER -->
72 <?php echo $OUTPUT->standard_end_of_body_html() ?>
73 </body>
74 </html>