From 9e92134e0441444f46f11c244d80081809f41fcb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 26 Nov 2018 18:33:50 +0100 Subject: add quick&dirty wagon order integration --- templates/app.html.ep | 6 ++++++ templates/layouts/default.html.ep | 2 ++ templates/wagenreihung.html.ep | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 templates/wagenreihung.html.ep (limited to 'templates') diff --git a/templates/app.html.ep b/templates/app.html.ep index 88e6586..80e17d2 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -143,6 +143,12 @@ % } % } +% if ($linetype eq 'fern' and $departure->{wr_link}) { +
+ Wagenreihung +
+% } + % } % if ($departure->{route_post_diff} and @{$departure->{route_post_diff}}) {
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index d7d6e70..163955b 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -232,6 +232,8 @@ nur Züge via Bochum oder Hamm) db-infoscreen v<%= stash('version') // '???' %>
Backends:
+Travel::Status::DE::DBWagenreihung +v<%= $Travel::Status::DE::DBWagenreihung::VERSION %>
Travel::Status::DE::HAFAS v<%= $Travel::Status::DE::HAFAS::VERSION %>
Travel::Status::DE::IRIS diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep new file mode 100644 index 0000000..9055f00 --- /dev/null +++ b/templates/wagenreihung.html.ep @@ -0,0 +1,30 @@ +
+
+(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} // '?' +% } +
+% } +
+ +
-- cgit v1.2.3