calendar-item.tpl.php in Calendar 7.3
2 theme calls to calendar-item.tpl.php
- calendar_plugin_style::calendar_build_week_day in includes/
calendar_plugin_style.inc - Build the contents of a single day for the $rows results.
- template_preprocess_calendar_day in theme/
theme.inc - Display a day view.
File
theme/calendar-item.tpl.phpView source
<?php
/**
* @file
* Template to display view fields as a calendar item.
*
* $item
* A result object for this calendar item. Note this is
* not a complete entity. It will contain various
* values as added by the row plugin, which may depend
* on the entity type.
*
* $rendered_fields
* An array of the rendered html for the fields in the item,
* as generated by Views. This does not include excluded
* fields and should take into account any special processing
* added in the field settings.
*
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
* one day, it has been broken apart into separate items for each calendar
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
*
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
* fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
*
* You can use PHP date functions on the date object to display date
* information in other ways, like:
*
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
*
* @see template_preprocess_calendar_item.
*/
$index = 0;
?>
<div class="<?php
print !empty($item->class) ? $item->class : 'item';
?>">
<div class="view-item view-item-<?php
print $view->name;
?> <?php
print $item->classCustom;
?>">
<div class="calendar <?php
print $item->granularity;
?>view">
<?php
print theme('calendar_stripe_stripe', array(
'item' => $item,
));
?>
<div class="<?php
print $item->date_id;
?> contents">
<?php
foreach ($rendered_fields as $field) {
?>
<?php
if ($index++ == 0 && (isset($item->continuation) && $item->continuation)) {
?>
<div class="continuation">«</div>
<?php
}
?>
<?php
print $field;
?>
<?php
}
?>
</div>
<?php
if (isset($item->continues) && $item->continues) {
?>
<div class="continues">»</div>
<?php
}
else {
?>
<div class="cutoff"> </div>
<?php
}
?>
</div>
</div>
</div>