root / drupal7 / sites / all / modules / calendar / theme / calendar-month.tpl.php @ 13755f8d
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * Template to display a view as a calendar month.
|
||
5 | *
|
||
6 | * @see template_preprocess_calendar_month.
|
||
7 | *
|
||
8 | * $day_names: An array of the day of week names for the table header.
|
||
9 | * $rows: An array of data for each day of the week.
|
||
10 | * $view: The view.
|
||
11 | * $calendar_links: Array of formatted links to other calendar displays - year, month, week, day.
|
||
12 | * $display_type: year, month, day, or week.
|
||
13 | * $block: Whether or not this calendar is in a block.
|
||
14 | * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
|
||
15 | * $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 | * it is in the form: calendar-nid-field_name-delta
|
||
18 | *
|
||
19 | */
|
||
20 | //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
|
||
21 | ?>
|
||
22 | <div class="calendar-calendar"><div class="month-view"> |
||
23 | <table class="full"> |
||
24 | <thead>
|
||
25 | <tr>
|
||
26 | <?php foreach ($day_names as $id => $cell): ?> |
||
27 | <th class="<?php print $cell['class']; ?>" id="<?php print $cell['header_id'] ?>"> |
||
28 | <?php print $cell['data']; ?> |
||
29 | </th>
|
||
30 | <?php endforeach; ?> |
||
31 | </tr>
|
||
32 | </thead>
|
||
33 | <tbody>
|
||
34 | <?php
|
||
35 | foreach ((array) $rows as $row) { |
||
36 | print $row['data']; |
||
37 | } ?>
|
||
38 | </tbody>
|
||
39 | </table>
|
||
40 | </div></div> |
||
41 | <script>
|
||
42 | try {
|
||
43 | // ie hack to make the single day row expand to available space
|
||
44 | if ($.browser.msie ) {
|
||
45 | var multiday_height = $('tr.multi-day')[0].clientHeight; // Height of a multi-day row
|
||
46 | $('tr[iehint]').each(function(index) {
|
||
47 | var iehint = this.getAttribute('iehint');
|
||
48 | // 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);
|
||
50 | this.style.height = height + 'px';
|
||
51 | });
|
||
52 | }
|
||
53 | }catch(e){
|
||
54 | // swallow
|
||
55 | }
|
||
56 | </script> |