Skip to content
Snippets Groups Projects
Unverified Commit 7bf99b00 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Use $train->type rather than firts part of $train->line for CSS class

In some cases (e.g. in Belgium), trains do not have a type, so the first part
of $train->line is the train number instead.
parent 58b02bc6
No related branches found
Tags 1.0.3
No related merge requests found
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
% if ($train->platform) { % if ($train->platform) {
<span>Gleis <%= $train->platform %></span> <span>Gleis <%= $train->platform %></span>
% } % }
<span class="dep-line <%= (split(/ /, $train->line))[0] %>"> <span class="dep-line <%= $train->type // q{} %>">
%= $train->line %= $train->line
</span> </span>
</span> </span>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
% if ($train->platform) { % if ($train->platform) {
<span>Gleis <%= $train->platform %></span> <span>Gleis <%= $train->platform %></span>
% } % }
<span class="dep-line <%= (split(/ /, $train->line))[0] %>"> <span class="dep-line <%= $train->type // q{} %>">
%= $train->line %= $train->line
</span> </span>
</span> </span>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i> <i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i>
% } % }
</a> </a>
<span class="dep-line <%= (split(/ /, $result->line))[0] %>"> <span class="dep-line <%= $result->type // q{} %>">
%= $result->line %= $result->line
</span> </span>
<span class="dep-dest"> <span class="dep-dest">
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i> <i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i>
% } % }
</a> </a>
<span class="dep-line <%= (split(/ /, $result->line))[0] %>"> <span class="dep-line <%= $result->type // q{} %>">
%= $result->line %= $result->line
</span> </span>
<span class="dep-dest"> <span class="dep-dest">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment