MDL-47819 user_menu: fixed showing up in popups
[moodle.git] / theme / bootstrapbase / layout / popup.php
blob7b6c00902d09f2fbca41c14d893922a1c09e45e6
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 * A popup layout for the Bootstrapbase theme.
20 * @package theme_bootstrapbase
21 * @copyright 2012 Bas Brands, www.basbrands.nl
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
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 $OUTPUT->standard_head_html() ?>
31 <meta name="viewport" content="width=device-width, initial-scale=1.0">
32 </head>
34 <body <?php echo $OUTPUT->body_attributes(); ?>>
36 <?php echo $OUTPUT->standard_top_of_body_html() ?>
38 <?php
39 // If on desktop, then hide the header/footer.
40 $hideclass = '';
41 $devicetype = core_useragent::get_device_type();
42 if($devicetype !== 'mobile' and $devicetype !== 'tablet') {
43 // We can not use the Bootstrap responsive css classes because popups are phone sized on desktop.
44 $hideclass = 'hide';
48 <header role="banner" class="navbar navbar-fixed-top moodle-has-zindex <?php echo $hideclass; ?>">
49 <nav role="navigation" class="navbar-inner">
50 <div class="container-fluid">
51 <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo
52 format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID)));
53 ?></a>
54 <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
55 <span class="icon-bar"></span>
56 <span class="icon-bar"></span>
57 <span class="icon-bar"></span>
58 </a>
59 <div class="nav-collapse collapse">
60 <?php echo $OUTPUT->custom_menu(); ?>
61 <ul class="nav pull-right">
62 <li><?php echo $OUTPUT->page_heading_menu(); ?></li>
63 <li class="navbar-text"><?php echo $OUTPUT->user_menu(); ?></li>
64 </ul>
65 </div>
66 </div>
67 </nav>
68 </header>
70 <div id="page" class="container-fluid">
72 <header id="page-header" class="clearfix">
73 <div id="page-navbar" class="clearfix">
74 <nav class="breadcrumb-nav"><?php echo $OUTPUT->navbar(); ?></nav>
75 <div class="breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></div>
76 </div>
77 <?php echo $OUTPUT->page_heading(); ?>
78 <div id="course-header">
79 <?php echo $OUTPUT->course_header(); ?>
80 </div>
81 </header>
83 <div id="page-content" class="row-fluid">
84 <section id="region-main" class="span12">
85 <?php
86 echo $OUTPUT->course_content_header();
87 echo $OUTPUT->main_content();
88 echo $OUTPUT->course_content_footer();
90 </section>
91 </div>
93 <footer id="page-footer" class="<?php echo $hideclass; ?>">
94 <div id="course-footer"><?php echo $OUTPUT->course_footer(); ?></div>
95 <p class="helplink"><?php echo $OUTPUT->page_doc_link(); ?></p>
96 <?php
97 echo $OUTPUT->login_info();
98 echo $OUTPUT->home_link();
99 echo $OUTPUT->standard_footer_html();
101 </footer>
103 <?php echo $OUTPUT->standard_end_of_body_html() ?>
105 </div>
106 </body>
107 </html>