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.
This commit is contained in:
parent
58b02bc698
commit
7bf99b00a5
4 changed files with 4 additions and 4 deletions
|
@ -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 @@
|
||||||
% 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 @@
|
||||||
<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 @@
|
||||||
<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">
|
||||||
|
|
Loading…
Reference in a new issue