MDL-31484 backup - repeated restores with anonymised users now works correctly
[moodle.git] / theme / mymobile / layout / embedded.php
blob7212b70008afe5fb282562ee244acd33c656c7c5
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 $bodyclasses = array();
39 $mypagetype = $PAGE->pagetype;
41 echo $OUTPUT->doctype() ?>
42 <html id="mymobile" <?php echo $OUTPUT->htmlattributes() ?>>
43 <head>
44 <title><?php echo $PAGE->title ?></title>
45 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
46 <?php if ($mypagetype != 'mod-chat-gui_ajax-index') { ?>
47 <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
48 <?php } ?>
49 <?php echo $OUTPUT->standard_head_html() ?>
50 </head>
51 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
52 <?php echo $OUTPUT->standard_top_of_body_html() ?>
53 <!-- END OF HEADER -->
54 <?php if ($mypagetype == 'mod-chat-gui_ajax-index') { ?>
55 <div data-role="page" id="chatpage" data-fullscreen="true" data-title="<?php p($SITE->shortname) ?>">
56 <?php echo $OUTPUT->main_content(); ?>
57 <input type="button" value="back" data-role="none" id="chatback" onClick="history.back()">
58 </div>
59 <?php } else { ?>
60 <div id="content2" data-role="page" data-title="<?php p($SITE->shortname) ?>" data-theme="<?php echo $datatheme;?>">
61 <div data-role="header" data-theme="<?php echo $datatheme;?>">
62 <h1><?php echo $PAGE->heading ?>&nbsp;</h1>
63 <?php if ($mypagetype != "help") { ?>
64 <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>
65 <?php } ?>
66 </div>
67 <div data-role="content" class="mymobilecontent" data-theme="<?php echo $databodytheme;?>">
68 <?php echo $OUTPUT->main_content(); ?>
69 </div>
70 </div>
71 <?php } ?>
72 <!-- START OF FOOTER -->
73 <?php echo $OUTPUT->standard_end_of_body_html() ?>
74 </body>
75 </html>