Projet

Général

Profil

Révision 62e0cc08

Ajouté par Assos Assos il y a plus de 3 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/calendar/theme/calendar-week.tpl.php
1 1
<?php
2

  
2 3
/**
3 4
 * @file
4 5
 * Template to display a view as a calendar week.
5
 * 
6
 *
6 7
 * @see template_preprocess_calendar_week.
7 8
 *
8 9
 * $day_names: An array of the day of week names for the table header.
9 10
 * $rows: The rendered data for this week.
10
 * 
11
 *
11 12
 * For each day of the week, you have:
12 13
 * $rows['date'] - the date for this day, formatted as YYYY-MM-DD.
13 14
 * $rows['datebox'] - the formatted datebox for this day.
......
17 18
 * $rows['items'][$time_period]['hour'] - the formatted hour for a time period.
18 19
 * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period.
19 20
 * $rows['items'][$time_period]['values'] - An array of formatted items for a time period.
20
 * 
21
 *
21 22
 * $view: The view.
22 23
 * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
23 24
 * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
24
 * 
25 25
 */
26
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
27
//dsm($rows);
28
//dsm($items);
29 26
$index = 0;
30 27
$header_ids = array();
31 28
foreach ($day_names as $key => $value) {
......
36 33
<table class="full">
37 34
  <thead>
38 35
    <tr>
39
      <?php if($by_hour_count > 0 || !empty($start_times)) :?>
40
      <th class="calendar-agenda-hour"><?php print t('Time')?></th>
41
      <?php endif;?>
36
      <?php if ($by_hour_count > 0 || !empty($start_times)): ?>
37
        <th class="calendar-agenda-hour"><?php print t('Time'); ?></th>
38
      <?php endif; ?>
42 39
      <?php foreach ($day_names as $cell): ?>
43 40
        <th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id']; ?>">
44 41
          <?php print $cell['data']; ?>
......
48 45
  </thead>
49 46
  <tbody>
50 47
    <?php for ($i = 0; $i < $multiday_rows; $i++): ?>
51
    <?php 
52
      $colpos = 0; 
48
    <?php
49
      $colpos = 0;
53 50
      $rowclass = "all-day";
54
      if( $i == 0) {
51
      if ($i == 0) {
55 52
        $rowclass .= " first";
56 53
      }
57
      if( $i == $multiday_rows - 1) {
54
      if ($i == $multiday_rows - 1) {
58 55
        $rowclass .= " last";
59 56
      }
60 57
    ?>
61
    <tr class="<?php print $rowclass?>">
62
      <?php if($i == 0 && ($by_hour_count > 0 || !empty($start_times))) :?>
63
      <td class="<?php print $agenda_hour_class ?>" rowspan="<?php print $multiday_rows?>">
64
        <span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime'))?></span>
58
    <tr class="<?php print $rowclass; ?>">
59
      <?php if ($i == 0 && ($by_hour_count > 0 || !empty($start_times))): ?>
60
      <td class="<?php print $agenda_hour_class; ?>" rowspan="<?php print $multiday_rows; ?>">
61
        <span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime')); ?></span>
65 62
      </td>
66 63
      <?php endif; ?>
67
      <?php for($j = 0; $j < 6; $j++): ?>
64
      <?php for ($j = 0; $j < 6; $j++): ?>
68 65
        <?php $cell = (empty($all_day[$j][$i])) ? NULL : $all_day[$j][$i]; ?>
69
        <?php if($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
70
          <?php for($k = $colpos; $k < $cell['wday']; $k++) : ?>
71
          <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
72
          <?php endfor;?>
73
          <td colspan="<?php print $cell['colspan']?>" class="multi-day">
66
        <?php if ($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
67
          <?php for ($k = $colpos; $k < $cell['wday']; $k++): ?>
68
            <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
69
          <?php endfor; ?>
70
          <td colspan="<?php print $cell['colspan']; ?>" class="multi-day">
74 71
            <div class="inner">
75
            <?php print $cell['entry']?>
72
              <?php print $cell['entry']; ?>
76 73
            </div>
77 74
          </td>
78 75
          <?php $colpos = $cell['wday'] + $cell['colspan']; ?>
79 76
        <?php endif; ?>
80
      <?php endfor; ?>  
81
      <?php for($j = $colpos; $j < 7; $j++) : ?>
82
      <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
83
      <?php endfor;?>
77
      <?php endfor; ?>
78
      <?php for ($j = $colpos; $j < 7; $j++): ?>
79
        <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
80
      <?php endfor; ?>
84 81
    </tr>
85
    <?php endfor; ?>  
82
    <?php endfor; ?>
86 83
    <?php foreach ($items as $time): ?>
87 84
    <tr class="not-all-day">
88 85
      <td class="calendar-agenda-hour">
......
94 91
        <?php for ($i = $curpos; $i < $colpos; $i++): ?>
95 92
        <td class="calendar-agenda-items single-day">
96 93
          <div class="calendar">
97
            <div class="inner">&nbsp</div>
94
            <div class="inner">&nbsp;</div>
98 95
          </div>
99 96
        </td>
100
        <?php endfor; ?>   
101
        <?php $curpos = $colpos + 1;?>
102
        <td class="calendar-agenda-items single-day" headers="<?php print $header_ids[$index] ?>">
97
        <?php endfor; ?>
98
        <?php $curpos = $colpos + 1; ?>
99
        <td class="calendar-agenda-items single-day" headers="<?php print $header_ids[$index]; ?>">
103 100
          <div class="calendar">
104 101
          <div class="inner">
105
            <?php if(!empty($time['values'][$column])) :?>
106
              <?php foreach($time['values'][$column] as $item) :?>
107
                <?php print $item['entry'] ?>
102
            <?php if (!empty($time['values'][$column])): ?>
103
              <?php foreach ($time['values'][$column] as $item): ?>
104
                <?php print $item['entry']; ?>
108 105
              <?php endforeach; ?>
109 106
            <?php endif; ?>
110 107
          </div>
111 108
          </div>
112 109
        </td>
113
      <?php endforeach; ?>   
110
      <?php endforeach; ?>
114 111
      <?php for ($i = $curpos; $i < 7; $i++): ?>
115 112
        <td class="calendar-agenda-items single-day">
116 113
          <div class="calendar">
117
            <div class="inner">&nbsp</div>
114
            <div class="inner">&nbsp;</div>
118 115
          </div>
119 116
        </td>
120
      <?php endfor; ?>   
117
      <?php endfor; ?>
121 118
    </tr>
122
   <?php endforeach; ?>   
119
    <?php endforeach; ?>
123 120
  </tbody>
124 121
</table>
125 122
</div></div>

Formats disponibles : Unified diff