Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/nimble/layout/general.php
Go to the documentation of this file.
00001 <?php
00002 
00003 $hasheading = ($PAGE->heading);
00004 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
00005 $hasfooter = (empty($PAGE->layout_options['nofooter']));
00006 $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
00007 
00008 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
00009 
00010 $custommenu = $OUTPUT->custom_menu();
00011 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
00012 
00013 $bodyclasses = array();
00014   if ($showsidepost) {
00015     $bodyclasses[] = 'side-post-only';
00016 } else if (!$showsidepost) {
00017     $bodyclasses[] = 'content-only';
00018 }
00019 if ($hascustommenu) {
00020     $bodyclasses[] = 'has_custom_menu';
00021 }
00022 
00023 if (!empty($PAGE->theme->settings->footertext)) {
00024     $footnote = $PAGE->theme->settings->footertext;
00025 } else {
00026     $footnote = '<!-- There was no custom footnote set -->';
00027 }
00028 
00029 
00030 echo $OUTPUT->doctype() ?>
00031 <html <?php echo $OUTPUT->htmlattributes() ?>>
00032 <head>
00033     <title><?php echo $PAGE->title ?></title>
00034     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
00035     <?php echo $OUTPUT->standard_head_html() ?>
00036 </head>
00037 
00038 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
00039 <?php echo $OUTPUT->standard_top_of_body_html() ?>
00040 
00041 <div id="page">
00042 
00043         <?php if ($hasheading || $hasnavbar) { ?>
00044 
00045         <div id="page-wrap1">
00046                 <div id="page-wrap2">
00047 
00048                         <div id="wrapper" class="clearfix">
00049 
00050 <!-- START OF HEADER -->
00051 
00052                         <div id="page-header" class="inside">
00053                                         <div id="page-header-wrapper" class="wrapper clearfix">
00054 
00055                                         <?php if ($hasheading) { ?>
00056                                             <div id="headermenus" class="shrinkwrapper clearfix">
00057                                                     <?php if ($hascustommenu) { ?>
00058                                                                         <div id="custommenu"><?php echo $custommenu; ?></div>
00059                                                                 <?php } else { ?>
00060                                                                         <div id="custommenu" style="line-height:1em;">&nbsp;</div> <!-- temporary until I find a better fix -->
00061                                                                 <?php } ?>
00062 
00063                                                                 <div class="headermenu">
00064                                                                 <?php if (!empty($PAGE->layout_options['langmenu'])) {
00065                                                                 echo $OUTPUT->lang_menu();
00066                                                         }
00067                                                         echo $OUTPUT->login_info();
00068                                                         echo $PAGE->headingmenu
00069                                                             ?>
00070                                                         </div>
00071                                             </div>
00072                                     <?php } ?>
00073 
00074                                 </div>
00075                                 </div>
00076 
00077 <!-- END OF HEADER -->
00078 
00079         <?php } ?>
00080 
00081 
00082 <!-- START OF CONTENT -->
00083 
00084                 <div id="page-content-wrapper" class="shrinkwrapper clearfix">
00085                     <div id="page-content">
00086                     <div id="region-main-box">
00087                             <div id="region-post-box">
00088 
00089                             <div id="region-main-wrap">
00090                             <div id="region-main">
00091                                     <div class="region-content">
00092 
00093                                                                         <div id="region-header" class="inside clearfix">
00094                                                                     <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
00095                                                                 </div>
00096 
00097                                                             <?php if ($hasnavbar) { ?>
00098                                                                     <div class="navbar">
00099                                                                         <div class="wrapper clearfix">
00100                                                                             <div class="breadcrumb">
00101                                                                                 <?php echo $OUTPUT->navbar(); ?>
00102                                                                             </div>
00103                                                                             <div class="navbutton">
00104                                                                                 <?php echo $PAGE->button; ?>
00105                                                                             </div>
00106                                                                             </div>
00107                                                                     </div>
00108                                                                 <?php } ?>
00109 
00110                                     <?php echo $OUTPUT->main_content() ?>
00111                                         </div>
00112                                 </div>
00113                             </div>
00114 
00115                                 <?php if ($hassidepost) { ?>
00116                             <div id="region-post" class="block-region">
00117                                 <div id="region-post-wrap-1">
00118                                         <div id="region-post-wrap-2">
00119                                                     <div class="region-content">
00120                                                     <?php echo $OUTPUT->blocks_for_region('side-post') ?>
00121                                                     </div>
00122                                                 </div>
00123                                         </div>
00124                                 </div>
00125                             <?php } ?>
00126 
00127                     </div>
00128                     </div>
00129                 </div>
00130         </div>
00131 
00132 <!-- END OF CONTENT -->
00133 
00134         <?php if ($hasheading || $hasnavbar) { ?>
00135                 </div>
00136 
00137                 </div>
00138         </div>
00139 
00140 
00141         <?php } ?>
00142 
00143 <!-- START OF FOOTER -->
00144 
00145         <?php if ($hasfooter) { ?>
00146                     <div id="page-footer" class="wrapper">
00147                          <?php echo $footnote ?>
00148                         <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
00149                         <?php
00150                                 echo $OUTPUT->login_info();
00151                             echo $OUTPUT->home_link();
00152                                 echo $OUTPUT->standard_footer_html();
00153                         ?>
00154                     </div>
00155             <?php } ?>
00156 
00157 </div>
00158 <?php echo $OUTPUT->standard_end_of_body_html() ?>
00159 </body>
00160 </html>
 All Data Structures Namespaces Files Functions Variables Enumerations