Révision 62e0cc08
Ajouté par Assos Assos il y a plus de 3 ans
drupal7/sites/all/modules/calendar/theme/calendar-month.tpl.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
|
|
2 | 3 |
/** |
3 | 4 |
* @file |
4 | 5 |
* Template to display a view as a calendar month. |
5 |
*
|
|
6 |
* |
|
6 | 7 |
* @see template_preprocess_calendar_month. |
7 | 8 |
* |
8 | 9 |
* $day_names: An array of the day of week names for the table header. |
... | ... | |
13 | 14 |
* $block: Whether or not this calendar is in a block. |
14 | 15 |
* $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS. |
15 | 16 |
* $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS. |
16 |
* $date_id: a css id that is unique for this date,
|
|
17 |
* $date_id: a css id that is unique for this date, |
|
17 | 18 |
* it is in the form: calendar-nid-field_name-delta |
18 |
* |
|
19 | 19 |
*/ |
20 |
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted); |
|
21 | 20 |
?> |
22 | 21 |
<div class="calendar-calendar"><div class="month-view"> |
23 | 22 |
<table class="full"> |
24 | 23 |
<thead> |
25 | 24 |
<tr> |
26 | 25 |
<?php foreach ($day_names as $id => $cell): ?> |
27 |
<th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id'] ?>"> |
|
26 |
<th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id']; ?>">
|
|
28 | 27 |
<?php print $cell['data']; ?> |
29 | 28 |
</th> |
30 | 29 |
<?php endforeach; ?> |
31 | 30 |
</tr> |
32 | 31 |
</thead> |
33 | 32 |
<tbody> |
34 |
<?php
|
|
33 |
<?php |
|
35 | 34 |
foreach ((array) $rows as $row) { |
36 | 35 |
print $row['data']; |
37 | 36 |
} ?> |
... | ... | |
41 | 40 |
<script> |
42 | 41 |
try { |
43 | 42 |
// ie hack to make the single day row expand to available space |
44 |
if ($.browser.msie ) {
|
|
43 |
if ($.browser.msie) { |
|
45 | 44 |
var multiday_height = $('tr.multi-day')[0].clientHeight; // Height of a multi-day row |
46 | 45 |
$('tr[iehint]').each(function(index) { |
47 | 46 |
var iehint = this.getAttribute('iehint'); |
48 | 47 |
// Add height of the multi day rows to the single day row - seems that 80% height works best |
49 |
var height = this.clientHeight + (multiday_height * .8 * iehint);
|
|
48 |
var height = this.clientHeight + (multiday_height * .8 * iehint); |
|
50 | 49 |
this.style.height = height + 'px'; |
51 | 50 |
}); |
52 | 51 |
} |
53 | 52 |
}catch(e){ |
54 |
// swallow
|
|
53 |
// swallow |
|
55 | 54 |
} |
56 |
</script> |
|
55 |
</script> |
Formats disponibles : Unified diff
Weekly update of contrib modules