Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for displaying a view as a table. Chris@0: * Chris@0: * Available variables: Chris@0: * - attributes: Remaining HTML attributes for the element. Chris@0: * - class: HTML classes that can be used to style contextually through CSS. Chris@0: * - title : The title of this group of rows. Chris@0: * - header: The table header columns. Chris@0: * - attributes: Remaining HTML attributes for the element. Chris@0: * - content: HTML classes to apply to each header cell, indexed by Chris@0: * the header's key. Chris@0: * - default_classes: A flag indicating whether default classes should be Chris@0: * used. Chris@0: * - caption_needed: Is the caption tag needed. Chris@0: * - caption: The caption for this table. Chris@0: * - accessibility_description: Extended description for the table details. Chris@0: * - accessibility_summary: Summary for the table details. Chris@0: * - rows: Table row items. Rows are keyed by row number. Chris@0: * - attributes: HTML classes to apply to each row. Chris@0: * - columns: Row column items. Columns are keyed by column number. Chris@0: * - attributes: HTML classes to apply to each column. Chris@0: * - content: The column content. Chris@0: * - default_classes: A flag indicating whether default classes should be Chris@0: * used. Chris@0: * - responsive: A flag indicating whether table is responsive. Chris@0: * - sticky: A flag indicating whether table header is sticky. Chris@0: * Chris@0: * @see template_preprocess_views_view_table() Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: {% Chris@0: set classes = [ Chris@0: 'cols-' ~ header|length, Chris@0: responsive ? 'responsive-enabled', Chris@0: sticky ? 'sticky-enabled', Chris@0: ] Chris@0: %} Chris@0:
Chris@0: {%- if column.wrapper_element -%} Chris@0: <{{ column.wrapper_element }}> Chris@0: {%- if column.url -%} Chris@0: {{ column.content }}{{ column.sort_indicator }} Chris@0: {%- else -%} Chris@0: {{ column.content }}{{ column.sort_indicator }} Chris@0: {%- endif -%} Chris@0: {{ column.wrapper_element }}> Chris@0: {%- else -%} Chris@0: {%- if column.url -%} Chris@0: {{ column.content }}{{ column.sort_indicator }} Chris@0: {%- else -%} Chris@0: {{- column.content }}{{ column.sort_indicator }} Chris@0: {%- endif -%} Chris@0: {%- endif -%} Chris@0: | Chris@0: {% endfor %} Chris@0:
---|
Chris@0: {%- if column.wrapper_element -%} Chris@0: <{{ column.wrapper_element }}> Chris@0: {% for content in column.content %} Chris@0: {{ content.separator }}{{ content.field_output }} Chris@0: {% endfor %} Chris@0: {{ column.wrapper_element }}> Chris@0: {%- else -%} Chris@0: {% for content in column.content %} Chris@0: {{- content.separator }}{{ content.field_output -}} Chris@0: {% endfor %} Chris@0: {%- endif %} Chris@0: | Chris@0: {% endfor %} Chris@0: