[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/theme/canvas/layout/ -> frontpage.php (source)

   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 Canvas theme.
  19   *
  20   * @package    theme_canvas
  21   * @copyright  2010 Patrick Malley
  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      $bodyclasses[] = 'side-pre-only';
  36  } else if ($showsidepost && !$showsidepre) {
  37      $bodyclasses[] = 'side-post-only';
  38  } else if (!$showsidepost && !$showsidepre) {
  39      $bodyclasses[] = 'content-only';
  40  }
  41  if ($hascustommenu) {
  42      $bodyclasses[] = 'has_custom_menu';
  43  }
  44  
  45  echo $OUTPUT->doctype() ?>
  46  <html <?php echo $OUTPUT->htmlattributes() ?>>
  47  <head>
  48      <title><?php echo $PAGE->title ?></title>
  49      <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  50      <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
  51      <?php echo $OUTPUT->standard_head_html() ?>
  52  </head>
  53  <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
  54  <?php echo $OUTPUT->standard_top_of_body_html() ?>
  55  
  56  <div id="page">
  57  
  58  <!-- START OF HEADER -->
  59  
  60      <div id="wrapper" class="clearfix">
  61  
  62          <div id="page-header">
  63              <div id="page-header-wrapper" class="clearfix">
  64                  <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
  65                  <div class="headermenu">
  66                      <?php
  67                          echo $OUTPUT->login_info();
  68                          echo $OUTPUT->lang_menu();
  69                          echo $PAGE->headingmenu;
  70                      ?>
  71                  </div>
  72              </div>
  73          </div>
  74  
  75          <?php if ($hascustommenu) { ?>
  76              <div id="custommenu"><?php echo $custommenu; ?></div>
  77          <?php } ?>
  78  
  79          <div class="clearer"></div> <!-- temporarily added on 06/25/10 -->
  80  
  81  <!-- END OF HEADER -->
  82  
  83  <!-- START OF CONTENT -->
  84  
  85          <div id="page-content-wrapper" class="clearfix">
  86              <div id="page-content">
  87                  <div id="region-main-box">
  88                      <div id="region-post-box">
  89  
  90                          <div id="region-main-wrap">
  91                              <div id="region-main">
  92                                  <div class="region-content">
  93                                      <?php echo $OUTPUT->main_content() ?>
  94                                  </div>
  95                              </div>
  96                          </div>
  97  
  98                          <?php if ($hassidepre) { ?>
  99                          <div id="region-pre" class="block-region">
 100                              <div class="region-content">
 101                                  <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
 102                              </div>
 103                          </div>
 104                          <?php } ?>
 105  
 106                          <?php if ($hassidepost) { ?>
 107                          <div id="region-post" class="block-region">
 108                              <div class="region-content">
 109                                  <?php echo $OUTPUT->blocks_for_region('side-post') ?>
 110                              </div>
 111                          </div>
 112                          <?php } ?>
 113  
 114                      </div>
 115                  </div>
 116              </div>
 117          </div>
 118  
 119  <!-- END OF CONTENT -->
 120  
 121  <!-- START OF FOOTER -->
 122  
 123          <div id="page-footer">
 124              <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
 125  
 126              <?php
 127                  echo $OUTPUT->login_info();
 128                  echo $OUTPUT->home_link();
 129                  echo $OUTPUT->standard_footer_html();
 130              ?>
 131          </div>
 132  
 133  <!-- END OF FOOTER -->
 134  
 135      </div> <!-- END #wrapper -->
 136  
 137  </div><!-- END #page -->
 138  
 139  <?php echo $OUTPUT->standard_end_of_body_html() ?>
 140  </body>
 141  </html>


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1