root / htmltest / sites / all / modules / calendar / theme / calendar-day.tpl.php @ 5fc58a68
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * Template to display a view as a calendar day, grouped by time
|
||
5 | * and optionally organized into columns by a field value.
|
||
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 | <table class="full"> |
||
34 | <col width="<?php print $first_column_width?>"></col> |
||
35 | <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 | <td class="<?php print $agenda_hour_class ?>"> |
||
49 | <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 | <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : ' ';?> |
||
56 | </div>
|
||
57 | </div>
|
||
58 | </td>
|
||
59 | <?php endforeach; ?> |
||
60 | </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 | <?php endforeach; ?> |
||
75 | </tr>
|
||
76 | <?php endforeach; ?> |
||
77 | </tbody>
|
||
78 | </table>
|
||
79 | </div></div> |