@openeuropa/bcl-project-status 0.4298.202511051800 → 0.4360.202601141610
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/project-contributions.html.twig +25 -28
- package/project-status.html.twig +32 -37
package/package.json
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-project-status",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4360.202601141610",
|
|
6
6
|
"description": "OE - BCL project status",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-badge": "^0.
|
|
12
|
-
"@openeuropa/bcl-heading": "^0.
|
|
13
|
-
"@openeuropa/bcl-progress": "^0.
|
|
11
|
+
"@openeuropa/bcl-badge": "^0.4360.202601141610",
|
|
12
|
+
"@openeuropa/bcl-heading": "^0.4360.202601141610",
|
|
13
|
+
"@openeuropa/bcl-progress": "^0.4360.202601141610"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"design-system",
|
|
27
27
|
"twig"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "2caf9255f88587416f6e83e572a1f20e4cf206f5"
|
|
30
30
|
}
|
|
@@ -1,56 +1,53 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- corporate_contributions (string) (default: '') // value every 5 percent
|
|
5
3
|
- legend (description list object) (default: {})
|
|
6
4
|
- chart (boolean) (default: false)
|
|
7
5
|
|
|
8
|
-
Blocks -
|
|
6
|
+
Blocks -
|
|
9
7
|
project_status_contrib_chart
|
|
10
8
|
project_status_contrib_legend
|
|
11
9
|
#}
|
|
12
10
|
|
|
13
|
-
{
|
|
11
|
+
{%- set _corporate_contributions = corporate_contributions|default('') %}
|
|
14
12
|
{% set _legend = legend|default({}) %}
|
|
15
13
|
{% set _chart = chart ?? false %}
|
|
16
14
|
|
|
17
|
-
{
|
|
18
|
-
{
|
|
15
|
+
{%- if attributes is empty %}
|
|
16
|
+
{%- set attributes = create_attribute() %}
|
|
19
17
|
{% endif %}
|
|
20
18
|
|
|
21
|
-
{
|
|
19
|
+
{%- set attributes = attributes.addClass([
|
|
22
20
|
'bcl-project-contributions',
|
|
23
21
|
'border-bottom',
|
|
24
22
|
'pb-4',
|
|
25
23
|
'mb-4'
|
|
26
|
-
])
|
|
24
|
+
]) -%}
|
|
27
25
|
|
|
28
|
-
<div {{ attributes }}>
|
|
26
|
+
<div {{ attributes }}>{# -#}
|
|
29
27
|
<div class="row">
|
|
30
28
|
|
|
31
|
-
{
|
|
29
|
+
{%- if _chart -%}
|
|
32
30
|
<div class="bcl-project-contributions-chart col-5 col-md-3">
|
|
33
|
-
{
|
|
34
|
-
<div class="circular-progress" data-percentage="{{ _corporate_contributions }}">
|
|
35
|
-
<span class="circular-progress-left">
|
|
36
|
-
<span class="circular-progress-bar"></span>
|
|
37
|
-
</span>
|
|
38
|
-
<span class="circular-progress-right">
|
|
39
|
-
<span class="circular-progress-bar"></span>
|
|
40
|
-
</span>
|
|
31
|
+
{%- block project_status_contrib_chart -%}
|
|
32
|
+
<div class="circular-progress" data-percentage="{{ _corporate_contributions }}">{# -#}
|
|
33
|
+
<span class="circular-progress-left">{# -#}
|
|
34
|
+
<span class="circular-progress-bar"></span>{# -#}
|
|
35
|
+
</span>{# -#}
|
|
36
|
+
<span class="circular-progress-right">{# -#}
|
|
37
|
+
<span class="circular-progress-bar"></span>{# -#}
|
|
38
|
+
</span>{# -#}
|
|
41
39
|
</div>
|
|
42
|
-
{
|
|
40
|
+
{%- endblock -%}
|
|
43
41
|
</div>
|
|
44
|
-
{
|
|
42
|
+
{%- endif %}
|
|
45
43
|
|
|
46
|
-
{
|
|
44
|
+
{%- if _legend is not empty -%}
|
|
47
45
|
<div class="bcl-project-contributions-legend col-7 col-md-9 align-self-center">
|
|
48
|
-
{
|
|
49
|
-
{
|
|
50
|
-
{
|
|
46
|
+
{%- block project_status_contrib_legend %}
|
|
47
|
+
{%- include '@oe-bcl/bcl-description-list/description-list.html.twig' with _legend only %}
|
|
48
|
+
{%- endblock -%}
|
|
51
49
|
</div>
|
|
52
|
-
{
|
|
53
|
-
</div>
|
|
50
|
+
{%- endif -%}
|
|
51
|
+
</div>{# -#}
|
|
54
52
|
</div>
|
|
55
|
-
|
|
56
|
-
{% endapply %}
|
|
53
|
+
{#--#}
|
package/project-status.html.twig
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- label (string) (default: '')
|
|
5
3
|
- status (string) (default: 'planned')
|
|
@@ -12,7 +10,7 @@
|
|
|
12
10
|
- attributes (drupal attrs)
|
|
13
11
|
#}
|
|
14
12
|
|
|
15
|
-
{
|
|
13
|
+
{%- set _label = label|default('') %}
|
|
16
14
|
{% set _status = status|default('planned') %}
|
|
17
15
|
{% set _badge = badge|default('') %}
|
|
18
16
|
{% set _start_date = start_date|default('') %}
|
|
@@ -21,79 +19,76 @@
|
|
|
21
19
|
{% set _end_label = end_label|default('') %}
|
|
22
20
|
{% set _progress = progress|default('') %}
|
|
23
21
|
|
|
24
|
-
{
|
|
25
|
-
{
|
|
22
|
+
{%- if attributes is empty %}
|
|
23
|
+
{%- set attributes = create_attribute() %}
|
|
26
24
|
{% endif %}
|
|
27
25
|
|
|
28
|
-
{
|
|
26
|
+
{%- set attributes = attributes.addClass([
|
|
29
27
|
'bcl-project-status',
|
|
30
28
|
'border-bottom',
|
|
31
29
|
'pb-4',
|
|
32
30
|
'mb-4'
|
|
33
31
|
]) %}
|
|
34
32
|
|
|
35
|
-
{
|
|
33
|
+
{%- set _bgs = {
|
|
36
34
|
ongoing: 'info',
|
|
37
35
|
closed: 'dark',
|
|
38
36
|
planned: 'secondary',
|
|
39
37
|
} %}
|
|
40
|
-
{% set _bg = _bgs[_status]|default('secondary')
|
|
38
|
+
{% set _bg = _bgs[_status]|default('secondary') -%}
|
|
41
39
|
|
|
42
|
-
<div {{ attributes }}>
|
|
43
|
-
<div class="row">
|
|
40
|
+
<div {{ attributes }}>{# -#}
|
|
41
|
+
<div class="row">{# -#}
|
|
44
42
|
<div class="col-12 col-md-3">
|
|
45
|
-
{
|
|
43
|
+
{%- if _label is not empty -%}
|
|
46
44
|
<p class="fw-bold">{{ _label }}</p>
|
|
47
|
-
{
|
|
45
|
+
{%- endif %}
|
|
48
46
|
|
|
49
|
-
{
|
|
50
|
-
{
|
|
47
|
+
{%- if _badge is not empty %}
|
|
48
|
+
{%- include '@oe-bcl/bcl-badge/badge.html.twig' with {
|
|
51
49
|
label: _badge,
|
|
52
50
|
rounded_pill: true,
|
|
53
51
|
background: _bg,
|
|
54
52
|
attributes: create_attribute().addClass(['mb-3', 'mb-md-0']),
|
|
55
53
|
} only %}
|
|
56
|
-
{
|
|
54
|
+
{%- endif -%}
|
|
57
55
|
|
|
58
|
-
</div>
|
|
56
|
+
</div>{# -#}
|
|
59
57
|
|
|
60
|
-
<div class="col-12 col-md-9">
|
|
58
|
+
<div class="col-12 col-md-9">{# -#}
|
|
61
59
|
<div class="d-flex justify-content-between">
|
|
62
60
|
|
|
63
|
-
{
|
|
61
|
+
{%- if _start_date is not empty and _start_label is not empty -%}
|
|
64
62
|
<p class="fw-bold">
|
|
65
|
-
{{- _start_label -}} <br>
|
|
63
|
+
{{- _start_label -}} <br>{# -#}
|
|
66
64
|
<span class="fw-normal">
|
|
67
65
|
{{- _start_date -}}
|
|
68
|
-
</span>
|
|
66
|
+
</span>{# -#}
|
|
69
67
|
</p>
|
|
70
|
-
{
|
|
68
|
+
{%- endif %}
|
|
71
69
|
|
|
72
|
-
{
|
|
70
|
+
{%- if _end_date is not empty and _end_label is not empty -%}
|
|
73
71
|
<p class="fw-bold text-end">
|
|
74
|
-
{{- _end_label -}} <br>
|
|
72
|
+
{{- _end_label -}} <br>{# -#}
|
|
75
73
|
<span class="fw-normal">
|
|
76
74
|
{{- _end_date -}}
|
|
77
|
-
</span>
|
|
75
|
+
</span>{# -#}
|
|
78
76
|
</p>
|
|
79
|
-
{
|
|
77
|
+
{%- endif -%}
|
|
80
78
|
</div>
|
|
81
79
|
|
|
82
|
-
{
|
|
83
|
-
{
|
|
84
|
-
{
|
|
85
|
-
{
|
|
86
|
-
{
|
|
80
|
+
{%- if _progress is not empty or _status != 'ongoing' %}
|
|
81
|
+
{%- if _progress is empty %}
|
|
82
|
+
{%- set _progress = _status == 'closed' ? 100 : 0 %}
|
|
83
|
+
{%- endif %}
|
|
84
|
+
{%- include '@oe-bcl/bcl-progress/progress.html.twig' with {
|
|
87
85
|
variant: _bg,
|
|
88
86
|
hidden_label: true,
|
|
89
87
|
progress: _progress,
|
|
90
88
|
} only %}
|
|
91
|
-
{
|
|
89
|
+
{%- endif -%}
|
|
92
90
|
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
91
|
+
</div>{# -#}
|
|
92
|
+
</div>{# -#}
|
|
95
93
|
</div>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
{% endapply %}
|
|
94
|
+
{#--#}
|