1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
62e0cc08
|
Assos Assos
|
|
3 |
85ad3d82
|
Assos Assos
|
|
4 |
|
|
|
5 |
62e0cc08
|
Assos Assos
|
|
6 |
|
|
|
7 |
85ad3d82
|
Assos Assos
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
62e0cc08
|
Assos Assos
|
|
12 |
85ad3d82
|
Assos Assos
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
62e0cc08
|
Assos Assos
|
|
22 |
85ad3d82
|
Assos Assos
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
$header_ids = array();
|
27 |
|
|
foreach ($day_names as $key => $value) {
|
28 |
|
|
$header_ids[$key] = $value['header_id'];
|
29 |
|
|
}
|
30 |
|
|
?>
|
31 |
|
|
<div class="calendar-calendar"><div class="week-view">
|
32 |
|
|
<div id="header-container">
|
33 |
|
|
<table class="full">
|
34 |
|
|
<tbody>
|
35 |
|
|
<tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder margin-right"></td></tr>
|
36 |
|
|
<tr>
|
37 |
|
|
<th class="calendar-agenda-hour"> </th>
|
38 |
|
|
<?php foreach ($day_names as $cell): ?>
|
39 |
|
|
<th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id']; ?>">
|
40 |
|
|
<?php print $cell['data']; ?>
|
41 |
|
|
</th>
|
42 |
|
|
<?php endforeach; ?>
|
43 |
|
|
<th class="calendar-day-holder margin-right"></th>
|
44 |
|
|
</tr>
|
45 |
|
|
</tbody>
|
46 |
|
|
</table>
|
47 |
|
|
</div>
|
48 |
|
|
<div id="multi-day-container">
|
49 |
|
|
<table class="full">
|
50 |
|
|
<tbody>
|
51 |
|
|
<tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td></tr>
|
52 |
|
|
<?php for ($i = 0; $i < $multiday_rows; $i++): ?>
|
53 |
62e0cc08
|
Assos Assos
|
<?php
|
54 |
|
|
$colpos = 0;
|
55 |
85ad3d82
|
Assos Assos
|
$rowclass = "all-day";
|
56 |
|
|
if ($i == 0) {
|
57 |
|
|
$rowclass .= " first";
|
58 |
|
|
}
|
59 |
|
|
if ($i == $multiday_rows - 1) {
|
60 |
|
|
$rowclass .= " last";
|
61 |
|
|
}
|
62 |
|
|
?>
|
63 |
|
|
<tr class="<?php print $rowclass?>">
|
64 |
|
|
<?php if($i == 0 && ($by_hour_count > 0 || !empty($start_times))) :?>
|
65 |
|
|
<td class="<?php print $agenda_hour_class ?>" rowspan="<?php print $multiday_rows?>">
|
66 |
|
|
<span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime'))?></span>
|
67 |
|
|
</td>
|
68 |
|
|
<?php endif; ?>
|
69 |
|
|
<?php for($j = 0; $j < 7; $j++): ?>
|
70 |
|
|
<?php $cell = (empty($all_day[$j][$i])) ? NULL : $all_day[$j][$i]; ?>
|
71 |
|
|
<?php if($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
|
72 |
|
|
<?php for($colpos; $colpos < $cell['wday']; $colpos++) : ?>
|
73 |
62e0cc08
|
Assos Assos
|
<?php
|
74 |
85ad3d82
|
Assos Assos
|
$colclass = "calendar-agenda-items multi-day";
|
75 |
|
|
if ($colpos == 0) {
|
76 |
|
|
$colclass .= " first";
|
77 |
|
|
}
|
78 |
|
|
if ($colpos == 6) {
|
79 |
|
|
$colclass .= " last";
|
80 |
|
|
}
|
81 |
|
|
?>
|
82 |
|
|
<td class="<?php print $colclass?>"><div class="inner"> </div></td>
|
83 |
|
|
<?php endfor;?>
|
84 |
62e0cc08
|
Assos Assos
|
<?php
|
85 |
85ad3d82
|
Assos Assos
|
$colclass = "calendar-agenda-items multi-day";
|
86 |
|
|
if ($colpos == 0) {
|
87 |
|
|
$colclass .= " first";
|
88 |
|
|
}
|
89 |
|
|
if ($colpos == 6) {
|
90 |
|
|
$colclass .= " last";
|
91 |
|
|
}
|
92 |
|
|
?>
|
93 |
|
|
<td colspan="<?php print $cell['colspan']?>" class="<?php print $colclass?>">
|
94 |
|
|
<div class="inner">
|
95 |
|
|
<?php print $cell['entry']?>
|
96 |
|
|
</div>
|
97 |
|
|
</td>
|
98 |
|
|
<?php $colpos += $cell['colspan']; ?>
|
99 |
|
|
<?php endif; ?>
|
100 |
62e0cc08
|
Assos Assos
|
<?php endfor; ?>
|
101 |
85ad3d82
|
Assos Assos
|
<?php while($colpos < 7) : ?>
|
102 |
62e0cc08
|
Assos Assos
|
<?php
|
103 |
85ad3d82
|
Assos Assos
|
$colclass = "calendar-agenda-items multi-day no-entry";
|
104 |
|
|
if ($colpos == 0) {
|
105 |
|
|
$colclass .= " first";
|
106 |
|
|
}
|
107 |
|
|
if ($colpos == 6) {
|
108 |
|
|
$colclass .= " last";
|
109 |
|
|
}
|
110 |
|
|
?>
|
111 |
|
|
<td class="<?php print $colclass?>"><div class="inner"> </div></td>
|
112 |
|
|
<?php $colpos++; ?>
|
113 |
|
|
<?php endwhile;?>
|
114 |
|
|
</tr>
|
115 |
|
|
<?php endfor; ?>
|
116 |
|
|
<?php if ($multiday_rows == 0) :?>
|
117 |
|
|
<tr>
|
118 |
|
|
<td class="<?php print $agenda_hour_class ?>">
|
119 |
|
|
<span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime'))?></span>
|
120 |
|
|
</td>
|
121 |
|
|
<?php for($j = 0; $j < 7; $j++): ?>
|
122 |
62e0cc08
|
Assos Assos
|
<?php
|
123 |
85ad3d82
|
Assos Assos
|
$colclass = "calendar-agenda-items multi-day no-entry";
|
124 |
|
|
if ($j == 0) {
|
125 |
|
|
$colclass .= " first";
|
126 |
|
|
}
|
127 |
|
|
if ($j == 6) {
|
128 |
|
|
$colclass .= " last";
|
129 |
|
|
}
|
130 |
|
|
?>
|
131 |
|
|
<td class="<?php print $colclass?>"><div class="inner"> </div></td>
|
132 |
|
|
<?php endfor; ?>
|
133 |
|
|
</tr>
|
134 |
|
|
<?php endif; ?>
|
135 |
|
|
<tr class="expand">
|
136 |
|
|
<td class="<?php print $agenda_hour_class ?>">
|
137 |
|
|
<span class="calendar-hour"> </span>
|
138 |
|
|
</td>
|
139 |
|
|
<?php for($j = 0; $j < 7; $j++): ?>
|
140 |
62e0cc08
|
Assos Assos
|
<?php
|
141 |
85ad3d82
|
Assos Assos
|
$colclass = "calendar-agenda-items multi-day no-entry";
|
142 |
|
|
if ($j == 0) {
|
143 |
|
|
$colclass .= " first";
|
144 |
|
|
}
|
145 |
|
|
if ($j == 6) {
|
146 |
|
|
$colclass .= " last";
|
147 |
|
|
}
|
148 |
|
|
?>
|
149 |
62e0cc08
|
Assos Assos
|
<td class="<?php print $colclass; ?>"><div class="inner"> </div></td>
|
150 |
85ad3d82
|
Assos Assos
|
<?php endfor; ?>
|
151 |
|
|
</tr>
|
152 |
62e0cc08
|
Assos Assos
|
</tbody>
|
153 |
85ad3d82
|
Assos Assos
|
</table>
|
154 |
|
|
</div>
|
155 |
|
|
<div class="header-body-divider"> </div>
|
156 |
|
|
<div id="single-day-container">
|
157 |
62e0cc08
|
Assos Assos
|
<?php if (!empty($scroll_content)): ?>
|
158 |
85ad3d82
|
Assos Assos
|
<script>
|
159 |
|
|
try {
|
160 |
|
|
|
161 |
|
|
jQuery('#single-day-container').css('visibility','hidden');
|
162 |
62e0cc08
|
Assos Assos
|
}catch(e){
|
163 |
|
|
|
164 |
85ad3d82
|
Assos Assos
|
}
|
165 |
|
|
</script>
|
166 |
|
|
<?php endif; ?>
|
167 |
|
|
<table class="full">
|
168 |
|
|
<tbody>
|
169 |
|
|
<tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td></tr>
|
170 |
|
|
<tr>
|
171 |
|
|
<?php for ($index = 0; $index < 8; $index++): ?>
|
172 |
62e0cc08
|
Assos Assos
|
<?php if ($index == 0): ?>
|
173 |
85ad3d82
|
Assos Assos
|
<td class="first" headers="<?php print $header_ids[$index]; ?>">
|
174 |
62e0cc08
|
Assos Assos
|
<?php elseif ($index == 7) : ?>
|
175 |
|
|
<td class="last">
|
176 |
85ad3d82
|
Assos Assos
|
<?php else : ?>
|
177 |
|
|
<td headers="<?php print $header_ids[$index]; ?>">
|
178 |
|
|
<?php endif; ?>
|
179 |
|
|
<?php foreach ($start_times as $time_cnt => $start_time): ?>
|
180 |
62e0cc08
|
Assos Assos
|
<?php
|
181 |
85ad3d82
|
Assos Assos
|
if ($time_cnt == 0) {
|
182 |
|
|
$class = 'first ';
|
183 |
|
|
}
|
184 |
|
|
elseif ($time_cnt == count($start_times) - 1) {
|
185 |
|
|
$class = 'last ';
|
186 |
|
|
}
|
187 |
|
|
else {
|
188 |
|
|
$class = '';
|
189 |
|
|
} ?>
|
190 |
62e0cc08
|
Assos Assos
|
<?php if ($index == 0): ?>
|
191 |
|
|
<?php $time = $items[$start_time]; ?>
|
192 |
|
|
<div class="<?php print $class; ?>calendar-agenda-hour">
|
193 |
85ad3d82
|
Assos Assos
|
<span class="calendar-hour"><?php print $time['hour']; ?></span><span class="calendar-ampm"><?php print $time['ampm']; ?></span>
|
194 |
|
|
</div>
|
195 |
|
|
<?php else: ?>
|
196 |
62e0cc08
|
Assos Assos
|
<div class="<?php print $class; ?>calendar-agenda-items single-day">
|
197 |
85ad3d82
|
Assos Assos
|
<div class="half-hour"> </div>
|
198 |
|
|
<div class="calendar item-wrapper">
|
199 |
|
|
<div class="inner">
|
200 |
62e0cc08
|
Assos Assos
|
<?php if (!empty($items[$start_time]['values'][$index - 1])): ?>
|
201 |
|
|
<?php foreach ($items[$start_time]['values'][$index - 1] as $item): ?>
|
202 |
|
|
<?php if (isset($item['is_first']) && $item['is_first']): ?>
|
203 |
|
|
<div class="item <?php print $item['class']; ?> first_item">
|
204 |
|
|
<?php else: ?>
|
205 |
|
|
<div class="item <?php print $item['class']; ?>">
|
206 |
85ad3d82
|
Assos Assos
|
<?php endif; ?>
|
207 |
62e0cc08
|
Assos Assos
|
<?php print $item['entry']; ?>
|
208 |
85ad3d82
|
Assos Assos
|
</div>
|
209 |
|
|
<?php endforeach; ?>
|
210 |
|
|
<?php endif; ?>
|
211 |
|
|
</div>
|
212 |
|
|
</div>
|
213 |
|
|
</div>
|
214 |
|
|
<?php endif; ?>
|
215 |
62e0cc08
|
Assos Assos
|
<?php endforeach; ?>
|
216 |
85ad3d82
|
Assos Assos
|
</td>
|
217 |
62e0cc08
|
Assos Assos
|
<?php endfor; ?>
|
218 |
85ad3d82
|
Assos Assos
|
</tr>
|
219 |
|
|
</tbody>
|
220 |
|
|
</table>
|
221 |
|
|
</div>
|
222 |
|
|
<div class="single-day-footer"> </div>
|
223 |
|
|
</div></div>
|
224 |
62e0cc08
|
Assos Assos
|
<?php if (!empty($scroll_content)): ?>
|
225 |
85ad3d82
|
Assos Assos
|
<script>
|
226 |
|
|
try {
|
227 |
|
|
|
228 |
|
|
calendar_resizeViewport(jQuery);
|
229 |
|
|
calendar_scrollToFirst(jQuery);
|
230 |
|
|
|
231 |
|
|
|
232 |
|
|
jQuery('#single-day-container').css('visibility','visible');
|
233 |
62e0cc08
|
Assos Assos
|
}catch(e){
|
234 |
|
|
|
235 |
85ad3d82
|
Assos Assos
|
}
|
236 |
|
|
</script>
|
237 |
62e0cc08
|
Assos Assos
|
<?php endif; ?> |