| 1 |
<?php
|
| 2 |
// $Id: calendar-month-node.tpl.php,v 1.2.2.2 2008/06/20 11:19:30 karens Exp $
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Template to display a view item as a calendar month node.
|
| 6 |
*
|
| 7 |
* $node
|
| 8 |
* A node object for this calendar item. Note this is
|
| 9 |
* not a complete node object, but it will have $node->nid
|
| 10 |
* that you can use to load the full object, and
|
| 11 |
* $node->type to tell the content type of the node.
|
| 12 |
*
|
| 13 |
* $fields
|
| 14 |
* An array of information for every field selected in the 'Fields'
|
| 15 |
* section of this view, formatted as requested in the View setup.
|
| 16 |
*
|
| 17 |
* Calendar info for this individual calendar item is in local time --
|
| 18 |
* the user timezone where configurable timezones are allowed and set,
|
| 19 |
* otherwise the site timezone. If this item has extends over more than
|
| 20 |
* one day, it has been broken apart into separate nodes for each calendar
|
| 21 |
* date and calendar_start will be no earlier than the start of
|
| 22 |
* the current day and calendar_end will be no later than the end
|
| 23 |
* of the current day.
|
| 24 |
*
|
| 25 |
* $calendar_start - A formatted datetime start date for this item.
|
| 26 |
* i.e. '2008-05-12 05:26:15'.
|
| 27 |
* $calendar_end - A formatted datetime end date for this item,
|
| 28 |
* the same as the start date except for fields that have from/to
|
| 29 |
* fields defined, like Date module dates.
|
| 30 |
* $calendar_start_date - a PHP date object for the start time.
|
| 31 |
* $calendar_end_date - a PHP date object for the end time.
|
| 32 |
*
|
| 33 |
* You can use PHP date functions on the date object to display date
|
| 34 |
* information in other ways, like:
|
| 35 |
*
|
| 36 |
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
|
| 37 |
*
|
| 38 |
* @see template_preprocess_calendar_month_node.
|
| 39 |
*/
|
| 40 |
?>
|
| 41 |
|
| 42 |
<div class="view-item view-item-<?php print $view->name ?>">
|
| 43 |
<div class="calendar monthview day-event term-<?php print $node->term_data_tid; ?>" id="<?php print $node->date_id ?>">
|
| 44 |
<?php print theme('calendar_stripe_stripe', $node); ?>
|
| 45 |
<?php foreach ($fields as $field): ?>
|
| 46 |
<div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
|
| 47 |
<?php if ($field['label']): ?>
|
| 48 |
<div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
|
| 49 |
<?php endif; ?>
|
| 50 |
<?php print $field['data']; ?>
|
| 51 |
</div>
|
| 52 |
<?php endforeach; ?>
|
| 53 |
</div>
|
| 54 |
</div>
|