calendar-week.tpl.php in Calendar 7.3
File
theme/calendar-week.tpl.php
View source
<?php
$index = 0;
$header_ids = array();
foreach ($day_names as $key => $value) {
$header_ids[$key] = $value['header_id'];
}
?>
<div class="calendar-calendar"><div class="week-view">
<table class="full">
<thead>
<tr>
<?php
if ($by_hour_count > 0 || !empty($start_times)) {
?>
<th class="calendar-agenda-hour"><?php
print t('Time');
?></th>
<?php
}
?>
<?php
foreach ($day_names as $cell) {
?>
<th class="<?php
print $cell['class'];
?>" id="<?php
print $cell['header_id'];
?>">
<?php
print $cell['data'];
?>
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < $multiday_rows; $i++) {
?>
<?php
$colpos = 0;
$rowclass = "all-day";
if ($i == 0) {
$rowclass .= " first";
}
if ($i == $multiday_rows - 1) {
$rowclass .= " last";
}
?>
<tr class="<?php
print $rowclass;
?>">
<?php
if ($i == 0 && ($by_hour_count > 0 || !empty($start_times))) {
?>
<td class="<?php
print $agenda_hour_class;
?>" rowspan="<?php
print $multiday_rows;
?>">
<span class="calendar-hour"><?php
print t('All day', array(), array(
'context' => 'datetime',
));
?></span>
</td>
<?php
}
?>
<?php
for ($j = 0; $j < 6; $j++) {
?>
<?php
$cell = empty($all_day[$j][$i]) ? NULL : $all_day[$j][$i];
?>
<?php
if ($cell != NULL && $cell['filled'] && $cell['wday'] == $j) {
?>
<?php
for ($k = $colpos; $k < $cell['wday']; $k++) {
?>
<td class="multi-day no-entry"><div class="inner"> </div></td>
<?php
}
?>
<td colspan="<?php
print $cell['colspan'];
?>" class="multi-day">
<div class="inner">
<?php
print $cell['entry'];
?>
</div>
</td>
<?php
$colpos = $cell['wday'] + $cell['colspan'];
?>
<?php
}
?>
<?php
}
?>
<?php
for ($j = $colpos; $j < 7; $j++) {
?>
<td class="multi-day no-entry"><div class="inner"> </div></td>
<?php
}
?>
</tr>
<?php
}
?>
<?php
foreach ($items as $time) {
?>
<tr class="not-all-day">
<td class="calendar-agenda-hour">
<span class="calendar-hour"><?php
print $time['hour'];
?></span><span class="calendar-ampm"><?php
print $time['ampm'];
?></span>
</td>
<?php
$curpos = 0;
?>
<?php
foreach ($columns as $index => $column) {
?>
<?php
$colpos = isset($time['values'][$column][0]) ? $time['values'][$column][0]['wday'] : $index;
?>
<?php
for ($i = $curpos; $i < $colpos; $i++) {
?>
<td class="calendar-agenda-items single-day">
<div class="calendar">
<div class="inner"> </div>
</div>
</td>
<?php
}
?>
<?php
$curpos = $colpos + 1;
?>
<td class="calendar-agenda-items single-day" headers="<?php
print $header_ids[$index];
?>">
<div class="calendar">
<div class="inner">
<?php
if (!empty($time['values'][$column])) {
?>
<?php
foreach ($time['values'][$column] as $item) {
?>
<?php
print $item['entry'];
?>
<?php
}
?>
<?php
}
?>
</div>
</div>
</td>
<?php
}
?>
<?php
for ($i = $curpos; $i < 7; $i++) {
?>
<td class="calendar-agenda-items single-day">
<div class="calendar">
<div class="inner"> </div>
</div>
</td>
<?php
}
?>
</tr>
<?php
}
?>
</tbody>
</table>
</div></div>