[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

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

   1  <?php
   2  // $Id: calendar-day-overlap.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 day, grouped by time with overlapping items
   6   * 
   7   * @see template_preprocess_calendar_day.
   8   *
   9   * $rows: The rendered data for this day.
  10   * $rows['date'] - the date for this day, formatted as YYYY-MM-DD.
  11   * $rows['datebox'] - the formatted datebox for this day.
  12   * $rows['empty'] - empty text for this day, if no items were found.
  13   * $rows['all_day'] - an array of formatted all day items.
  14   * $rows['items'] - an array of timed items for the day.
  15   * $rows['items'][$time_period]['hour'] - the formatted hour for a time period.
  16   * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period.
  17   * $rows['items'][$time_period][$column]['values'] - An array of formatted 
  18   *   items for a time period and field column.
  19   * 
  20   * $view: The view.
  21   * $columns: an array of column names.
  22   * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  23   * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
  24   * 
  25   * The width of the columns is dynamically set using <col></col> 
  26   * based on the number of columns presented. The values passed in will
  27   * work to set the 'hour' column to 10% and split the remaining columns 
  28   * evenly over the remaining 90% of the table.
  29   */
  30  //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
  31  ?>
  32  <div class="calendar-calendar"><div class="day-view">
  33  <div id="multi-day-container">
  34    <table class="full">
  35      <tbody>
  36        <tr class="holder">
  37          <td class="calendar-time-holder"></td>
  38          <td class="calendar-day-holder"></td>
  39        </tr>
  40        <tr>
  41          <td class="<?php print $agenda_hour_class ?> first">
  42             <span class="calendar-hour"><?php print date_t('All day', 'datetime') ?></span>
  43          </td>
  44          <td class="calendar-agenda-items multi-day last">
  45            <?php foreach ($columns as $column): ?>
  46            <div class="calendar">
  47              <div class="inner">
  48               <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : '&nbsp;';?>
  49              </div>
  50            </div>
  51            <?php endforeach; ?>   
  52          </td>
  53        </tr>
  54      </tbody>
  55    </table>
  56  </div>
  57  <div class="header-body-divider">&nbsp;</div>
  58  <div id="single-day-container">
  59    <script>
  60      try {
  61          // Hide container while it renders...  Degrade w/o javascript support
  62        $('#single-day-container').css('visibility','hidden');
  63      }catch(e){ 
  64        // swallow 
  65      }
  66    </script>
  67    <table class="full">
  68      <tbody>
  69        <tr class="holder">
  70          <td class="calendar-time-holder"></td>
  71          <td class="calendar-day-holder"></td>
  72        </tr>
  73        <tr>
  74          <td class="first">
  75            <?php $is_first = TRUE; ?>
  76            <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
  77              <?php 
  78                if ($time_cnt == 0) {
  79                  $class = 'first ';
  80                }
  81                elseif ($time_cnt == count($start_times) - 1) {
  82                  $class = 'last ';
  83                }
  84                else {
  85                  $class = '';
  86                } ?>
  87              <div class="<?php print $class?>calendar-agenda-hour">
  88                <span class="calendar-hour"><?php print $hour['hour']; ?></span>
  89                <span class="calendar-ampm"><?php print $hour['ampm']; ?></span>
  90              </div>
  91            <?php endforeach; ?>   
  92          </td>
  93          <td class="last">
  94            <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
  95              <?php 
  96                if ($time_cnt == 0) {
  97                  $class = 'first ';
  98                }
  99                elseif ($time_cnt == count($start_times) - 1) {
 100                  $class = 'last ';
 101                }
 102                else {
 103                  $class = '';
 104                } ?>
 105            <div class="<?php print $class?>calendar-agenda-items single-day">
 106              <div class="half-hour">&nbsp;</div>
 107              <?php if ($is_first && isset($hour['values'][$column])) :?>
 108              <div class="calendar item-wrapper first_item">
 109              <?php $is_first = FALSE; ?>
 110              <?php else : ?>
 111              <div class="calendar item-wrapper">
 112              <?php endif; ?>
 113                <div class="inner">
 114                 <?php print isset($hour['values'][$column]) ? implode($hour['values'][$column]) : '&nbsp;'; ?>
 115                </div>
 116              </div>
 117            </div>
 118            <?php endforeach; ?>   
 119          </td>
 120        </tr>
 121      </tbody>
 122    </table>
 123  </div>
 124  <div class="single-day-footer">&nbsp;</div>
 125  </div></div>
 126  <script>
 127  try {
 128    // Size and position the viewport inline so there are no delays
 129    calendar_resizeViewport();
 130    calendar_scrollToFirst();
 131    $('#single-day-container').css('visibility','visible');
 132  }catch(e){ 
 133    // swallow 
 134  }
 135  </script>


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