| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: calendar-day.tpl.php,v 1.7.2.10 2010/11/21 13:19:37 karens Exp $ 3 /** 4 * @file 5 * Template to display a view as a calendar day, grouped by time 6 * and optionally organized into columns by a field value. 7 * 8 * @see template_preprocess_calendar_day. 9 * 10 * $rows: The rendered data for this day. 11 * $rows['date'] - the date for this day, formatted as YYYY-MM-DD. 12 * $rows['datebox'] - the formatted datebox for this day. 13 * $rows['empty'] - empty text for this day, if no items were found. 14 * $rows['all_day'] - an array of formatted all day items. 15 * $rows['items'] - an array of timed items for the day. 16 * $rows['items'][$time_period]['hour'] - the formatted hour for a time period. 17 * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period. 18 * $rows['items'][$time_period][$column]['values'] - An array of formatted 19 * items for a time period and field column. 20 * 21 * $view: The view. 22 * $columns: an array of column names. 23 * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS. 24 * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS. 25 * 26 * The width of the columns is dynamically set using <col></col> 27 * based on the number of columns presented. The values passed in will 28 * work to set the 'hour' column to 10% and split the remaining columns 29 * evenly over the remaining 90% of the table. 30 */ 31 //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted); 32 ?> 33 <div class="calendar-calendar"><div class="day-view"> 34 <table> 35 <col width="<?php print $first_column_width?>"></col> 36 <?php foreach ($columns as $column): ?> 37 <col width="<?php print $column_width; ?>%"></col> 38 <?php endforeach; ?> 39 <thead> 40 <tr> 41 <th class="calendar-dayview-hour"><?php print $by_hour_count > 0 ? t('Time') : ''; ?></th> 42 <?php foreach ($columns as $column): ?> 43 <th class="calendar-agenda-items"><?php print $column; ?></th> 44 <?php endforeach; ?> 45 </tr> 46 </thead> 47 <tbody> 48 <tr> 49 <td class="<?php print $agenda_hour_class ?>"> 50 <span class="calendar-hour"><?php print $by_hour_count > 0 ? date_t('All day', 'datetime') : ''; ?></span> 51 </td> 52 <?php foreach ($columns as $column): ?> 53 <td class="calendar-agenda-items"> 54 <div class="calendar"> 55 <div class="inner"> 56 <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : ' ';?> 57 </div> 58 </div> 59 </td> 60 <?php endforeach; ?> 61 </tr> 62 <?php foreach ($rows['items'] as $hour): ?> 63 <tr> 64 <td class="calendar-agenda-hour"> 65 <span class="calendar-hour"><?php print $hour['hour']; ?></span> 66 <span class="calendar-ampm"><?php print $hour['ampm']; ?></span> 67 </td> 68 <?php foreach ($columns as $column): ?> 69 <td class="calendar-agenda-items"> 70 <div class="calendar"> 71 <div class="inner"> 72 <?php print isset($hour['values'][$column]) ? implode($hour['values'][$column]) : ' '; ?> 73 </div> 74 </div> 75 </td> 76 <?php endforeach; ?> 77 </tr> 78 <?php endforeach; ?> 79 </tbody> 80 </table> 81 </div></div>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |