contacts-8.x-1.x-dev/templates/views-view-table-axes.html.twig

templates/views-view-table-axes.html.twig
{#
/**
 * @file
 * Default theme implementation for displaying a view as a table with axes.
 *
 * Available variables:
 * - attributes: Remaining HTML attributes for the element.
 *   - class: HTML classes that can be used to style contextually through CSS.
 * - title : The title of this group of rows.
 * - header: The table header columns.
 *   - attributes: Remaining HTML attributes for the element.
 *   - content: HTML classes to apply to each header cell, indexed by
 *   the header's key.
 *   - default_classes: A flag indicating whether default classes should be
 *     used.
 * - caption_needed: Is the caption tag needed.
 * - caption: The caption for this table.
 * - accessibility_description: Extended description for the table details.
 * - accessibility_summary: Summary for the table details.
 * - rows: Table row items. Rows are keyed by row number.
 *   - attributes: HTML classes to apply to each row.
 *   - columns: Row column items. Columns are keyed by column number.
 *     - attributes: HTML classes to apply to each column.
 *     - content: The column content.
 *   - default_classes: A flag indicating whether default classes should be
 *     used.
 *
 * @see template_preprocess_views_view_table()
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
  'cols-' ~ header|length,
]
%}
<table{{ attributes.addClass(classes) }}>
  {% if caption_needed %}
    <caption>
      {% if caption %}
        {{ caption }}
      {% else %}
        {{ title }}
      {% endif %}
      {% if (summary is not empty) or (description is not empty) %}
        <details>
          {% if summary is not empty %}
            <summary>{{ summary }}</summary>
          {% endif %}
          {% if description is not empty %}
            {{ description }}
          {% endif %}
        </details>
      {% endif %}
    </caption>
  {% endif %}
  {% if colgroups %}
    {% for group in colgroups %}
      <colgroup{{ group.colgroup }}></colgroup>
    {% endfor %}
  {% endif %}
  {% if header %}
    <thead>
    {% if colgroups %}
      <tr>
        {% for group in colgroups %}
          <th colspan="{{ group.colgroup.span }}">{{ group.title }}</th>
        {% endfor %}
      </tr>
    {% endif %}
    <tr>
      {% for column in header %}
        <th>{{ column }}</th>
      {% endfor %}
    </tr>
    </thead>
  {% endif %}
  <tbody>
  {% for row in rows %}
    <tr{{ row.attributes }}>
      {% for column in row.data %}
        <td>{{ column }}</td>
      {% endfor %}
    </tr>
  {% endfor %}
  </tbody>
</table>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc