tag.
* - data: Table cells.
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
* - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
* - active_table_sort: A boolean indicating whether the cell is the active
table sort.
* - header: Boolean indicating whether the cell should be rendered as a
* header () or not ( | ).
* - footer: Table footer rows, in the same format as the rows variable.
* - empty: The message to display in an extra row if table does not have
* any rows.
* - no_striping: A boolean indicating that the row should receive no striping.
* - header_columns: The number of columns in the header.
*
* @see template_preprocess_table()
*/
#}
{% if caption %}
{{ caption }}
{% endif %}
{% for colgroup in colgroups %}
{% if colgroup.cols %}
{% for col in colgroup.cols %}
{% endfor %}
{% else %}
{% endif %}
{% endfor %}
{% if header %}
{% for cell in header %}
{%
set cell_classes = [
cell.active_table_sort ? 'is-active',
]
%}
<{{ cell.tag }}{{ cell.attributes.addClass(cell_classes) }}>
{{- cell.content -}}
{{ cell.tag }}>
{% endfor %}
{% endif %}
{% if rows %}
{% for row in rows %}
{%
set row_classes = [
not no_striping ? cycle(['odd', 'even'], loop.index0),
]
%}
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
{{ cell.tag }}>
{% endfor %}
{% endfor %}
{% elseif empty %}
{{ empty }} |
{% endif %}
{% if footer %}
{% for row in footer %}
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
{{ cell.tag }}>
{% endfor %}
{% endfor %}
{% endif %}
|