summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-14 19:18:19 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-14 19:18:19 +0100
commit4609b7312d67063b2cb0d5803260d7dc25475bc2 (patch)
tree5ef3cf76763c9bd883838bc2dd161fb565d86e2e /templates
parent3c85cd22395be60462959ee7d3cf59d0e939b6a3 (diff)
show expected wagon order whan real-time data is not available
work in progress.
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep3
-rw-r--r--templates/not_found.html.ep5
-rw-r--r--templates/zugbildung_db.html.ep26
3 files changed, 34 insertions, 0 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index e1ce093..7c3ee4a 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -112,6 +112,9 @@
<a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>"><i class="material-icons" aria-hidden="true">train</i> Wagenreihung
</a>
% }
+% elsif ($icetype and $icetype->[2] and $linetype eq 'fern') {
+ <a class="smallbutton" href="/zb-db/<%= $departure->{train_no} %>"><i class="material-icons" aria-hidden="true">train</i> Plan: <%= $icetype->[0] %></a>
+% }
% elsif ($icetype and $icetype->[1] and $linetype eq 'fern') {
<span class="disabledbutton"><i class="material-icons" aria-hidden="true">train</i> Plan: <%= $icetype->[0] %></span>
% }
diff --git a/templates/not_found.html.ep b/templates/not_found.html.ep
index df583ae..c03d32d 100644
--- a/templates/not_found.html.ep
+++ b/templates/not_found.html.ep
@@ -1,7 +1,12 @@
<div class="container">
<div class="error">
<strong>404 Page Not Found:</strong>
+% if (my $e = stash('message')) {
+%= $e
+% }
+% else {
Die aufgerufene URL existiert nicht und ist keine gültige Abbildung auf einen
Bahnhofsnamen.
+% }
</div>
</div>
diff --git a/templates/zugbildung_db.html.ep b/templates/zugbildung_db.html.ep
new file mode 100644
index 0000000..9edf790
--- /dev/null
+++ b/templates/zugbildung_db.html.ep
@@ -0,0 +1,26 @@
+% if ($wr_error) {
+ <div class="container">
+ <div class="error">
+ <strong>Fehler bei der Abfrage der Wagenreihung:</strong>
+ <%= $wr_error %>
+ </div>
+ </div>
+% }
+<div class="container">
+ <div style="text-align: center;">
+%= $zb->{route}
+ </div>
+ Vorgesehener Zugtyp: <%= $zb->{type} %>
+</div>
+<div class="container">
+ <div class="wagonorder">
+% for my $wagon (@{$wagons // []}) {
+%= include '_wagon', direction => undef, wagon => $wagon;
+% }
+ </div>
+ <div>
+ Die Angaben wurden automatisch aus den Solldaten gemäß Zugbildungsplan extrahiert.
+ Fehler sind möglich. © 2020 DB Fernverkehr AG und Daniel Friesel, CC-BY 4.0.
+ </div>
+
+ </div>