summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-25 23:04:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-25 23:04:36 +0200
commit45a4089431002ee01b11880d463dd3513b0657ca (patch)
tree0b5e655681a92fa3347547dd6be631c5bddcf206 /templates
parent302a6a144e12d411b41691edf7c14a82e4af6d16 (diff)
Handle missing platform numbers1.6.3
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep8
-rw-r--r--templates/_connections.html.ep4
-rw-r--r--templates/_public_status_card.html.ep2
3 files changed, 7 insertions, 7 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index ebe84e8..a50aa3e 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -8,15 +8,12 @@
data-arrival="<%= $journey->{real_arrival}->epoch %>">
% if ($journey->{departure_countdown} > 120) {
Abfahrt in <%= sprintf('%.f', $journey->{departure_countdown} / 60) %> Minuten
- <br/>von Gleis <%= $journey->{dep_platform} %>
% }
% elsif ($journey->{departure_countdown} > 60) {
Abfahrt in einer Minute
- <br/>von Gleis <%= $journey->{dep_platform} %>
% }
% elsif ($journey->{departure_countdown} > 0) {
Abfahrt in weniger als einer Minute
- <br/>von Gleis <%= $journey->{dep_platform} %>
% }
% elsif (defined $journey->{arrival_countdown}) {
% if ($journey->{arrival_countdown} > 60) {
@@ -29,13 +26,16 @@
% else {
Ziel erreicht
% }
- % if ($journey->{arrival_countdown} < (60 * 15)) {
+ % if ($journey->{arrival_countdown} < (60 * 15) and $journey->{arr_platform}) {
<br/>auf Gleis <%= $journey->{arr_platform} %>
% }
% }
% elsif ($journey->{arr_name}) {
Ankunft in mehr als zwei Stunden
% }
+ % if ($journey->{departure_countdown} > 0 and $journey->{dep_platform}) {
+ <br/>von Gleis <%= $journey->{dep_platform} %>
+ % }
</div>
<div class="progress" style="height: 1ex;">
<div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep
index d421d4e..2506829 100644
--- a/templates/_connections.html.ep
+++ b/templates/_connections.html.ep
@@ -22,7 +22,7 @@
% if ($train->departure_delay) {
%= sprintf('(%+d)', $train->departure_delay)
% }
- <br/>Gleis <%= $train->platform %></td>
+ <br/>Gleis <%= $train->platform || '?' %></td>
</tr>
% }
</tbody></table></div>
@@ -50,7 +50,7 @@
% if ($train->departure_delay) {
%= sprintf('(%+d)', $train->departure_delay)
% }
- </td><td>Gleis <%= $train->platform %></td>
+ </td><td>Gleis <%= $train->platform || '?' %></td>
</tr>
% }
</tbody></table></div>
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index c806b17..ebf989b 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -33,7 +33,7 @@
% else {
Ziel erreicht
% }
- % if ($journey->{arrival_countdown} < (60 * 15)) {
+ % if ($journey->{arrival_countdown} < (60 * 15) and $journey->{arr_platform}) {
<br/>auf Gleis <%= $journey->{arr_platform} %>
% }
% }