summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep12
-rw-r--r--templates/about.html.ep10
-rw-r--r--templates/app.html.ep25
-rw-r--r--templates/landingpage.html.ep2
-rw-r--r--templates/layouts/app.html.ep17
-rw-r--r--templates/layouts/legacy.html.ep2
-rw-r--r--templates/select_backend.html.ep5
-rw-r--r--templates/wagenreihung.html.ep4
8 files changed, 46 insertions, 31 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index dab05d0..2c18da2 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -145,17 +145,19 @@
<div class="verbose">
% if ($departure->{trip_id}) {
% if (stash('station_name')) {
- <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?from=<%= stash('station_name') %>&amp;efa=<%= param('efa') // q{} %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?from=<%= stash('station_name') %>&amp;dbris=<%= param('dbris') %>&amp;efa=<%= param('efa') // q{} %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
% }
% else {
- <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?efa=<%= param('efa') // q{} %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?dbris=<%= param('dbris') %>&amp;efa=<%= param('efa') // q{} %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
% }
% }
% if ($departure->{wr_link}) {
<a class="smallbutton" href="/carriage-formation?<%= $departure->{wr_link} %>&amp;e=<%= $departure->{wr_direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> <%= $departure->{wr_text} || 'Wagen' %>
</a>
% }
-% if ($departure->{train_type} and $departure->{train_no} and (not param('hafas') or param('hafas') eq 'DB')) {
+% if ($departure->{trip_id} and param('dbris') and param('dbris') eq 'bahn.de') {
+ <a class="smallbutton" href="https://bahn.expert/details/x/h/<%= Mojo::Util::url_escape( $departure->{trip_id} ) %>"><img src="/static/icons/bahn-expert.svg">Details</a>
+% } elsif ($departure->{train_type} and $departure->{train_no} and (not param('hafas') or param('hafas') eq 'DB')) {
<a class="smallbutton" href="https://bahn.expert/details/<%= $departure->{train_type} %>%20<%= $departure->{train_no} %>/<%= ($departure->{date} // DateTime->now(time_zone => 'Europe/Berlin'))->iso8601 %>?evaNumberAlongRoute=<%= $departure->{eva} %>"><img src="/static/icons/bahn-expert.svg">Details</a>
% }
% for my $link (@{$departure->{links}}) {
@@ -252,7 +254,7 @@
</li>
% }
<li class="<%= $stop->{isPast} ? 'past-stop' : 'future-stop' %>">
- <a href="<%= url_for('station', station => $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
+ <a href="<%= url_for('station', station => $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), dbris => param('dbris'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ((param('dbris') or param('hafas')) and $departure->{trip_id}) ? ($departure->{trip_id} =~ s{[ #|]}{x}gr) : (($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x})) %>" class="
% if ($stop->{isAdditional}) {
additional-stop
% }
@@ -347,7 +349,7 @@
</li>
% }
<li class="<%= $stop->{isPast} ? 'past-stop' : 'future-stop' %>">
- <a href="<%= url_for('station', station => $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
+ <a href="<%= url_for('station', station => $stop->{eva} // $stop->{name})->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), dbris => param('dbris'), efa => param('efa'), hafas => param('hafas')}) %>#<%= ((param('dbris') or param('hafas')) and $departure->{trip_id}) ? ($departure->{trip_id} =~ s{[ #|]}{x}gr) : (($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x})) %>" class="
% if ($stop->{isAdditional}) {
additional-stop
% }
diff --git a/templates/about.html.ep b/templates/about.html.ep
index b34aa55..3bf8295 100644
--- a/templates/about.html.ep
+++ b/templates/about.html.ep
@@ -18,12 +18,14 @@
<ul>
<li>Innerdeutscher Regional- und Fernverkehr: DB IRIS via <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a>
<strong>v<%= $Travel::Status::DE::IRIS::VERSION %></strong></li>
+ <li>Nah-, Regional- und Fernverkehr im In- und Ausland: bahn.de via <a href="https://finalrewind.org/projects/Travel-Status-DE-DBRIS/">Travel::Status::DE::DBRIS</a>
+ <strong>v<%= $Travel::Status::DE::DBRIS::VERSION %></strong></li>
+ <li>Nah-, Regional- und Fernverkehr im In- und Ausland: EFA via <a href="https://finalrewind.org/projects/Travel-Status-DE-VRR/">Travel::Status::DE::EFA</a>
+ <strong>v<%= $Travel::Status::DE::EFA::VERSION %></strong></li>
<li>Nah-, Regional- und Fernverkehr im In- und Ausland: HAFAS via <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
<strong>v<%= $Travel::Status::DE::HAFAS::VERSION %></strong></li>
- <li>Nah- und Regionalverkehr im In- und Ausland: EFA via <a href="https://finalrewind.org/projects/Travel-Status-DE-VRR/">Travel::Status::DE::EFA</a>
- <strong>v<%= $Travel::Status::DE::EFA::VERSION %></strong></li>
- <li>Wagenreihung im Netz der DB InfraGO: <a href="https://finalrewind.org/projects/Travel-Status-DE-DBWagenreihung/">Travel::Status::DE::DBWagenreihung</a>
- <strong>v<%= $Travel::Status::DE::DBWagenreihung::VERSION %></strong></li>
+ <li>Nah-, Regional- und Fernverkehr im In- und Ausland: MOTIS via <a href="https://finalrewind.org/projects/Travel-Status-MOTIS/">Travel::Status::MOTIS</a>
+ <strong>v<%= $Travel::Status::MOTIS::VERSION %></strong></li>
</ul>
</p>
<p>
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 9356e27..8b52c61 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -30,7 +30,7 @@
% $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{});
% }
<li
-% if (param('hafas') or param('efa')) {
+% if (param('dbris') or param('hafas') or param('efa')) {
data-jid="<%= $departure->{journey_id} =~ s{#}{%23}gr %>"
% }
data-train="<%= ($departure->{train_type} // q{}) %> <%= ($departure->{train_no} // $departure->{train} // q{}) %>"
@@ -53,15 +53,23 @@
>
% }
% if (param('hafas')) {
- <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=' . Mojo::Util::url_escape(param('hafas')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>">
+ <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=' . Mojo::Util::url_escape(param('hafas')) . '&amp;highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>">
% }
% elsif (param('efa')) {
- <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?efa=' . Mojo::Util::url_escape(param('efa')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>">
+ <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?efa=' . Mojo::Util::url_escape(param('efa')) . '&amp;highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>">
+% }
+% elsif (param('dbris')) {
+ <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?dbris=' . Mojo::Util::url_escape(param('dbris')) . '&amp;highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>">
% }
% else {
<a href="/z/<%= Mojo::Util::url_escape(($departure->{train_type} // q{}) . ' ' . ($departure->{train_no} // $departure->{train} // q{})) . '/' . Mojo::Util::url_escape($departure->{station} // $station) %>">
% }
- <div class="anchor" id="<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>"></div>
+% if (param('dbris') or param('hafas')) {
+ <div class="anchor" id="<%= $departure->{journey_id} =~ s{[ #|]}{x}gr %>"></div>
+% }
+% else {
+ <div class="anchor" id="<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>"></div>
+% }
<div class="line <%= $departure->{linetype} %>">
% if ($departure->{train_type} and $departure->{train_no}) {
%= $departure->{train_type}
@@ -104,7 +112,7 @@
</span>
% }
<span class="time <%= $show_realtime ? get_rt_time_class($departure) : q{} %>">
-% if ($departure->{delay} and not $departure->{is_cancelled}) {
+% if ($departure->{delay} and not $departure->{is_cancelled} and not $departure->{departure_is_cancelled}) {
% if ($show_realtime and ($departure->{sched_arrival} or $departure->{sched_departure})) {
% if ($departure->{delay} > ($hide_low_delay ? 4 : 0)) {
<span class="delaynorm" aria-hidden="true"><%= $departure->{sched_departure} // $departure->{sched_arrival} %> ⇒</span>
@@ -142,7 +150,12 @@
% }
% }
% else {
-%= $departure->{time}
+% if ($departure->{is_cancelled} or $departure->{departure_is_cancelled}) {
+%= $departure->{sched_departure} // $departure->{sched_arrival} // $departure->{time}
+% }
+% else {
+%= $departure->{time}
+% }
% }
</span>
% if (($departure->{scheduled_platform} and $departure->{platform} and
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 5f0ba71..80fd34f 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -25,7 +25,7 @@
<a class="button" href="<%= url_for('_autostop')->to_abs->scheme('https')->query({efa => param('efa'), hafas => param('hafas')}) %>">Stationen in der Umgebung suchen</a>
</p>
<p>
-Oder hier angeben:
+Oder hier eine Station angeben:
</p>
</div>
% }
diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep
index d434ee2..c557bee 100644
--- a/templates/layouts/app.html.ep
+++ b/templates/layouts/app.html.ep
@@ -18,7 +18,7 @@
<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }
- % my $av = 'v105'; # asset version
+ % my $av = 'v110'; # asset version
% if (session('theme') and session('theme') eq 'dark' or param('dark')) {
%= stylesheet "/static/${av}/css/dark.min.css", id => 'theme'
% }
@@ -121,18 +121,15 @@ Bitte eine Station aus der Liste auswählen</div>
%= hidden_field hafas => param('hafas')
<div>
<div class="field">
- <div class="desc">Stationsname oder Fahrtnummer:</div>
- <div>
-% if (stash('stationlist')) {
+% if (stash('stationlist')) {
%= select_field input => stash('stationlist')
-% }
-% elsif (stash('input')) {
+% }
+% elsif (stash('input')) {
%= text_field 'input', class => 'station', placeholder => 'Stationsname oder Fahrtnummer', id => 'stationinput'
-% }
-% else {
+% }
+% else {
%= text_field 'input', class => 'station', placeholder => 'Stationsname oder Fahrtnummer', id => 'stationinput', autofocus => 'autofocus'
-% }
- </div>
+% }
</div>
<div class="field">
%= submit_button 'Abfahrtstafel'
diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep
index e7f828d..e7e59ec 100644
--- a/templates/layouts/legacy.html.ep
+++ b/templates/layouts/legacy.html.ep
@@ -17,7 +17,7 @@
<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }
- % my $av = 'v105'; # asset version
+ % my $av = 'v110'; # asset version
%= stylesheet "/static/${av}/css/legacy.css"
%= stylesheet "/static/${av}/css/material-icons.css"
%= stylesheet "/static/${av}/css/jquery-ui.min.css"
diff --git a/templates/select_backend.html.ep b/templates/select_backend.html.ep
index 2603800..c6d2a4c 100644
--- a/templates/select_backend.html.ep
+++ b/templates/select_backend.html.ep
@@ -1,9 +1,10 @@
<div class="container">
<p>
Das Backend bestimmt die Datenquelle für Stations- und Zuginformationen.
- Innerhalb Deutschlands ist <strong>Deutsche Bahn</strong> meist eine gute Wahl: IRIS-TTS kennt ausschließlich Schienenverkehr im Bahnnetz, während HAFAS auch Nahverkehr unterstützt.
- Die anderen Backends bieten sich für Fahrten im Ausland oder im zugehörigen Verkehrsverbund an.
+ Innerhalb Deutschlands ist <strong>Deutsche Bahn</strong> via IRIS-TTS eine gute Wahl für Schienenverkehr im Bahnnetz.
+ Die anderen Backends bieten sich für Fahrten im zugehörigen Verkehrsverbund (inklusive Nahverkehr) sowie im Ausland an.
Sofern bekannt sind unterhalb der Backend-Namen Karten verlinkt, die die ungefähre Abdeckung aufzeigen.
+ Ein Backend, welches Nah- und Fernverkehr in ganz Deutschland abdeckt, ist aktuell leider nicht verfügbar.
</p>
<p>
% my $prev_type = 'IRIS-TTS';
diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep
index 3da4257..19c49ab 100644
--- a/templates/wagenreihung.html.ep
+++ b/templates/wagenreihung.html.ep
@@ -1,8 +1,8 @@
-% if (not $wr or $wr->errstr) {
+% if (not $wr or $wr_error) {
<div class="container">
<div class="error">
<strong>Fehler bei der Abfrage der Wagenreihung:</strong>
- <%= $wr ? $wr->errstr : $wr_error %>
+ <%= $wr_error // 'Unbekannter Fehler' %>
</div>
</div>
% }