[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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 /** 18 * The frontpage layout for the base theme. 19 * 20 * @package theme_base 21 * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 25 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); 26 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); 27 $showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT); 28 $showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT); 29 30 $custommenu = $OUTPUT->custom_menu(); 31 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); 32 33 $bodyclasses = array(); 34 if ($showsidepre && !$showsidepost) { 35 if (!right_to_left()) { 36 $bodyclasses[] = 'side-pre-only'; 37 }else{ 38 $bodyclasses[] = 'side-post-only'; 39 } 40 } else if ($showsidepost && !$showsidepre) { 41 if (!right_to_left()) { 42 $bodyclasses[] = 'side-post-only'; 43 }else{ 44 $bodyclasses[] = 'side-pre-only'; 45 } 46 } else if (!$showsidepost && !$showsidepre) { 47 $bodyclasses[] = 'content-only'; 48 } 49 if ($hascustommenu) { 50 $bodyclasses[] = 'has_custom_menu'; 51 } 52 53 echo $OUTPUT->doctype() ?> 54 <html <?php echo $OUTPUT->htmlattributes() ?>> 55 <head> 56 <title><?php echo $PAGE->title ?></title> 57 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" /> 58 <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" /> 59 <?php echo $OUTPUT->standard_head_html() ?> 60 </head> 61 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>"> 62 <?php echo $OUTPUT->standard_top_of_body_html() ?> 63 64 <div id="page"> 65 66 <div id="page-header" class="clearfix"> 67 <h1 class="headermain"><?php echo $PAGE->heading ?></h1> 68 <div class="headermenu"><?php 69 echo $OUTPUT->user_menu(); 70 echo $OUTPUT->lang_menu(); 71 echo $PAGE->headingmenu; 72 ?></div> 73 <?php if ($hascustommenu) { ?> 74 <div id="custommenu"><?php echo $custommenu; ?></div> 75 <?php } ?> 76 </div> 77 <!-- END OF HEADER --> 78 79 <div id="page-content"> 80 <div id="region-main-box"> 81 <div id="region-post-box"> 82 83 <div id="region-main-wrap"> 84 <div id="region-main"> 85 <div class="region-content"> 86 <?php echo $OUTPUT->main_content() ?> 87 </div> 88 </div> 89 </div> 90 91 <?php if ($hassidepre OR (right_to_left() AND $hassidepost)) { ?> 92 <div id="region-pre" class="block-region"> 93 <div class="region-content"> 94 <?php 95 if (!right_to_left()) { 96 echo $OUTPUT->blocks_for_region('side-pre'); 97 } elseif ($hassidepost) { 98 echo $OUTPUT->blocks_for_region('side-post'); 99 } ?> 100 101 </div> 102 </div> 103 <?php } ?> 104 105 <?php if ($hassidepost OR (right_to_left() AND $hassidepre)) { ?> 106 <div id="region-post" class="block-region"> 107 <div class="region-content"> 108 <?php 109 if (!right_to_left()) { 110 echo $OUTPUT->blocks_for_region('side-post'); 111 } elseif ($hassidepre) { 112 echo $OUTPUT->blocks_for_region('side-pre'); 113 } ?> 114 </div> 115 </div> 116 <?php } ?> 117 118 </div> 119 </div> 120 </div> 121 122 <!-- START OF FOOTER --> 123 <div id="page-footer"> 124 <p class="helplink"> 125 <?php echo page_doc_link(get_string('moodledocslink')) ?> 126 </p> 127 128 <?php 129 echo $OUTPUT->login_info(); 130 echo $OUTPUT->home_link(); 131 echo $OUTPUT->standard_footer_html(); 132 ?> 133 </div> 134 <div class="clearfix"></div> 135 </div> 136 <?php echo $OUTPUT->standard_end_of_body_html() ?> 137 </body> 138 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |