{#
/**
 * @file
 * Theme override to display a view of unformatted rows.
 *
 * Available variables:
 * - title: The title of this group of rows. May be empty.
 * - rows: A list of the view's row items.
 *   - attributes: The row's HTML attributes.
 *   - content: The row's content.
 * - view: The view object.
 * - default_row_class: A flag indicating whether default classes should be
 *   used on rows.
 *
 * @see template_preprocess_views_view_unformatted()
 */
#}

{%
  set view_wrapper_class = [
  default_row_class ? 'views-row-wrapper',
  ]
%}
{% if grouped_rows is defined %}
  {% set base_url = path('<front>') ~ 'ressources' %}
  {% for type_class, group in grouped_rows %}
    <div class="view-type-slide {{ type_class }}">
      <div class="border">        </div>
        <h3 class="{{ type_class }}">{{ group.label }}</h3>
        {% if group.tid is defined %}
          <button class="tout-voir" type="button" data-tid="{{ group.tid }}">
            {# <a href="{{ base_url }}?field_type_de_media_target_id=All&field_type_de_ressource_target_id={{ group.tid }}&field_mots_clefs_target_id=All&field_date_de_parution_value=&combine=" target="_blank" rel="noopener noreferrer">
              Tout voir
            </a> #}
            Tout voir
          </button>
        {% endif %}
        <div class="views-row-wrapper">
        {% for row in group.rows %}
          <div{{ row.attributes.addClass('views-row') }}>
            {{ row.content }}
          </div>
        {% endfor %}

      </div>
    </div>
  {% endfor %}
{% else %}
  {% for row in rows %}
    <div{{ row.attributes.addClass('views-row') }}>
      {{ row.content }}
    </div>
  {% endfor %}
{% endif %}
