{# /** * @file * Template to display a view as a calendar week. * * Available variables: * - day_names: An array of the day of week names for the table header. * - rows: The rendered data for this week. * * For each day of the week, you have: * - rows['date'] - the date for this day, formatted as YYYY-MM-DD. * - rows['datebox'] - the formatted datebox for this day. * - rows['empty'] - empty text for this day, if no items were found. * - rows['all_day'] - an array of formatted all day items. * - rows['items'] - an array of timed items for the day. * - rows['items'][$time_period]['hour'] - the formatted hour for a time period. * - rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period. * - rows['items'][$time_period]['values'] - An array of formatted items for a time period. * * @see template_preprocess_calendar_week() * * @ingroup themeable */ #}
{% if by_hour_content > 0 or start_times is not empty %} {% endif %} {% for cell in day_names %} {% endfor %} {% for i in 0..multiday_rows %} {% set row_class = 'all-day' %} {% if loop.first %}{% set row_class_extra = 'first' %}{% endif %} {% if loop.last %}{% set row_class_extra = 'last' %}{% endif %} {% if loop.index == 0 and (by_hour_count > 0 or start_times is not empty) %} {% endif %} {% set colpos = 0 %} {% for j in 0..6 %} {% set cell = all_day[j][i] %} {% if cell is not empty and cell.filled and cell['wday'] == j %} {% for k in colpos..cell['wday'] %} {% endfor %} {% set colpos = cell['wday'] + cell['colspan'] + 1 %} {% endif %} {% endfor %} {% for j in colpos..6 %} {% endfor %} {% endfor %} {% for time in items %} {% set current_position = 0 %} {% for column in columns %} {% set column_position = time.values.column[0] ? time.values.column[0].wday : loop.index %} {% for i in column_position %} {% endfor %} {% set current_position = column_position + 1 %} {% endfor %} {% if current_position < 7 %} {% for i in current_position..6 %} {% endfor %} {% endif %} {% endfor %}
{% trans %}Time{% endtrans %} {{ cell.data }}
{% trans with {'context': 'datetime'} %}All day{% endtrans %}
 
{{ cell.entry }}
 
{{ time.hour }}{{ time.ampm }}
 
{% for item in time.values[column] %} {{ item.entry }} {% endfor %}