@openeuropa/bcl-project-status 0.21.0 → 0.24.0
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 -4
- package/project-contributions.html.twig +56 -0
- package/project-status.html.twig +16 -44
package/package.json
CHANGED
|
@@ -2,14 +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.24.0",
|
|
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-
|
|
11
|
+
"@openeuropa/bcl-badge": "^0.24.0",
|
|
12
|
+
"@openeuropa/bcl-heading": "^0.24.0",
|
|
13
|
+
"@openeuropa/bcl-progress": "^0.24.0"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -25,5 +26,5 @@
|
|
|
25
26
|
"design-system",
|
|
26
27
|
"twig"
|
|
27
28
|
],
|
|
28
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a46bb6bc12771da4667516dc7b0665b00504ade2"
|
|
29
30
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{% spaceless %}
|
|
2
|
+
|
|
3
|
+
{# Parameters:
|
|
4
|
+
- corporate_contributions (string) (default: '') // value every 5 percent
|
|
5
|
+
- legend (boolean or object (default: false)
|
|
6
|
+
- chart (boolean) (default: false)
|
|
7
|
+
|
|
8
|
+
Blocks -
|
|
9
|
+
project_status_contrib_chart
|
|
10
|
+
project_status_contrib_legend
|
|
11
|
+
#}
|
|
12
|
+
|
|
13
|
+
{% set _corporate_contributions = corporate_contributions|default('') %}
|
|
14
|
+
{% set _legend = legend|default(false) %}
|
|
15
|
+
{% set _chart = chart|default(false) %}
|
|
16
|
+
|
|
17
|
+
{% if attributes is empty %}
|
|
18
|
+
{% set attributes = create_attribute() %}
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% set attributes = attributes.addClass([
|
|
22
|
+
'bcl-project-contributions',
|
|
23
|
+
'border-bottom',
|
|
24
|
+
'pb-4',
|
|
25
|
+
'mb-4'
|
|
26
|
+
]) %}
|
|
27
|
+
|
|
28
|
+
<div {{ attributes }}>
|
|
29
|
+
<div class="row">
|
|
30
|
+
|
|
31
|
+
{% if _chart is not empty %}
|
|
32
|
+
<div class="bcl-project-contributions-chart col-5 col-md-3">
|
|
33
|
+
{% block project_status_contrib_chart %}
|
|
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>
|
|
41
|
+
</div>
|
|
42
|
+
{% endblock %}
|
|
43
|
+
</div>
|
|
44
|
+
{% endif %}
|
|
45
|
+
|
|
46
|
+
{% if _legend is not empty %}
|
|
47
|
+
<div class="bcl-project-contributions-legend col-7 col-md-9 align-self-center">
|
|
48
|
+
{% block project_status_contrib_legend %}
|
|
49
|
+
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with _legend only %}
|
|
50
|
+
{% endblock %}
|
|
51
|
+
</div>
|
|
52
|
+
{% endif %}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
{% endspaceless %}
|
package/project-status.html.twig
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
{% spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- title_id (string) (default: "")
|
|
5
|
-
- title (string) (default: "")
|
|
6
|
-
- title_tag (string) (default: "h3")
|
|
7
4
|
- status (string) (default: 'planned')
|
|
8
5
|
- start_date (string) (default: '')
|
|
9
6
|
- start_label (string) (default: '')
|
|
@@ -12,16 +9,10 @@
|
|
|
12
9
|
- label (string) (default: '')
|
|
13
10
|
- badge (string) (default: ''),
|
|
14
11
|
- progress (string) (default: '')
|
|
15
|
-
-
|
|
16
|
-
- chart_legend (object) (default: {})
|
|
17
|
-
|
|
18
|
-
Blocks - chart
|
|
12
|
+
- attributes (drupal attrs)
|
|
19
13
|
#}
|
|
20
14
|
|
|
21
|
-
{% set _title_id = title_id|default('') %}
|
|
22
|
-
{% set _title = title|default('') %}
|
|
23
15
|
{% set _label = label|default('') %}
|
|
24
|
-
{% set _title_tag = title_tag|default('h3') %}
|
|
25
16
|
{% set _status = status|default('planned') %}
|
|
26
17
|
{% set _charts = charts|default('') %}
|
|
27
18
|
{% set _badge = badge|default('') %}
|
|
@@ -30,8 +21,17 @@
|
|
|
30
21
|
{% set _start_label = start_label|default('') %}
|
|
31
22
|
{% set _end_label = end_label|default('') %}
|
|
32
23
|
{% set _progress = progress|default('') %}
|
|
33
|
-
|
|
34
|
-
{%
|
|
24
|
+
|
|
25
|
+
{% if attributes is empty %}
|
|
26
|
+
{% set attributes = create_attribute() %}
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
{% set attributes = attributes.addClass([
|
|
30
|
+
'bcl-project-status',
|
|
31
|
+
'border-bottom',
|
|
32
|
+
'pb-4',
|
|
33
|
+
'mb-4'
|
|
34
|
+
]) %}
|
|
35
35
|
|
|
36
36
|
{% set _bgs = {
|
|
37
37
|
ongoing: 'info',
|
|
@@ -40,17 +40,7 @@
|
|
|
40
40
|
} %}
|
|
41
41
|
{% set _bg = _bgs[_status]|default('secondary') %}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
<{{ _title_tag }}
|
|
45
|
-
class="fw-bold mb-4"
|
|
46
|
-
{% if title_id is not empty %}
|
|
47
|
-
id="{{ title_id }}"
|
|
48
|
-
{% endif %}
|
|
49
|
-
>
|
|
50
|
-
{{- title -}}
|
|
51
|
-
</{{ _title_tag }}>
|
|
52
|
-
|
|
53
|
-
<div class="border-bottom pb-4 mb-4">
|
|
43
|
+
<div {{ attributes }}>
|
|
54
44
|
<div class="row">
|
|
55
45
|
<div class="col-12 col-md-3">
|
|
56
46
|
{% if _label is not empty %}
|
|
@@ -60,6 +50,7 @@
|
|
|
60
50
|
{% if _badge is not empty %}
|
|
61
51
|
{% include '@oe-bcl/bcl-badge/badge.html.twig' with {
|
|
62
52
|
label: _badge,
|
|
53
|
+
rounded_pill: true,
|
|
63
54
|
background: _bg,
|
|
64
55
|
attributes: create_attribute().addClass(['mb-3', 'mb-md-0']),
|
|
65
56
|
} only %}
|
|
@@ -103,26 +94,7 @@
|
|
|
103
94
|
</div>
|
|
104
95
|
</div>
|
|
105
96
|
</div>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{% block chart %}
|
|
109
|
-
<div class="row">
|
|
110
|
-
<div class="col-5 col-md-3">
|
|
111
|
-
<div class="circular-progress" data-percentage="{{ _corporate_contribution }}">
|
|
112
|
-
<span class="circular-progress-left">
|
|
113
|
-
<span class="circular-progress-bar"></span>
|
|
114
|
-
</span>
|
|
115
|
-
<span class="circular-progress-right">
|
|
116
|
-
<span class="circular-progress-bar"></span>
|
|
117
|
-
</span>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="col-7 col-md-9 align-self-center">
|
|
121
|
-
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with _chart_legend only %}
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
{% endblock %}
|
|
125
|
-
</div>
|
|
126
|
-
{% endif %}
|
|
97
|
+
|
|
98
|
+
|
|
127
99
|
|
|
128
100
|
{% endspaceless %}
|