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-day-overlap.tpl.php
1 1
<?php
2

  
2 3
/**
3 4
 * @file
4
 * Template to display a view as a calendar day, grouped by time with overlapping items
5
 * 
5
 * Template to display a view as a calendar day, grouped by time with overlapping items.
6
 *
6 7
 * @see template_preprocess_calendar_day.
7 8
 *
8 9
 * $rows: The rendered data for this day.
......
13 14
 * $rows['items'] - an array of timed items for the day.
14 15
 * $rows['items'][$time_period]['hour'] - the formatted hour for a time period.
15 16
 * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period.
16
 * $rows['items'][$time_period][$column]['values'] - An array of formatted 
17
 * $rows['items'][$time_period][$column]['values'] - An array of formatted
17 18
 *   items for a time period and field column.
18
 * 
19
 *
19 20
 * $view: The view.
20 21
 * $columns: an array of column names.
21 22
 * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
22 23
 * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
23
 * 
24
 * The width of the columns is dynamically set using <col></col> 
24
 *
25
 * The width of the columns is dynamically set using <col></col>
25 26
 * based on the number of columns presented. The values passed in will
26
 * work to set the 'hour' column to 10% and split the remaining columns 
27
 * work to set the 'hour' column to 10% and split the remaining columns
27 28
 * evenly over the remaining 90% of the table.
28 29
 */
29
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
30 30
?>
31 31
<div class="calendar-calendar"><div class="day-view">
32 32
<div id="multi-day-container">
......
37 37
        <td class="calendar-day-holder"></td>
38 38
      </tr>
39 39
      <tr>
40
        <td class="<?php print $agenda_hour_class ?> first">
41
           <span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime')) ?></span>
40
        <td class="<?php print $agenda_hour_class; ?> first">
41
           <span class="calendar-hour"><?php print t('All day', array(), array('context' => 'datetime')); ?></span>
42 42
        </td>
43 43
        <td class="calendar-agenda-items multi-day last">
44 44
          <?php foreach ($columns as $column): ?>
45 45
          <div class="calendar">
46 46
            <div class="inner">
47
             <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : '&nbsp;';?>
47
              <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : '&nbsp;'; ?>
48 48
            </div>
49 49
          </div>
50
          <?php endforeach; ?>   
50
          <?php endforeach; ?>
51 51
        </td>
52 52
      </tr>
53 53
    </tbody>
......
55 55
</div>
56 56
<div class="header-body-divider">&nbsp;</div>
57 57
<div id="single-day-container">
58
  <?php if (!empty($scroll_content)) : ?>
58
  <?php if (!empty($scroll_content)): ?>
59 59
  <script>
60 60
    try {
61
  	  // Hide container while it renders...  Degrade w/o javascript support
61
        // Hide container while it renders...  Degrade w/o javascript support
62 62
      jQuery('#single-day-container').css('visibility','hidden');
63
    }catch(e){ 
64
      // swallow 
63
    }catch(e){
64
      // swallow
65 65
    }
66 66
  </script>
67 67
  <?php endif; ?>
......
75 75
        <td class="first">
76 76
          <?php $is_first = TRUE; ?>
77 77
          <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
78
            <?php 
78
            <?php
79 79
              if ($time_cnt == 0) {
80 80
                $class = 'first ';
81 81
              }
......
85 85
              else {
86 86
                $class = '';
87 87
              } ?>
88
            <div class="<?php print $class?>calendar-agenda-hour">
88
            <div class="<?php print $class; ?>calendar-agenda-hour">
89 89
              <span class="calendar-hour"><?php print $hour['hour']; ?></span><span class="calendar-ampm"><?php print $hour['ampm']; ?></span>
90 90
            </div>
91
          <?php endforeach; ?>   
91
          <?php endforeach; ?>
92 92
        </td>
93 93
        <td class="last">
94 94
          <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
95
            <?php 
95
            <?php
96 96
              if ($time_cnt == 0) {
97 97
                $class = 'first ';
98 98
              }
......
102 102
              else {
103 103
                $class = '';
104 104
              } ?>
105
          <div class="<?php print $class?>calendar-agenda-items single-day">
105
          <div class="<?php print $class; ?>calendar-agenda-items single-day">
106 106
            <div class="half-hour">&nbsp;</div>
107
            <?php if ($is_first && isset($hour['values'][$column])) :?>
107
            <?php if ($is_first && isset($hour['values'][$column])): ?>
108 108
            <div class="calendar item-wrapper first_item">
109 109
            <?php $is_first = FALSE; ?>
110
            <?php else : ?>
110
            <?php else: ?>
111 111
            <div class="calendar item-wrapper">
112 112
            <?php endif; ?>
113 113
              <div class="inner">
......
121 121
              </div>
122 122
            </div>
123 123
          </div>
124
          <?php endforeach; ?>   
124
          <?php endforeach; ?>
125 125
        </td>
126 126
      </tr>
127 127
    </tbody>
......
129 129
</div>
130 130
<div class="single-day-footer">&nbsp;</div>
131 131
</div></div>
132
<?php if (!empty($scroll_content)) : ?>
132
<?php if (!empty($scroll_content)): ?>
133 133
<script>
134 134
try {
135 135
  // Size and position the viewport inline so there are no delays
136 136
  calendar_resizeViewport(jQuery);
137 137
  calendar_scrollToFirst(jQuery);
138 138
  jQuery('#single-day-container').css('visibility','visible');
139
}catch(e){ 
140
  // swallow 
139
}catch(e){
140
  // swallow
141 141
}
142 142
</script>
143 143
<?php endif; ?>

Formats disponibles : Unified diff