Projet

Général

Profil

Paste
Télécharger (2,4 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / calendar / theme / calendar-item.tpl.php @ 76df55b7

1
<?php
2
/**
3
 * @file
4
 * Template to display view fields as a calendar item.
5
 * 
6
 * $item 
7
 *   A result object for this calendar item. Note this is
8
 *   not a complete entity. It will contain various
9
 *   values as added by the row plugin, which may depend
10
 *   on the entity type.
11
 * 
12
 * $rendered_fields
13
 *   An array of the rendered html for the fields in the item,
14
 *   as generated by Views. This does not include excluded
15
 *   fields and should take into account any special processing
16
 *   added in the field settings.
17
 * 
18
 * Calendar info for this individual calendar item is in local time --
19
 * the user timezone where configurable timezones are allowed and set,
20
 * otherwise the site timezone. If this item has extends over more than
21
 * one day, it has been broken apart into separate items for each calendar
22
 * date and calendar_start will be no earlier than the start of
23
 * the current day and calendar_end will be no later than the end
24
 * of the current day.
25
 * 
26
 * $calendar_start - A formatted datetime start date for this item.
27
 *   i.e. '2008-05-12 05:26:15'.
28
 * $calendar_end - A formatted datetime end date for this item,
29
 *   the same as the start date except for fields that have from/to
30
 *   fields defined, like Date module dates. 
31
 * $calendar_start_date - a PHP date object for the start time.
32
 * $calendar_end_date - a PHP date object for the end time.
33
 * 
34
 * You can use PHP date functions on the date object to display date
35
 * information in other ways, like:
36
 * 
37
 *   print date_format($calendar_start_date, 'l, j F Y - g:ia');
38
 * 
39
 * @see template_preprocess_calendar_item.
40
 */
41
$index = 0;
42
?>
43
<div class="<?php print !empty($item->class) ? $item->class : 'item'; ?>">
44
  <div class="view-item view-item-<?php print $view->name ?>">
45
  <div class="calendar <?php print $item->granularity; ?>view">
46
    <?php print theme('calendar_stripe_stripe', array('item' => $item)); ?>
47
    <div class="<?php print $item->date_id ?> contents">
48
      <?php foreach ($rendered_fields as $field): ?>
49
        <?php if ($index++ == 0 && (isset($item->continuation) && $item->continuation)) : ?>
50
        <div class="continuation">&laquo;</div>
51
        <?php endif;?>
52
        <?php print $field; ?>
53
      <?php endforeach; ?>
54
    </div>  
55
    <?php if (isset($item->continues) && $item->continues) : ?>
56
    <div class="continues">&raquo;</div>
57
    <?php else : ?>
58
    <div class="cutoff">&nbsp;</div>
59
    <?php endif;?>
60
  </div> 
61
  </div>   
62
</div>