Added another front page space for Yaffs info. Added roave security for composer.
[yaffs-website] / web / core / themes / stable / templates / dataset / table.html.twig
1 {#
2 /**
3  * @file
4  * Theme override to display a table.
5  *
6  * Available variables:
7  * - attributes: HTML attributes to apply to the <table> tag.
8  * - caption: A localized string for the <caption> tag.
9  * - colgroups: Column groups. Each group contains the following properties:
10  *   - attributes: HTML attributes to apply to the <col> tag.
11  *     Note: Drupal currently supports only one table header row, see
12  *     https://www.drupal.org/node/893530 and
13  *     http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
14  * - header: Table header cells. Each cell contains the following properties:
15  *   - tag: The HTML tag name to use; either 'th' or 'td'.
16  *   - attributes: HTML attributes to apply to the tag.
17  *   - content: A localized string for the title of the column.
18  *   - field: Field name (required for column sorting).
19  *   - sort: Default sort order for this column ("asc" or "desc").
20  * - sticky: A flag indicating whether to use a "sticky" table header.
21  * - rows: Table rows. Each row contains the following properties:
22  *   - attributes: HTML attributes to apply to the <tr> tag.
23  *   - data: Table cells.
24  *   - no_striping: A flag indicating that the row should receive no
25  *     'even / odd' styling. Defaults to FALSE.
26  *   - cells: Table cells of the row. Each cell contains the following keys:
27  *     - tag: The HTML tag name to use; either 'th' or 'td'.
28  *     - attributes: Any HTML attributes, such as "colspan", to apply to the
29  *       table cell.
30  *     - content: The string to display in the table cell.
31  *     - active_table_sort: A boolean indicating whether the cell is the active
32          table sort.
33  * - footer: Table footer rows, in the same format as the rows variable.
34  * - empty: The message to display in an extra row if table does not have
35  *   any rows.
36  * - no_striping: A boolean indicating that the row should receive no striping.
37  * - header_columns: The number of columns in the header.
38  *
39  * @see template_preprocess_table()
40  */
41 #}
42 <table{{ attributes }}>
43   {% if caption %}
44     <caption>{{ caption }}</caption>
45   {% endif %}
46
47   {% for colgroup in colgroups %}
48     {% if colgroup.cols %}
49       <colgroup{{ colgroup.attributes }}>
50         {% for col in colgroup.cols %}
51           <col{{ col.attributes }} />
52         {% endfor %}
53       </colgroup>
54     {% else %}
55       <colgroup{{ colgroup.attributes }} />
56     {% endif %}
57   {% endfor %}
58
59   {% if header %}
60     <thead>
61       <tr>
62         {% for cell in header %}
63           <{{ cell.tag }}{{ cell.attributes }}>
64             {{- cell.content -}}
65           </{{ cell.tag }}>
66         {% endfor %}
67       </tr>
68     </thead>
69   {% endif %}
70
71   {% if rows %}
72     <tbody>
73       {% for row in rows %}
74         <tr{{ row.attributes }}>
75           {% for cell in row.cells %}
76             <{{ cell.tag }}{{ cell.attributes }}>
77               {{- cell.content -}}
78             </{{ cell.tag }}>
79           {% endfor %}
80         </tr>
81       {% endfor %}
82     </tbody>
83   {% elseif empty %}
84     <tbody>
85       <tr>
86         <td colspan="{{ header_columns }}">{{ empty }}</td>
87       </tr>
88     </tbody>
89   {% endif %}
90   {% if footer %}
91     <tfoot>
92       {% for row in footer %}
93         <tr{{ row.attributes }}>
94           {% for cell in row.cells %}
95             <{{ cell.tag }}{{ cell.attributes }}>
96               {{- cell.content -}}
97             </{{ cell.tag }}>
98           {% endfor %}
99         </tr>
100       {% endfor %}
101     </tfoot>
102   {% endif %}
103 </table>