Loading calendar_view.module +12 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,19 @@ function template_preprocess_calendar_view_day(&$variables) { foreach ($values as $value) { $row_timestamp = $value['from'] ?? 0; $row_hour_start = strtotime(date('Y-m-d H:00:00', $row_timestamp)); $variables['rows'][$row_hour_start][] = $result; // Fake preprocessing result as if it were a default row. // See issue: https://www.drupal.org/project/calendar_view/issues/3295385. $renderable = []; $renderable['view'] = $result['#view']; $renderable['rows'] = [$result]; template_preprocess_views_view_unformatted($renderable); $variables['rows'][$row_hour_start][] = reset($renderable['rows']); } } $debug = TRUE; } /** Loading templates/calendar-view-day.html.twig +8 −2 Original line number Diff line number Diff line Loading @@ -61,9 +61,15 @@ {# Simple list #} {% if not hours.display and rows %} <ul class="calendar-view-day__rows"> {% for row in rows %} <li class="calendar-view-day__row">{{ row }}</li> {% for timestamp,results in rows %} {% for row in results %} {% set row_classes = [ default_row_class ? 'views-row'] %} <li{{ row.attributes.addClass(row_classes, 'calendar-view-day__row') }}> {{- row.content -}} </li> {% endfor %} {% endfor %} </ul> {% endif %} Loading Loading
calendar_view.module +12 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,19 @@ function template_preprocess_calendar_view_day(&$variables) { foreach ($values as $value) { $row_timestamp = $value['from'] ?? 0; $row_hour_start = strtotime(date('Y-m-d H:00:00', $row_timestamp)); $variables['rows'][$row_hour_start][] = $result; // Fake preprocessing result as if it were a default row. // See issue: https://www.drupal.org/project/calendar_view/issues/3295385. $renderable = []; $renderable['view'] = $result['#view']; $renderable['rows'] = [$result]; template_preprocess_views_view_unformatted($renderable); $variables['rows'][$row_hour_start][] = reset($renderable['rows']); } } $debug = TRUE; } /** Loading
templates/calendar-view-day.html.twig +8 −2 Original line number Diff line number Diff line Loading @@ -61,9 +61,15 @@ {# Simple list #} {% if not hours.display and rows %} <ul class="calendar-view-day__rows"> {% for row in rows %} <li class="calendar-view-day__row">{{ row }}</li> {% for timestamp,results in rows %} {% for row in results %} {% set row_classes = [ default_row_class ? 'views-row'] %} <li{{ row.attributes.addClass(row_classes, 'calendar-view-day__row') }}> {{- row.content -}} </li> {% endfor %} {% endfor %} </ul> {% endif %} Loading