Backup of db before drupal security update
[yaffs-website] / web / core / modules / update / templates / update-project-status.html.twig
1 {#
2 /**
3  * @file
4  * Default theme implementation for the project status report.
5  *
6  * Available variables:
7  * - title: The project title.
8  * - url: The project url.
9  * - status: The project status.
10  *   - label: The project status label.
11  *   - attributes: HTML attributes for the project status.
12  *   - reason: The reason you should update the project.
13  *   - icon: The project status version indicator icon.
14  * - existing_version: The version of the installed project.
15  * - versions: The available versions of the project.
16  * - install_type: The type of project (e.g., dev).
17  * - datestamp: The date/time of a project version's release.
18  * - extras: HTML attributes and additional information about the project.
19  *   - attributes: HTML attributes for the extra item.
20  *   - label: The label for an extra item.
21  *   - data: The data about an extra item.
22  * - includes: The projects within the project.
23  * - disabled: The currently disabled projects in the project.
24  *
25  * @see template_preprocess_update_project_status()
26  *
27  * @ingroup themeable
28  */
29 #}
30 {%
31   set status_classes = [
32     project.status == constant('UPDATE_NOT_SECURE') ? 'project-update__status--security-error',
33     project.status == constant('UPDATE_REVOKED') ? 'project-update__status--revoked',
34     project.status == constant('UPDATE_NOT_SUPPORTED') ? 'project-update__status--not-supported',
35     project.status == constant('UPDATE_NOT_CURRENT') ? 'project-update__status--not-current',
36     project.status == constant('UPDATE_CURRENT') ? 'project-update__status--current',
37   ]
38 %}
39 <div{{ status.attributes.addClass('project-update__status', status_classes) }}>
40   {%- if status.label -%}
41     <span>{{ status.label }}</span>
42   {%- else -%}
43     {{ status.reason }}
44   {%- endif %}
45   <span class="project-update__status-icon">
46     {{ status.icon }}
47   </span>
48 </div>
49
50 <div class="project-update__title">
51   {%- if url -%}
52     <a href="{{ url }}">{{ title }}</a>
53   {%- else -%}
54     {{ title }}
55   {%- endif %}
56   {{ existing_version }}
57   {% if install_type == 'dev' and datestamp %}
58     <span class="project-update__version-date">({{ datestamp }})</span>
59   {% endif %}
60 </div>
61
62 {% if versions %}
63   {% for version in versions %}
64     {{ version }}
65   {% endfor %}
66 {% endif %}
67
68 {%
69   set extra_classes = [
70     project.status == constant('UPDATE_NOT_SECURE') ? 'project-not-secure',
71     project.status == constant('UPDATE_REVOKED') ? 'project-revoked',
72     project.status == constant('UPDATE_NOT_SUPPORTED') ? 'project-not-supported',
73   ]
74 %}
75 <div class="project-updates__details">
76   {% if extras %}
77     <div class="extra">
78       {% for extra in extras %}
79         <div{{ extra.attributes.addClass(extra_classes) }}>
80           {{ extra.label }}: {{ extra.data }}
81         </div>
82       {% endfor %}
83     </div>
84   {% endif %}
85   {% set includes = includes|join(', ') %}
86   {% if disabled %}
87     {{ 'Includes:'|t }}
88     <ul>
89       <li>
90         {% trans %}
91           Enabled: {{ includes|placeholder }}
92         {% endtrans %}
93       </li>
94       <li>
95         {% set disabled = disabled|join(', ') %}
96         {% trans %}
97           Disabled: {{ disabled|placeholder }}
98         {% endtrans %}
99       </li>
100     </ul>
101   {% else %}
102     {% trans %}
103       Includes: {{ includes|placeholder }}
104     {% endtrans %}
105   {% endif %}
106 </div>