root / drupal7 / sites / all / modules / calendar / theme / calendar-day.tpl.php @ 62e0cc08
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | 62e0cc08 | Assos Assos | |
3 | 85ad3d82 | Assos Assos | /**
|
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 | 62e0cc08 | Assos Assos | *
|
8 | 85ad3d82 | Assos Assos | * @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 | 62e0cc08 | Assos Assos | * $rows['items'][$time_period][$column]['values'] - An array of formatted
|
19 | 85ad3d82 | Assos Assos | * items for a time period and field column.
|
20 | 62e0cc08 | Assos Assos | *
|
21 | 85ad3d82 | Assos Assos | * $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 | 62e0cc08 | Assos Assos | *
|
26 | * The width of the columns is dynamically set using <col></col>
|
||
27 | 85ad3d82 | Assos Assos | * based on the number of columns presented. The values passed in will
|
28 | 62e0cc08 | Assos Assos | * work to set the 'hour' column to 10% and split the remaining columns
|
29 | 85ad3d82 | Assos Assos | * evenly over the remaining 90% of the table.
|
30 | */
|
||
31 | ?>
|
||
32 | <div class="calendar-calendar"><div class="day-view"> |
||
33 | <table class="full"> |
||
34 | 62e0cc08 | Assos Assos | <col width="<?php print $first_column_width; ?>%"></col> |
35 | 85ad3d82 | Assos Assos | <thead>
|
36 | <?php foreach ($columns as $column): ?> |
||
37 | <col width="<?php print $column_width; ?>%"></col> |
||
38 | <?php endforeach; ?> |
||
39 | <tr>
|
||
40 | <th class="calendar-dayview-hour"><?php print $by_hour_count > 0 ? t('Time') : ''; ?></th> |
||
41 | <?php foreach ($columns as $column): ?> |
||
42 | <th class="calendar-agenda-items"><?php print $column; ?></th> |
||
43 | <?php endforeach; ?> |
||
44 | </tr>
|
||
45 | </thead>
|
||
46 | <tbody>
|
||
47 | <tr>
|
||
48 | 62e0cc08 | Assos Assos | <td class="<?php print $agenda_hour_class; ?>"> |
49 | 85ad3d82 | Assos Assos | <span class="calendar-hour"><?php print $by_hour_count > 0 ? t('All day', array(), array('context' => 'datetime')) : ''; ?></span> |
50 | </td>
|
||
51 | <?php foreach ($columns as $column): ?> |
||
52 | <td class="calendar-agenda-items multi-day"> |
||
53 | <div class="calendar"> |
||
54 | <div class="inner"> |
||
55 | 62e0cc08 | Assos Assos | <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : ' '; ?> |
56 | 85ad3d82 | Assos Assos | </div>
|
57 | </div>
|
||
58 | </td>
|
||
59 | 62e0cc08 | Assos Assos | <?php endforeach; ?> |
60 | 85ad3d82 | Assos Assos | </tr>
|
61 | <?php foreach ($rows['items'] as $hour): ?> |
||
62 | <tr>
|
||
63 | <td class="calendar-agenda-hour"> |
||
64 | <span class="calendar-hour"><?php print $hour['hour']; ?></span><span class="calendar-ampm"><?php print $hour['ampm']; ?></span> |
||
65 | </td>
|
||
66 | <?php foreach ($columns as $column): ?> |
||
67 | <td class="calendar-agenda-items single-day"> |
||
68 | <div class="calendar"> |
||
69 | <div class="inner"> |
||
70 | <?php print isset($hour['values'][$column]) ? implode($hour['values'][$column]) : ' '; ?> |
||
71 | </div>
|
||
72 | </div>
|
||
73 | </td>
|
||
74 | 62e0cc08 | Assos Assos | <?php endforeach; ?> |
75 | 85ad3d82 | Assos Assos | </tr>
|
76 | 62e0cc08 | Assos Assos | <?php endforeach; ?> |
77 | 85ad3d82 | Assos Assos | </tbody>
|
78 | </table>
|
||
79 | </div></div> |