summaryrefslogtreecommitdiff
path: root/templates/_wagons.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-01-04 18:48:46 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-01-04 18:48:46 +0100
commit62b68b5010326115fe081fe6388135e17a2b710a (patch)
treeb59f4b7abe0cc4804653f848030748cd4bbabb7f /templates/_wagons.html.ep
parenta9a7fa4492fecae9b03cc79d960a72d3bfbd3fdc (diff)
map ICE train numbers to names where possible
Diffstat (limited to 'templates/_wagons.html.ep')
-rw-r--r--templates/_wagons.html.ep8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/_wagons.html.ep b/templates/_wagons.html.ep
index 8918273..bfb1b7b 100644
--- a/templates/_wagons.html.ep
+++ b/templates/_wagons.html.ep
@@ -1,5 +1,11 @@
% for my $wagongroup (@{$wagongroups // []}) {
- Wagenverbund <%= $wagongroup->{name} %> von <b><%= $wagongroup->{from} %></b> nach <b><%= $wagongroup->{to} %></b> als <b><%= $journey->{type} %> <%= $wagongroup->{no} %></b><br/>
+ Wagenverbund <%= $wagongroup->{name} %>
+ % my ($wagon_number) = ($wagongroup->{name} =~ m{ ^ ICE 0* (\d+) $ }x);
+ % if ($wagon_number and my $group_name = app->ice_name->{$wagon_number}) {
+ „<%= $group_name %>“
+ % }
+ als <b><%= $journey->{type} %> <%= $wagongroup->{no} %></b>
+ von <b><%= $wagongroup->{from} %></b> nach <b><%= $wagongroup->{to} %></b><br/>
% for my $wagon (@{$wagongroup->{wagons}}) {
% if (length($wagon->{id}) == 12) {
<span><%= substr($wagon->{id}, 0, 2) %></span><span><%= substr($wagon->{id}, 2, 2) %></span><span><%= substr($wagon->{id}, 4, 1) %></span><span class="wagonclass"><%= substr($wagon->{id}, 5, 3) %></span><span class="wagonnum"><%= substr($wagon->{id}, 8, 3) %></span><span class="checksum"><%= substr($wagon->{id}, 11) %></span>