|
1 | | -<summary class="o-expander__summary o-expander__summary--train-category"> |
2 | | - <div class="o-train-category__header"> |
3 | | - <div class="o-train-category__title"> |
4 | | - {{ $iconMapping := dict |
5 | | - "highspeed" "train" |
6 | | - "regional" "directions_subway" |
7 | | - "funicular" "funicular" |
8 | | - "bus" "directions_bus" |
9 | | - }} |
10 | | - {{- partial "icon" (index $iconMapping .type) -}} |
11 | | - <span class="o-train-category__title-text">{{- .title -}}</span> |
12 | | - </div> |
13 | | - <div class="o-train-category__tags"> |
14 | | - {{- if eq .fip_accepted true -}} |
15 | | - <span class="o-train-category__tag o-train-category__tag--success"> |
16 | | - {{ partial "icon" "check_circle" }} |
17 | | - {{ i18n "trainCategory.acceptance.accepted" }} |
18 | | - </span> |
19 | | - {{- else if eq .fip_accepted "partially" -}} |
20 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
21 | | - {{ partial "icon" "info" }} |
22 | | - {{ i18n "trainCategory.acceptance.partiallyAccepted" }} |
23 | | - </span> |
24 | | - {{- else -}} |
25 | | - <span class="o-train-category__tag o-train-category__tag--error"> |
26 | | - {{ partial "icon" "dangerous" }} |
27 | | - {{ i18n "trainCategory.acceptance.notAccepted" }} |
28 | | - </span> |
29 | | - {{- end -}} |
| 1 | +<details class="o-expander o-expander--booking"> |
| 2 | + <summary class="o-expander__summary o-expander__summary--train-category"> |
| 3 | + <div class="o-train-category__header"> |
| 4 | + <div class="o-train-category__title"> |
| 5 | + {{ $iconMapping := dict |
| 6 | + "highspeed" "train" |
| 7 | + "regional" "directions_subway" |
| 8 | + "funicular" "funicular" |
| 9 | + "bus" "directions_bus" |
| 10 | + }} |
| 11 | + {{- partial "icon" (index $iconMapping .type) -}} |
| 12 | + <span class="o-train-category__title-text">{{- .title -}}</span> |
| 13 | + </div> |
| 14 | + <div class="o-train-category__tags"> |
| 15 | + {{- if eq .fip_accepted true -}} |
| 16 | + <span class="o-train-category__tag o-train-category__tag--success"> |
| 17 | + {{ partial "icon" "check_circle" }} |
| 18 | + {{ i18n "trainCategory.acceptance.accepted" }} |
| 19 | + </span> |
| 20 | + {{- else if eq .fip_accepted "partially" -}} |
| 21 | + <span class="o-train-category__tag o-train-category__tag--warning"> |
| 22 | + {{ partial "icon" "info" }} |
| 23 | + {{ i18n "trainCategory.acceptance.partiallyAccepted" }} |
| 24 | + </span> |
| 25 | + {{- else -}} |
| 26 | + <span class="o-train-category__tag o-train-category__tag--error"> |
| 27 | + {{ partial "icon" "dangerous" }} |
| 28 | + {{ i18n "trainCategory.acceptance.notAccepted" }} |
| 29 | + </span> |
| 30 | + {{- end -}} |
30 | 31 |
|
31 | | - {{- if eq .reservation_required true -}} |
32 | | - <span class="o-train-category__tag o-train-category__tag--error"> |
33 | | - {{ partial "icon" "calendar_add_on" }} |
34 | | - {{ i18n "trainCategory.reservation.required" }} |
35 | | - </span> |
36 | | - {{- else if eq .reservation_required true -}} |
37 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
38 | | - {{ partial "icon" "calendar_add_on" }} |
39 | | - {{ i18n "trainCategory.reservation.partiallyRequired" }} |
40 | | - </span> |
41 | | - {{- else if eq .reservation_possible true -}} |
42 | | - <span class="o-train-category__tag o-train-category__tag--info"> |
43 | | - {{ partial "icon" "calendar_check" }} |
44 | | - {{ i18n "trainCategory.reservation.possible" }} |
45 | | - </span> |
46 | | - {{- else -}} |
47 | | - <span class="o-train-category__tag o-train-category__tag--info"> |
48 | | - {{ partial "icon" "calendar_lock" }} |
49 | | - {{ i18n "trainCategory.reservation.notPossible" }} |
50 | | - </span> |
51 | | - {{- end -}} |
| 32 | + {{- if eq .reservation_required true -}} |
| 33 | + <span class="o-train-category__tag o-train-category__tag--error"> |
| 34 | + {{ partial "icon" "calendar_add_on" }} |
| 35 | + {{ i18n "trainCategory.reservation.required" }} |
| 36 | + </span> |
| 37 | + {{- else if eq .reservation_required true -}} |
| 38 | + <span class="o-train-category__tag o-train-category__tag--warning"> |
| 39 | + {{ partial "icon" "calendar_add_on" }} |
| 40 | + {{ i18n "trainCategory.reservation.partiallyRequired" }} |
| 41 | + </span> |
| 42 | + {{- else if eq .reservation_possible true -}} |
| 43 | + <span class="o-train-category__tag o-train-category__tag--info"> |
| 44 | + {{ partial "icon" "calendar_check" }} |
| 45 | + {{ i18n "trainCategory.reservation.possible" }} |
| 46 | + </span> |
| 47 | + {{- else -}} |
| 48 | + <span class="o-train-category__tag o-train-category__tag--info"> |
| 49 | + {{ partial "icon" "calendar_lock" }} |
| 50 | + {{ i18n "trainCategory.reservation.notPossible" }} |
| 51 | + </span> |
| 52 | + {{- end -}} |
52 | 53 |
|
53 | | - {{- if .risk_of_confusion -}} |
54 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
55 | | - {{ partial "icon" "question_exchange" }} |
56 | | - {{ i18n "trainCategory.riskOfConfusion" }} |
57 | | - </span> |
58 | | - {{- end -}} |
| 54 | + {{- if .risk_of_confusion -}} |
| 55 | + <span class="o-train-category__tag o-train-category__tag--warning"> |
| 56 | + {{ partial "icon" "question_exchange" }} |
| 57 | + {{ i18n "trainCategory.riskOfConfusion" }} |
| 58 | + </span> |
| 59 | + {{- end -}} |
59 | 60 |
|
60 | | - {{- if .important_info -}} |
61 | | - <span class="o-train-category__tag o-train-category__tag--warning"> |
62 | | - {{ partial "icon" "campaign" }} |
63 | | - {{ i18n "trainCategory.importantInformation" }} |
64 | | - </span> |
65 | | - {{- end -}} |
| 61 | + {{- if .important_info -}} |
| 62 | + <span class="o-train-category__tag o-train-category__tag--warning"> |
| 63 | + {{ partial "icon" "campaign" }} |
| 64 | + {{ i18n "trainCategory.importantInformation" }} |
| 65 | + </span> |
| 66 | + {{- end -}} |
| 67 | + </div> |
66 | 68 | </div> |
| 69 | + {{- partial "icon" "keyboard_arrow_down" -}} |
| 70 | + </summary> |
| 71 | + <hr aria-hidden="true" /> |
| 72 | + <div class="o-expander__content"> |
| 73 | + {{- .content -}} |
| 74 | + {{- if .route_overview_url -}} |
| 75 | + {{- partial "button" |
| 76 | + (dict |
| 77 | + "Destination" .route_overview_url |
| 78 | + "Text" (T "trainCategory.routeOverview") |
| 79 | + ) |
| 80 | + -}} |
| 81 | + {{- end -}} |
| 82 | + {{- if .additional_information_url -}} |
| 83 | + {{- partial "button" |
| 84 | + (dict |
| 85 | + "Destination" .additional_information_url |
| 86 | + "Text" (T "trainCategory.additionalInformation") |
| 87 | + ) |
| 88 | + -}} |
| 89 | + {{- end -}} |
67 | 90 | </div> |
68 | | - {{- partial "icon" "keyboard_arrow_down" -}} |
69 | | -</summary> |
70 | | -<hr aria-hidden="true" /> |
71 | | -<div class="o-expander__content"> |
72 | | - {{- .content -}} |
73 | | -</div> |
| 91 | +</details> |
0 commit comments