From 41e25a0b9cd322959137a8cf07f822cfe043b4bb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 31 Dec 2018 14:43:38 +0100 Subject: wagon order: slightly less ugly. just slightly. --- templates/wagenreihung.html.ep | 68 +++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 30 deletions(-) (limited to 'templates') diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index 642c460..cbe240b 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -1,33 +1,41 @@
-
-(experimentell, die URL wird sich noch ändern und die Anzeige wird noch schöner) -
- -
-% for my $section ($wr->sections) { -
-%= $section->{name} -
-% } -% for my $wagon ($wr->wagons) { -% my $bg = ''; -% if ($wagon->is_first_class) { -% $bg = 'background-color: #ffff99;'; -% } -
-% if ($wagon->is_locomotive or $wagon->is_powercar) { -LOK -% } -% else { -%= $wagon->number // '?' -% } -    -%= $wagon->type -
-% } -
+
+% for my $section ($wr->sections) { +
+%= $section->{name} +
+% } +% for my $wagon ($wr->wagons) { +% my $bg = ''; +% if ($wagon->is_first_class) { +% $bg = 'background-color: #ffff99;'; +% } +
+% if ($wr->direction == 100) { + ↓ +% } +% else { + ↑ +% } +
+
+% if ($wagon->is_locomotive or $wagon->is_powercar) { + LOK +% } +% else { +%= $wagon->number // '?' +% } +
+
+%= $wagon->type +
+% } +
-- cgit v1.2.3