summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-11-20 22:30:26 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-11-20 22:30:26 +0100
commitd20116d8dafb4e84b5c8b5593a3fad7365024e0b (patch)
tree7e0d0a5ea6db5394dcd9411f300011a768450b1a
parent99e4ea32f2902194052a829d62d3ec9fea6ba0e1 (diff)
indicate entry/exit only stops in train details
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm2
-rw-r--r--sass/app.scss4
-rw-r--r--templates/_train_details.html.ep10
3 files changed, 14 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index c2a5f80..36f62d7 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -907,6 +907,8 @@ sub station_train_details {
departure => $result->departure
? $result->departure->strftime('%H:%M')
: undef,
+ arrival_hidden => $result->arrival_hidden,
+ departure_hidden => $result->departure_hidden,
train_type => $result->type // '',
train_line => $result->line_no,
train_no => $result->train_no,
diff --git a/sass/app.scss b/sass/app.scss
index 5ccf25c..1f8d1ec 100644
--- a/sass/app.scss
+++ b/sass/app.scss
@@ -542,6 +542,10 @@ div.app {
color: $info-color;
}
+ .timehidden {
+ color: $fg2;
+ }
+
.undelay {
color: $undelay-color;
}
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 9ea3581..167068e 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -43,7 +43,7 @@
<div class="mfooter">
<div class="dataline">
<div>
- <div class="arrival">
+ <div class="arrival <%= $departure->{arrival_hidden} ? 'timehidden' : q{} %>">
% if ($departure->{is_cancelled} and $departure->{sched_arrival}) {
<span class="minfo">An: ––:––</span><br/>Plan: <%= $departure->{sched_arrival} %>
% }
@@ -88,10 +88,16 @@
<%= $left %>Gleis <%= $departure->{platform} // $departure->{scheduled_platform} %><%= $right %>
% }
% }
+% if ($departure->{arrival_hidden}) {
+ <br/><span class="timehidden">Nur Einstieg</span>
+% }
+% if ($departure->{departure_hidden}) {
+ <br/><span class="timehidden">Nur Ausstieg</span>
+% }
</div>
</div>
<div>
- <div class="departure">
+ <div class="departure <%= $departure->{departure_hidden} ? 'timehidden' : q{} %>">
% if ($departure->{is_cancelled} and $departure->{sched_departure}) {
<span class="minfo">Ab: ––:––</span><br/>Plan: <%= $departure->{sched_departure} %>
% }