summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-29 13:04:01 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-29 13:04:01 +0200
commitdaa8cc5a72bd10d732912595bf0ca2ad3bf167c4 (patch)
tree1455129763e0070dc77ec5880b1c32f64b7d2abe /templates
parent3f4fc57ba097ce969031ab1a1398d4bb657ca056 (diff)
use T-S-DE-HAFAS for train details
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep6
-rw-r--r--templates/about.html.ep11
-rw-r--r--templates/exception.html.ep5
3 files changed, 13 insertions, 9 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 5bd42c9..e5d5c72 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -165,7 +165,7 @@
<ul class="messages">
% for my $pair (@{$departure->{moreinfo}}) {
<li>
-% if ($pair->[0]->isa('DateTime')) {
+% if (ref($pair->[0]) eq 'DateTime') {
% if ($pair->[0]->day != $dt_now->day) {
% $pair->[0]->set_locale('de_DE');
%= $pair->[0]->strftime('%a %H:%M')
@@ -214,7 +214,7 @@
% else {
generic-stop
% }
-% if ($stop->{rt_dep}) {
+% if ($stop->{rt_dep} and $stop->{dep_delay}) {
"><%= $stop->{sched_dep}->strftime('%H:%M') %> (heute <%= $stop->{rt_dep}->strftime('%H:%M') %>) <%= $stop->{name} %></a>
% }
% else {
@@ -259,7 +259,7 @@
% else {
generic-stop
% }
-% if ($stop->{rt_arr}) {
+% if ($stop->{rt_arr} and $stop->{arr_delay}) {
"><%= $stop->{sched_arr}->strftime('%H:%M') %> (heute <%= $stop->{rt_arr}->strftime('%H:%M') %>) <%= $stop->{name} %></a>
% }
% else {
diff --git a/templates/about.html.ep b/templates/about.html.ep
index 1c04456..ce375d5 100644
--- a/templates/about.html.ep
+++ b/templates/about.html.ep
@@ -25,17 +25,16 @@
zu:<br/>
• Abfahrtstafel: DB IRIS via <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a>
v<%= $Travel::Status::DE::IRIS::VERSION %><br/>
- • Meldungen und Ankunft/Abfahrt an Unterwegshalten: DB HAFAS via <a href="https://git.finalrewind.org/db-fakedisplay/tree/lib/DBInfoscreen/Helper/HAFAS.pm">Helper/HAFAS.pm</a><br/>
+ • Zugdetails: <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
+ % if ($Travel::Status::DE::HAFAS::VERSION) {
+ v<%= $Travel::Status::DE::HAFAS::VERSION %>
+ % }
+ <br/>
• Wagenreihung: <a href="https://finalrewind.org/projects/Travel-Status-DE-DBWagenreihung/">Travel::Status::DE::DBWagenreihung</a>
% if ($Travel::Status::DE::DBWagenreihung::VERSION) {
v<%= $Travel::Status::DE::DBWagenreihung::VERSION %>
% }
<br/>
- • Karte: <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
- % if ($Travel::Status::DE::HAFAS::VERSION) {
- v<%= $Travel::Status::DE::HAFAS::VERSION %>
- % }
- <br/>
• Zugauslastung Fernverkehr: DB HAFAS via <a href="https://docs.bahn.expert/">bahn.expert</a><br/>
• Zugauslastung Regionalverkehr: VRR EFA via <a href="https://github.com/derf/eva-to-efa-gw">eva-to-efa-gw</a><br/>
<br/>
diff --git a/templates/exception.html.ep b/templates/exception.html.ep
index 2f20bc6..65ec7ff 100644
--- a/templates/exception.html.ep
+++ b/templates/exception.html.ep
@@ -4,9 +4,14 @@ Beim Bearbeiten der Anfrage ist ein Fehler aufgetreten.<br/>
<pre>
----------[Debug start]----------
+% if ($exception) {
%= $exception->message
Stash:
%= dumper $snapshot
+% }
+% else {
+%= stash('message')
+% }
----------[Debug end]----------
</pre>
</div>