[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/calendar/calendar_multiday/theme/ -> calendar-month.tpl.php (source)

   1  <?php
   2  // $Id: calendar-month.tpl.php,v 1.1.2.1 2010/11/28 23:31:28 karens Exp $
   3  /**
   4   * @file
   5   * Template to display a view as a calendar month.
   6   * 
   7   * @see template_preprocess_calendar_month.
   8   *
   9   * $day_names: An array of the day of week names for the table header.
  10   * $rows: An array of data for each day of the week.
  11   * $view: The view.
  12   * $calendar_links: Array of formatted links to other calendar displays - year, month, week, day.
  13   * $display_type: year, month, day, or week.
  14   * $block: Whether or not this calendar is in a block.
  15   * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  16   * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  17   * $date_id: a css id that is unique for this date, 
  18   *   it is in the form: calendar-nid-field_name-delta
  19   * 
  20   */
  21  //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
  22  ?>
  23  <div class="calendar-calendar"><div class="month-view">
  24  <table class="full">
  25    <thead>
  26      <tr>
  27        <?php foreach ($day_names as $cell): ?>
  28          <th class="<?php print $cell['class']; ?>">
  29            <?php print $cell['data']; ?>
  30          </th>
  31        <?php endforeach; ?>
  32      </tr>
  33    </thead>
  34    <tbody>
  35      <?php 
  36        foreach ((array) $rows as $row) {
  37          print $row['data'];
  38        } ?>
  39    </tbody>
  40  </table>
  41  </div></div>
  42  <script>
  43  try {
  44    // ie hack to make the single day row expand to available space
  45    if ($.browser.msie ) {
  46      var multiday_height = $('tr.multi-day')[0].clientHeight; // Height of a multi-day row
  47      $('tr[iehint]').each(function(index) {
  48        var iehint = this.getAttribute('iehint');
  49        // Add height of the multi day rows to the single day row - seems that 80% height works best
  50        var height = this.clientHeight + (multiday_height * .8 * iehint); 
  51        this.style.height = height + 'px';
  52      });
  53    }
  54  }catch(e){
  55    // swallow 
  56  }
  57  </script>


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7