91aa2981143baef0ae54fe6809af668f3b3c19e0
[yaffs-website] / web / core / themes / seven / templates / status-report-grouped.html.twig
1 {#
2 /**
3  * @file
4  * Theme override to display status report.
5  *
6  * - grouped_requirements: Contains grouped requirements.
7  *   Each group contains:
8  *   - title: The title of the group.
9  *   - type: The severity of the group.
10  *   - items: The requirement instances.
11  *     Each requirement item contains:
12  *     - title: The title of the requirement.
13  *     - value: (optional) The requirement's status.
14  *     - description: (optional) The requirement's description.
15  *     - severity_title: The title of the severity.
16  *     - severity_status: Indicates the severity status.
17  */
18 #}
19 {{ attach_library('core/drupal.collapse') }}
20 {{ attach_library('seven/drupal.responsive-detail') }}
21
22 <div class="system-status-report">
23   {% for group in grouped_requirements %}
24     <div class="system-status-report__requirements-group">
25       <h3 id="{{ group.type }}">{{ group.title }}</h3>
26       {% for requirement in group.items %}
27         <details class="system-status-report__entry system-status-report__entry--{{ group.type }} color-{{ group.type }}" open>
28           {%
29             set summary_classes = [
30               'system-status-report__status-title',
31               group.type in ['warning', 'error'] ? 'system-status-report__status-icon system-status-report__status-icon--' ~ group.type
32             ]
33           %}
34           <summary{{ create_attribute({'class': summary_classes}) }} role="button">
35             {% if requirement.severity_title  %}
36               <span class="visually-hidden">{{ requirement.severity_title }}</span>
37             {% endif %}
38             {{ requirement.title }}
39           </summary>
40           <div class="system-status-report__entry__value">
41             {{ requirement.value }}
42             {% if requirement.description %}
43               <div class="description">{{ requirement.description }}</div>
44             {% endif %}
45           </div>
46         </details>
47       {% endfor %}
48     </div>
49   {% endfor %}
50 </div>