summaryrefslogtreecommitdiff
path: root/templates/app.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-27 20:41:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-27 20:41:05 +0200
commit5f8418a255d9384305e2fa7e08a11aa442e69921 (patch)
treef063adfe2d370d6d2f1ed470557ef1ef8b5d55a3 /templates/app.html.ep
parent9ae7fa5bb5ee4bb76c0a1bae89d9288aa949b5b3 (diff)
show train class based on IRIS data3.3.6
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r--templates/app.html.ep24
1 files changed, 2 insertions, 22 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 9b7f8ab..7e23bc8 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -29,31 +29,11 @@
% $via_cur++;
% $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{});
% }
-% my $linetype = 'bahn';
-% if ( $departure->{train_type} eq 'S' ) {
-% $linetype = 'sbahn';
-% }
-% elsif ( $departure->{train_type} eq 'IC'
-% or $departure->{train_type} eq 'ICE'
-% or $departure->{train_type} eq 'EC'
-% or $departure->{train_type} eq 'ECE'
-% or $departure->{train_type} eq 'EN') {
-% $linetype = 'fern';
-% }
-% elsif ( $departure->{train_type} eq 'THA'
-% or $departure->{train_type} eq 'TGV'
-% or $departure->{train_type} eq 'FLX'
-% or $departure->{train_type} eq 'NJ') {
-% $linetype = 'ext';
-% }
-% elsif ( $departure->{train_line} and $departure->{train_line} =~ m{^S\d} ) {
-% $linetype = 'sbahn';
-% }
<li
data-train="<%= ($departure->{train_type} // q{}) %> <%= ($departure->{train_no} // $departure->{train} // q{}) %>"
data-line="<%= $departure->{train_type} %> <%= $departure->{train_line} // $departure->{train_no} %>"
data-no="<%= $departure->{train_line} ? $departure->{train_no} : q{} %>"
- data-linetype="<%= $linetype %>"
+ data-linetype="<%= $departure->{linetype} %>"
data-from="<%= $departure->{origin} // q{???} %>"
data-to="<%= $departure->{destination} // q{???} %>"
data-platform="<%= $departure->{scheduled_platform} // $departure->{platform} // '' %>"
@@ -70,7 +50,7 @@
% else {
>
% }
- <div class="line <%= $linetype %>">
+ <div class="line <%= $departure->{linetype} %>">
% if ($departure->{train_type} and $departure->{train_no}) {
%= $departure->{train_type}
% }