Projet

Général

Profil

Paste
Télécharger (1,58 ko) Statistiques
| Branche: | Révision:

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

1
<?php
2

    
3
/**
4
 * @file
5
 * Template to display a view as a mini calendar month.
6
 *
7
 * @see template_preprocess_calendar_mini.
8
 *
9
 * $day_names: An array of the day of week names for the table header.
10
 * $rows: An array of data for each day of the week.
11
 * $view: The view.
12
 * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
13
 * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
14
 *
15
 * $show_title: If the title should be displayed. Normally false since the title is incorporated
16
 *   into the navigation, but sometimes needed, like in the year view of mini calendars.
17
 */
18

    
19
$params = array(
20
  'view' => $view,
21
  'granularity' => 'month',
22
  'link' => FALSE,
23
);
24
?>
25
<div class="calendar-calendar"><div class="month-view">
26
<?php if ($show_title): ?>
27
<div class="date-nav-wrapper clear-block">
28
  <div class="date-nav">
29
    <div class="date-heading">
30
      <?php print theme('date_nav_title', $params); ?>
31
    </div>
32
  </div>
33
</div>
34
<?php endif; ?>
35
<table class="mini">
36
  <thead>
37
    <tr>
38
      <?php foreach ($day_names as $cell): ?>
39
        <th class="<?php print $cell['class']; ?>">
40
          <?php print $cell['data']; ?>
41
        </th>
42
      <?php endforeach; ?>
43
    </tr>
44
  </thead>
45
  <tbody>
46
    <?php foreach ((array) $rows as $row): ?>
47
      <tr>
48
        <?php foreach ($row as $cell): ?>
49
          <td id="<?php print $cell['id']; ?>" class="<?php print $cell['class']; ?>">
50
            <?php print $cell['data']; ?>
51
          </td>
52
        <?php endforeach; ?>
53
      </tr>
54
    <?php endforeach; ?>
55
  </tbody>
56
</table>
57
</div></div>