Projet

Général

Profil

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

root / drupal7 / sites / all / modules / calendar / theme / calendar-item.tpl.php @ 62e0cc08

1
<?php
2

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