summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-25 21:15:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-25 21:15:21 +0100
commitde9ea41ca265860947e6df94ab6b4934331876bc (patch)
tree2c3ecce5efd10aea2fa2805e4589c49880801478
parent084fe3eb9603243753609c4c3742b01bf225e7b6 (diff)
show direction in wagon view
-rw-r--r--lib/DBInfoscreen/Controller/Wagenreihung.pm1
-rw-r--r--templates/wagen.html.ep20
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm
index 073d762..daa2cda 100644
--- a/lib/DBInfoscreen/Controller/Wagenreihung.pm
+++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm
@@ -118,6 +118,7 @@ sub wagenreihung {
}
my $wref = {
+ d => $wr->direction,
tt => $wr->train_type,
tn => $train,
s => $wr->station_name,
diff --git a/templates/wagen.html.ep b/templates/wagen.html.ep
index 26edbf5..68cf221 100644
--- a/templates/wagen.html.ep
+++ b/templates/wagen.html.ep
@@ -4,9 +4,29 @@
<%= $wref->{s} %>: Gleis <%= $wref->{p} %> <%= $wref->{ws} %>
</p>
% }
+ % if (defined $wref->{d}) {
+ <div style="text-align: center;">
+ % if ($wref->{d} == 100) {
+ <i class="material-icons">arrow_back</i>
+ % }
+ % else {
+ <i class="material-icons">arrow_forward</i>
+ % }
+ </div>
+ % }
<div>
<a href="<%= $wagon_file %>"><img src="<%= $wagon_file %>" style="width: 100%;"></a>
</div>
+ % if (defined $wref->{d}) {
+ <div style="text-align: center;">
+ % if ($wref->{d} == 100) {
+ <i class="material-icons">arrow_back</i>
+ % }
+ % else {
+ <i class="material-icons">arrow_forward</i>
+ % }
+ </div>
+ % }
<p class="copyright">
Abbildung © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG,
lizensiert unter CC-BY-4.0