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