calendar-month.html.twig in Calendar 8
Same filename and directory in other branches
Template to display a view as a calendar month.
Available variables:
- day_names: An array of the day of week names for the table header.
- rows: An array of data for each day of the week.
- view: The view.
- calendar_links: Array of formatted links to other calendar displays - year, month, week, day.
- display_type: year, month, day, or week.
- block: Whether or not this calendar is in a block.
- min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
- max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
- date_id: a css id that is unique for this date, it is in the form: calendar-nid-field_name-delta
File
templates/calendar-month.html.twigView source
- {#
- /**
- * @file
- * Template to display a view as a calendar month.
- *
- * Available variables:
- * - day_names: An array of the day of week names for the table header.
- * - rows: An array of data for each day of the week.
- * - view: The view.
- * - calendar_links: Array of formatted links to other calendar displays - year, month, week, day.
- * - display_type: year, month, day, or week.
- * - block: Whether or not this calendar is in a block.
- * - min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
- * - max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
- * - date_id: a css id that is unique for this date, it is in the form: calendar-nid-field_name-delta
- *
- * @ingroup themeable
- */
- #}
- <div class="calendar-calendar"><div class="month-view">
- <table class="full">
- <thead>
- <tr>
- {% for cell in day_names %}
- <th class="{{ cell.class }}" id="{{ cell.header_id }}">
- {{ cell.data }}
- </th>
- {% endfor %}
- </tr>
- </thead>
- <tbody>
- {% for row in rows %}
- {{ row.data }}
- {% endfor %}
- </tbody>
- </table>
- </div></div>
- <!--
- todo decide what we will do with this.
- <script>
- try {
- // ie hack to make the single day row expand to available space
- if ($.browser.msie ) {
- var multiday_height = $('tr.multi-day')[0].clientHeight; // Height of a multi-day row
- $('tr[iehint]').each(function(index) {
- var iehint = this.getAttribute('iehint');
- // Add height of the multi day rows to the single day row - seems that 80% height works best
- var height = this.clientHeight + (multiday_height * .8 * iehint);
- this.style.height = height + 'px';
- });
- }
- }catch(e){
- // swallow
- }
- </script>-->