1
|
<?php
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26
|
$index = 0;
|
27
|
$header_ids = array();
|
28
|
foreach ($day_names as $key => $value) {
|
29
|
$header_ids[$key] = $value['header_id'];
|
30
|
}
|
31
|
?>
|
32
|
<div class="calendar-calendar"><div class="week-view">
|
33
|
<table class="full">
|
34
|
<thead>
|
35
|
<tr>
|
36
|
<?php if ($by_hour_count > 0 || !empty($start_times)): ?>
|
37
|
<th class="calendar-agenda-hour"><?php print t('Time'); ?></th>
|
38
|
<?php endif; ?>
|
39
|
<?php foreach ($day_names as $cell): ?>
|
40
|
<th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id']; ?>">
|
41
|
<?php print $cell['data']; ?>
|
42
|
</th>
|
43
|
<?php endforeach; ?>
|
44
|
</tr>
|
45
|
</thead>
|
46
|
<tbody>
|
47
|
<?php for ($i = 0; $i < $multiday_rows; $i++): ?>
|
48
|
<?php
|
49
|
$colpos = 0;
|
50
|
$rowclass = "all-day";
|
51
|
if ($i == 0) {
|
52
|
$rowclass .= " first";
|
53
|
}
|
54
|
if ($i == $multiday_rows - 1) {
|
55
|
$rowclass .= " last";
|
56
|
}
|
57
|
?>
|
58
|
<tr class="<?php print $rowclass; ?>">
|
59
|
<?php if ($i == 0 && ($by_hour_count > 0 || !empty($start_times))): ?>
|
60
|
<td class="<?php print $agenda_hour_class; ?>" rowspan="<?php print $multiday_rows; ?>">
|
61
|
<span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime')); ?></span>
|
62
|
</td>
|
63
|
<?php endif; ?>
|
64
|
<?php for ($j = 0; $j < 6; $j++): ?>
|
65
|
<?php $cell = (empty($all_day[$j][$i])) ? NULL : $all_day[$j][$i]; ?>
|
66
|
<?php if ($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
|
67
|
<?php for ($k = $colpos; $k < $cell['wday']; $k++): ?>
|
68
|
<td class="multi-day no-entry"><div class="inner"> </div></td>
|
69
|
<?php endfor; ?>
|
70
|
<td colspan="<?php print $cell['colspan']; ?>" class="multi-day">
|
71
|
<div class="inner">
|
72
|
<?php print $cell['entry']; ?>
|
73
|
</div>
|
74
|
</td>
|
75
|
<?php $colpos = $cell['wday'] + $cell['colspan']; ?>
|
76
|
<?php endif; ?>
|
77
|
<?php endfor; ?>
|
78
|
<?php for ($j = $colpos; $j < 7; $j++): ?>
|
79
|
<td class="multi-day no-entry"><div class="inner"> </div></td>
|
80
|
<?php endfor; ?>
|
81
|
</tr>
|
82
|
<?php endfor; ?>
|
83
|
<?php foreach ($items as $time): ?>
|
84
|
<tr class="not-all-day">
|
85
|
<td class="calendar-agenda-hour">
|
86
|
<span class="calendar-hour"><?php print $time['hour']; ?></span><span class="calendar-ampm"><?php print $time['ampm']; ?></span>
|
87
|
</td>
|
88
|
<?php $curpos = 0; ?>
|
89
|
<?php foreach ($columns as $index => $column): ?>
|
90
|
<?php $colpos = (isset($time['values'][$column][0])) ? $time['values'][$column][0]['wday'] : $index; ?>
|
91
|
<?php for ($i = $curpos; $i < $colpos; $i++): ?>
|
92
|
<td class="calendar-agenda-items single-day">
|
93
|
<div class="calendar">
|
94
|
<div class="inner"> </div>
|
95
|
</div>
|
96
|
</td>
|
97
|
<?php endfor; ?>
|
98
|
<?php $curpos = $colpos + 1; ?>
|
99
|
<td class="calendar-agenda-items single-day" headers="<?php print $header_ids[$index]; ?>">
|
100
|
<div class="calendar">
|
101
|
<div class="inner">
|
102
|
<?php if (!empty($time['values'][$column])): ?>
|
103
|
<?php foreach ($time['values'][$column] as $item): ?>
|
104
|
<?php print $item['entry']; ?>
|
105
|
<?php endforeach; ?>
|
106
|
<?php endif; ?>
|
107
|
</div>
|
108
|
</div>
|
109
|
</td>
|
110
|
<?php endforeach; ?>
|
111
|
<?php for ($i = $curpos; $i < 7; $i++): ?>
|
112
|
<td class="calendar-agenda-items single-day">
|
113
|
<div class="calendar">
|
114
|
<div class="inner"> </div>
|
115
|
</div>
|
116
|
</td>
|
117
|
<?php endfor; ?>
|
118
|
</tr>
|
119
|
<?php endforeach; ?>
|
120
|
</tbody>
|
121
|
</table>
|
122
|
</div></div>
|