|
15 | 15 | </div> |
16 | 16 | <div class="o-train-category__tags"> |
17 | 17 | {{- if eq .fip_accepted true -}} |
18 | | - <span class="o-train-category__tag o-train-category__tag--success"> |
19 | | - {{ partial "icon" "check_circle" }} |
20 | | - {{ i18n "trainCategory.acceptance.accepted" }} |
21 | | - </span> |
| 18 | + {{ partial "tag" ( |
| 19 | + dict |
| 20 | + "Icon" "check_circle" |
| 21 | + "Text" "trainCategory.acceptance.accepted" |
| 22 | + "Type" "success" |
| 23 | + ) |
| 24 | + }} |
22 | 25 | {{- else if eq .fip_accepted "partially" -}} |
23 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
24 | | - {{ partial "icon" "info" }} |
25 | | - {{ i18n "trainCategory.acceptance.partiallyAccepted" }} |
26 | | - </span> |
| 26 | + {{ partial "tag" ( |
| 27 | + dict |
| 28 | + "Icon" "info" |
| 29 | + "Text" "trainCategory.acceptance.partiallyAccepted" |
| 30 | + "Type" "warning" |
| 31 | + ) |
| 32 | + }} |
27 | 33 | {{- else -}} |
28 | | - <span class="o-train-category__tag o-train-category__tag--error"> |
29 | | - {{ partial "icon" "dangerous" }} |
30 | | - {{ i18n "trainCategory.acceptance.notAccepted" }} |
31 | | - </span> |
| 34 | + {{ partial "tag" ( |
| 35 | + dict |
| 36 | + "Icon" "dangerous" |
| 37 | + "Text" "trainCategory.acceptance.notAccepted" |
| 38 | + "Type" "error" |
| 39 | + ) |
| 40 | + }} |
32 | 41 | {{- end -}} |
33 | 42 |
|
34 | 43 | {{- if eq .reservation_required true -}} |
35 | | - <span class="o-train-category__tag o-train-category__tag--error"> |
36 | | - {{ partial "icon" "calendar_add_on" }} |
37 | | - {{ i18n "trainCategory.reservation.required" }} |
38 | | - </span> |
| 44 | + {{ partial "tag" ( |
| 45 | + dict |
| 46 | + "Icon" "calendar_add_on" |
| 47 | + "Text" "trainCategory.reservation.required" |
| 48 | + "Type" "error" |
| 49 | + ) |
| 50 | + }} |
39 | 51 | {{- else if eq .reservation_required "partially" -}} |
40 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
41 | | - {{ partial "icon" "calendar_add_on" }} |
42 | | - {{ i18n "trainCategory.reservation.partiallyRequired" }} |
43 | | - </span> |
| 52 | + {{ partial "tag" ( |
| 53 | + dict |
| 54 | + "Icon" "calendar_add_on" |
| 55 | + "Text" "trainCategory.reservation.partiallyRequired" |
| 56 | + "Type" "warning" |
| 57 | + ) |
| 58 | + }} |
44 | 59 | {{- else if eq .reservation_possible true -}} |
45 | | - <span class="o-train-category__tag o-train-category__tag--info"> |
46 | | - {{ partial "icon" "calendar_check" }} |
47 | | - {{ i18n "trainCategory.reservation.possible" }} |
48 | | - </span> |
| 60 | + {{ partial "tag" ( |
| 61 | + dict |
| 62 | + "Icon" "calendar_check" |
| 63 | + "Text" "trainCategory.reservation.possible" |
| 64 | + "Type" "info" |
| 65 | + ) |
| 66 | + }} |
49 | 67 | {{- else if eq .reservation_possible false -}} |
50 | | - <span class="o-train-category__tag o-train-category__tag--info"> |
51 | | - {{ partial "icon" "calendar_lock" }} |
52 | | - {{ i18n "trainCategory.reservation.notPossible" }} |
53 | | - </span> |
| 68 | + {{ partial "tag" ( |
| 69 | + dict |
| 70 | + "Icon" "calendar_lock" |
| 71 | + "Text" "trainCategory.reservation.notPossible" |
| 72 | + "Type" "info" |
| 73 | + ) |
| 74 | + }} |
54 | 75 | {{- end -}} |
55 | 76 |
|
56 | 77 | {{- if .risk_of_confusion -}} |
57 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
58 | | - {{ partial "icon" "question_exchange" }} |
59 | | - {{ i18n "trainCategory.riskOfConfusion" }} |
60 | | - </span> |
| 78 | + {{ partial "tag" ( |
| 79 | + dict |
| 80 | + "Icon" "question_exchange" |
| 81 | + "Text" "trainCategory.riskOfConfusion" |
| 82 | + "Type" "warning" |
| 83 | + ) |
| 84 | + }} |
61 | 85 | {{- end -}} |
62 | 86 |
|
63 | 87 | {{- if .important_info -}} |
64 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
65 | | - {{ partial "icon" "campaign" }} |
66 | | - {{ i18n "trainCategory.importantInformation" }} |
67 | | - </span> |
| 88 | + {{ partial "tag" ( |
| 89 | + dict |
| 90 | + "Icon" "campaign" |
| 91 | + "Text" "trainCategory.importantInformation" |
| 92 | + "Type" "warning" |
| 93 | + ) |
| 94 | + }} |
68 | 95 | {{- end -}} |
69 | 96 | </div> |
70 | 97 | </div> |
|
0 commit comments