summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep146
-rw-r--r--templates/_wagon.html.ep28
-rw-r--r--templates/about.html.ep53
-rw-r--r--templates/exception.html.ep2
-rw-r--r--templates/landingpage.html.ep2
-rw-r--r--templates/layouts/app.html.ep4
-rw-r--r--templates/layouts/legacy.html.ep6
-rw-r--r--templates/wagenreihung.html.ep52
8 files changed, 186 insertions, 107 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 24d2d55..f560950 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -27,7 +27,7 @@
% }
% elsif ($departure->{arrival}) {
% if ($departure->{arrival} ne $departure->{sched_arrival}) {
- % if (($departure->{delay} // 0) < 0) {
+ % if (($departure->{arrival_delay} // 0) < 0) {
An: <span class="undelay"><%= $departure->{arrival} %></span>
% }
% else {
@@ -45,6 +45,9 @@
% elsif ($departure->{prep_time}) {
Ein: <%= $departure->{prep_time} %>
% }
+% if ($departure->{tz_offset} and $departure->{local_sched_arr}) {
+ <br/>Lokal: <%= $departure->{local_sched_arr}->strftime('%H:%M') %>
+% }
</div>
</div>
<div>
@@ -65,10 +68,10 @@
% else {
% my $left = '';
% my $right = '';
-% if ($departure->{direction} and $departure->{direction} eq 'l') {
+% if ($departure->{wr_direction} and $departure->{wr_direction} eq 'l') {
% $left = '◀ ';
% }
-% elsif ($departure->{direction} and $departure->{direction} eq 'r') {
+% elsif ($departure->{wr_direction} and $departure->{wr_direction} eq 'r') {
% $right = ' ▶';
% }
% if ($departure->{scheduled_platform} and $departure->{platform}
@@ -107,46 +110,49 @@
% elsif ($departure->{sched_departure}) {
Ab: <%= $departure->{sched_departure} %>
% }
+% if ($departure->{tz_offset} and $departure->{local_sched_dep}) {
+ <br/>Lokal: <%= $departure->{local_sched_dep}->strftime('%H:%M') %>
+% }
</div>
</div>
</div> <!-- dataline -->
% if (my $wr = $departure->{wr}) {
<div class="wagonorder-preview">
-% my @wagons = $wr->wagons;
-% my $direction = $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{};
-% if ($departure->{direction}) {
-% $direction = $departure->{direction} eq 'l' ? '◀' : '▶';
-% if (($departure->{direction} eq 'l' ? 0 : 100) != $wr->direction) {
-% @wagons = reverse @wagons;
-% }
+% my $left = defined $wr->direction ? $wr->direction == 100 ? q{} : '←' : q{};
+% my $right = defined $wr->direction ? $wr->direction == 100 ? '→' : q{} : q{};
+% if ($departure->{wr_direction} and $departure->{wr_direction} eq 'l') {
+% $left = '◀';
+% $right = q{};
% }
- <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>">
- %= $direction
-% my $gi;
-% for my $wagon (@wagons) {
-% if (not ($wagon->is_locomotive or $wagon->is_powercar)) {
-% if (defined $gi and $gi != $wagon->group_index) {
- •
-% }
-%= $wagon->number || ($wagon->type =~ m{AB} ? '½' : $wagon->type =~ m{A} ? '1.' : $wagon->type =~ m{B} ? '2.' : '?' )
-% }
-% $gi = $wagon->group_index;
+% elsif ($departure->{wr_direction} and $departure->{wr_direction} eq 'r') {
+% $left = q{};
+% $right = '▶';
% }
- %= $direction
+ <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{wr_direction} // '' %>">
+ %= $left
+ % for my $entry ((defined $departure->{wr_direction_num} and $departure->{wr_direction_num} != $wr->direction) ? reverse @{$departure->{wr_preview} // []} : @{$departure->{wr_preview} // []}) {
+ % if ($entry->[1]) {
+ <span class="<%= $entry->[1] %>"><%= $entry->[0] %></span>
+ % }
+ % else {
+ %= $entry->[0]
+ % }
+ % }
+ %= $right
</a>
</div>
% }
<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;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;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 %>?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 %>?hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
% }
% }
% if ($departure->{wr_link}) {
- <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> <%= $departure->{wr_text} || 'Wagen' %>
+ <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?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}) {
@@ -232,6 +238,19 @@
% }
<ul class="mroute">
% for my $stop (@{$departure->{route_pre_diff}}) {
+% if ($stop->{is_annotated} and $stop->{prod_name}) {
+ <li class="annotation">
+% if ($stop->{prod_name}) {
+%= $stop->{prod_name}
+% }
+% if ($stop->{direction}) {
+ → <%= $stop->{direction} %>
+% }
+% if ($stop->{operator}) {
+ (<%= $stop->{operator} %>)
+% }
+ </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'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
% if ($stop->{isAdditional}) {
@@ -247,13 +266,16 @@
generic-stop
% }
% if (($stop->{rt_dep} and $stop->{dep_delay}) or (not $stop->{rt_dep} and $stop->{rt_arr} and $stop->{arr_delay})) {
- "><%= ($stop->{sched_dep} // $stop->{sched_arr})->strftime('%H:%M') %> (heute <%= ($stop->{rt_dep} // $stop->{rt_arr})->strftime('%H:%M') %>)
+ "><span class="time-sched-only"><%= ($stop->{sched_dep} // $stop->{sched_arr})->strftime('%H:%M') %></span> <span class="time-delayed"><%= ($stop->{rt_dep} // $stop->{rt_arr})->strftime('%H:%M') %></span>
+% }
+% elsif (($stop->{rt_dep} and defined $stop->{dep_delay}) or (not $stop->{rt_dep} and $stop->{rt_arr} and defined $stop->{arr_delay})) {
+ "><span class="time-sched-ontime"><%= ($stop->{sched_dep} // $stop->{sched_arr}) ? ($stop->{sched_dep} // $stop->{sched_arr})->strftime('%H:%M') : q{} %></span>
% }
% else {
- "><%= ($stop->{sched_dep} // $stop->{sched_arr}) ? ($stop->{sched_dep} // $stop->{sched_arr})->strftime('%H:%M') : q{} %>
-% if ($stop->{rt_bogus}) {
- <i class="material-icons" aria-label="Echtzeitdaten fehlen">gps_off</i>
-% }
+ "><span class="time-sched"><%= ($stop->{sched_dep} // $stop->{sched_arr}) ? ($stop->{sched_dep} // $stop->{sched_arr})->strftime('%H:%M') : q{} %></span>
+% }
+% if ($stop->{tz_offset} and $stop->{local_dt_da}) {
+ (lokal <%= $stop->{local_dt_da}->strftime('%H:%M') %>)
% }
<%= $stop->{name} %></a>
% if ($stop->{load}{FIRST} or $stop->{load}{SECOND}) {
@@ -264,15 +286,39 @@
</li>
% }
% if (stash('station_name')) {
- <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %> <%= $departure->{isPast} ? 'past-stop' : 'future-stop' %>"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %>
+% if ($departure->{is_annotated} and $departure->{prod_name}) {
+ <li class="annotation">
+% if ($departure->{prod_name}) {
+%= $departure->{prod_name}
+% }
+% if ($departure->{direction}) {
+ → <%= $departure->{direction} %>
+% }
+% if ($departure->{operator}) {
+ (<%= $departure->{operator} %>)
+% }
+ </li>
+% }
+ <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %> <%= $departure->{isPast} ? 'past-stop' : 'future-stop' %>">
% if ($departure->{departure} and $departure->{sched_departure} and $departure->{departure} ne $departure->{sched_departure}) {
- (heute <%= $departure->{departure} %>)
+ <span class="time-sched-only"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %></span><span class="time-delayed">
+% }
+% elsif ($departure->{departure} and $departure->{sched_departure} and $departure->{departure} eq $departure->{sched_departure} and not $departure->{no_realtime_yet}) {
+ <span class="time-sched-ontime">
% }
% elsif ($departure->{arrival} and $departure->{sched_arrival} and $departure->{arrival} ne $departure->{sched_arrival}) {
- (heute <%= $departure->{arrival} %>)
+ <span class="time-sched-only"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %></span><span class="time-delayed">
+% }
+% elsif ($departure->{arrival} and $departure->{sched_arrival} and $departure->{arrival} eq $departure->{sched_arrival} and not $departure->{no_realtime_yet}) {
+ <span class="time-sched-ontime">
+% }
+% else {
+ <span class="time-sched">
% }
-% if ($departure->{missing_realtime} or $departure->{no_realtime_yet}) {
- <i class="material-icons" aria-label="Echtzeitdaten fehlen">gps_off</i>
+%= $departure->{departure} // $departure->{arrival} // $departure->{sched_departure} // $departure->{sched_arrival} // q{}
+ </span>
+% if ($departure->{tz_offset} and $departure->{local_dt_da}) {
+ (lokal <%= $departure->{local_dt_da}->strftime('%H:%M') %>)
% }
<strong><%= stash('station_name') %></strong>
% if (my $u = $departure->{utilization}) {
@@ -283,6 +329,19 @@
</li>
% }
% for my $stop (@{$departure->{route_post_diff}}) {
+% if ($stop->{is_annotated} and $stop->{prod_name}) {
+ <li class="annotation">
+% if ($stop->{prod_name}) {
+%= $stop->{prod_name}
+% }
+% if ($stop->{direction}) {
+ → <%= $stop->{direction} %>
+% }
+% if ($stop->{operator}) {
+ (<%= $stop->{operator} %>)
+% }
+ </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'), hafas => param('hafas')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
% if ($stop->{isAdditional}) {
@@ -298,13 +357,16 @@
generic-stop
% }
% if (($stop->{rt_arr} and $stop->{arr_delay}) or (not $stop->{rt_arr} and $stop->{rt_dep} and $stop->{dep_delay})) {
- "><%= ($stop->{sched_arr} // $stop->{sched_dep})->strftime('%H:%M') %> (heute <%= ($stop->{rt_arr} // $stop->{rt_dep})->strftime('%H:%M') %>)
+ "><span class="time-sched-only"><%= ($stop->{sched_arr} // $stop->{sched_dep})->strftime('%H:%M') %></span> <span class="time-delayed"><%= ($stop->{rt_arr} // $stop->{rt_dep})->strftime('%H:%M') %></span>
+% }
+% elsif (($stop->{rt_arr} and defined $stop->{arr_delay}) or (not $stop->{rt_arr} and $stop->{rt_dep} and defined $stop->{dep_delay})) {
+ "><span class="time-sched-ontime"><%= ($stop->{sched_arr} // $stop->{sched_dep}) ? ($stop->{sched_arr} // $stop->{sched_dep})->strftime('%H:%M') : q{} %></span>
% }
% else {
- "><%= ($stop->{sched_arr} // $stop->{sched_dep}) ? ($stop->{sched_arr} // $stop->{sched_dep})->strftime('%H:%M') : q{} %>
-% if ($stop->{rt_bogus}) {
- <i class="material-icons" aria-label="Echtzeitdaten fehlen">gps_off</i>
-% }
+ "><span class="time-sched"><%= ($stop->{sched_arr} // $stop->{sched_dep}) ? ($stop->{sched_arr} // $stop->{sched_dep})->strftime('%H:%M') : q{} %></span>
+% }
+% if ($stop->{tz_offset} and $stop->{local_dt_ad}) {
+ (lokal <%= $stop->{local_dt_ad}->strftime('%H:%M') %>)
% }
<%= $stop->{name} %></a>
% if ($stop->{load}{FIRST} or $stop->{load}{SECOND}) {
@@ -316,8 +378,8 @@
% }
</ul> <!-- mroute -->
% }
-% if ($departure->{operator}) {
- <div class="details">Betrieb: <%= $departure->{operator} %></div>
+% if ($departure->{operators} and @{$departure->{operators} // []}) {
+ <div class="details">Betrieb: <%= join(q{, }, @{ $departure->{operators} // [] } ) %></div>
% }
% if ($departure->{details} and @{$departure->{details}}) {
<div class="details">Details:
diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep
index 94ef56a..59a2ca1 100644
--- a/templates/_wagon.html.ep
+++ b/templates/_wagon.html.ep
@@ -6,6 +6,9 @@
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% $extra_class .= ' powercar';
% }
+% if ($wagon->is_closed) {
+% $extra_class .= ' closed';
+% }
% if ($wagon->train_no ne $train_no) {
% $extra_class .= ' nondestwagon';
% }
@@ -13,6 +16,9 @@
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%; <%= $bg %>">
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% }
+% elsif ($wagon->is_closed) {
+ X
+% }
% else {
%= $wagon->number // '?'
% if ($wagon->has_accessibility) {
@@ -38,9 +44,9 @@
% }
% }
<div class="direction">
-% if (not defined $direction) {
+% if (not defined $wr->direction) {
% }
-% elsif ($direction == 100) {
+% elsif ($wr->direction == 100) {
<i class="material-icons">arrow_downward</i>
% }
% else {
@@ -51,7 +57,7 @@
<div class="details" style="
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;">
% if ($exit_dir ne 'right') {
-% if (my $img = wagon_image($wagon->train_subtype // $type // '?', $wagon->type, $wagon->uic_id)) {
+% if (my $img = wagon_image($wagon->train_subtype // $wr->train_type // '?', $wagon->type, $wagon->uic_id)) {
<a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&amp;s=<%= $wagon->section %>&amp;r=<%= $wref %>"><%= $wagon->type %></a>
% }
% else {
@@ -71,7 +77,7 @@
<span class="uicexchange"><%= substr($uic_id, 0, 2) %></span><span class="uiccountry"><%= substr($uic_id, 2, 2) %></span><span class="uic56"><%= substr($uic_id, 4, 2) %></span><span class="uic78"><%= substr($uic_id, 6, 2) %></span><span class="uicno"><%= substr($uic_id, 8, 3) %></span><span class="uiccheck"><%= substr($uic_id, 11) %></span>
% }
% if ($exit_dir eq 'right') {
-% if (my $img = wagon_image($wagon->train_subtype // $type // '?', $wagon->type, $wagon->uic_id)) {
+% if (my $img = wagon_image($wagon->train_subtype // $wr->train_type // '?', $wagon->type, $wagon->uic_id)) {
<a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&amp;s=<%= $wagon->section %>&amp;r=<%= $wref %>"><%= $wagon->type %></a>
% }
% else {
@@ -80,4 +86,18 @@
</span>
% }
% }
+% if ($multi and $first) {
+ <br/>
+ <span class="groupno">
+% if (scalar $wr->train_nos > 1) {
+ <%= $wr->train_type %> <%= ($wr->groups)[$wagon->group_index]->train_no %>
+% }
+% if (scalar $wr->destinations > 1) {
+ → <%= $wr->{data}{istformation}{allFahrzeuggruppe}[$wagon->group_index]{zielbetriebsstellename} %>
+% }
+ </span>
+ % if ($multi and ($wr->groups)[$wagon->group_index]->desc_short) {
+ <span class="grouptype"><%= ($wr->groups)[$wagon->group_index]->desc_short %></span>
+% }
+% }
</div>
diff --git a/templates/about.html.ep b/templates/about.html.ep
index f299389..b5af92b 100644
--- a/templates/about.html.ep
+++ b/templates/about.html.ep
@@ -4,7 +4,7 @@
Der Fokus liegt auf Zügen im Netz der Deutschen Bahn; eingeschränkte Unterstützung für Nahverkehr und Züge in anderen Netzen lässt sich optional zuschalten.
</p>
<p>
- Der <a href="<%= app->config->{'source_url'} %>">Quelltext</a> steht unter der <a href="https://git.finalrewind.org/db-fakedisplay/tree/COPYING">GNU AGPL v3</a> als Open Source zur Verfügung. © 2011 – 2023 <a href="https://finalrewind.org">derf</a>.
+ Der <a href="<%= app->config->{'source_url'} %>">Quelltext</a> steht unter der <a href="https://git.finalrewind.org/db-fakedisplay/tree/COPYING">GNU AGPL v3</a> als Open Source zur Verfügung. © 2011 – 2024 <a href="https://finalrewind.org">derf</a>.
% if (my $issue_url = app->config->{'issue_url'}) {
Fehlermeldungen bitte via
<a href="<%= $issue_url %>">Issue Tracker</a>.
@@ -17,32 +17,37 @@
und die Bezeichnung DBF wurde zum Eigennamen ohne weitere Bedeutung.
</p>
<p>
- Diese Installation verwendet die DBF-Version
- <b><%= stash('version') // '???' %></b> und greift auf die folgenden Backends
- zu:<br/>
- • Regional- und Fernverkehr: 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/>
- • Nahverkehr und Zugdetails: DB HAFAS via <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 %>
+ Diese Installation nutzt
+ <strong>DBF v<%= stash('version') // '???' %></strong> mit folgenden Backends:
+ <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> Außerdeutsche Fahrten, Nahverkehr, Details, Karten: 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>Wagenreihung: <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>Zugauslastung Regionalverkehr: VRR EFA via <a href="https://github.com/derf/eva-to-efa-gw">eva-to-efa-gw</a></li>
+ </ul>
+ </p>
+ <p>
+ Unterstützte HAFAS-Instanzen („hafas=…“):
+ <ul>
+ % for my $service (Travel::Status::DE::HAFAS::get_services()) {
+ <li><%= $service->{shortname} %> (<%= $service->{name} %>)</li>
% }
- <br/>
- • Zugauslastung Regionalverkehr: VRR EFA via <a href="https://github.com/derf/eva-to-efa-gw">eva-to-efa-gw</a><br/>
- <br/>
- Sie nutzt zusätzlich die folgenden Open Data-Ressourcen:<br/>
- • <a href="https://data.deutschebahn.com/dataset/zugbildungsplanzugbildungsplan-zpar">Zugbildungsplan</a> © DB Fernverkehr AG, lizensiert unter CC-BY 4.0
- <br/>
- • <a href="http://data.deutschebahn.com/dataset/data-haltestellen">Haltestellenliste</a>
+ </ul>
+ </p>
+ <p>
+ Verwendete Open Data-Ressourcen:
+ <ul>
+ <li><a href="https://data.deutschebahn.com/dataset/zugbildungsplanzugbildungsplan-zpar">Zugbildungsplan</a> © DB Fernverkehr AG, lizensiert unter CC-BY 4.0</li>
+ <li><a href="http://data.deutschebahn.com/dataset/data-haltestellen">Haltestellenliste</a>
© DB Station&amp;Service AG,
Europaplatz 1,
- 10557 Berlin, lizensiert unter CC-BY 4.0<br/>
- • <a href="https://data.deutschebahn.com/dataset/fahrzeuglexikon">Fahrzeuglexikon</a>
- © DB Fernverkehr AG, lizensiert unter CC-BY 4.0; Abbildungen © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG, lizensiert unter CC-BY-SA 4.0<br/>
+ 10557 Berlin, lizensiert unter CC-BY 4.0</li>
+ <li><a href="https://data.deutschebahn.com/dataset/fahrzeuglexikon">Fahrzeuglexikon</a>
+ © DB Fernverkehr AG, lizensiert unter CC-BY 4.0; Abbildungen © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG, lizensiert unter CC-BY-SA 4.0</li>
+ </ul>
</p>
</div>
diff --git a/templates/exception.html.ep b/templates/exception.html.ep
index 65ec7ff..7654c0b 100644
--- a/templates/exception.html.ep
+++ b/templates/exception.html.ep
@@ -5,7 +5,7 @@ Beim Bearbeiten der Anfrage ist ein Fehler aufgetreten.<br/>
<pre>
----------[Debug start]----------
% if ($exception) {
-%= $exception->message
+%= ref($exception) ? $exception->message : $exception
Stash:
%= dumper $snapshot
% }
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 82128ca..17bb2bb 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -21,7 +21,7 @@
</p>
% }
<p class="geolink">
-<a class="button" href="<%= url_for('_autostop')->to_abs->scheme('https') %>">Stationen in der Umgebung suchen</a>
+<a class="button" href="<%= url_for('_autostop')->to_abs->scheme('https')->query({hafas => param('hafas')}) %>">Stationen in der Umgebung suchen</a>
</p>
<p>
Oder hier angeben:
diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep
index 9cc81e9..9c39019 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 = 'v89'; # asset version
+ % my $av = 'v99'; # asset version
% if (session('theme') and session('theme') eq 'dark' or param('dark')) {
%= stylesheet "/static/${av}/css/dark.min.css", id => 'theme'
% }
@@ -138,7 +138,7 @@ Bitte eine Station aus der Liste auswählen</div>
</div>
% if (stash('input')) {
<div class="geolink">
- <a class="button" href="<%= url_for('_autostop')->to_abs->scheme('https') %>">Stationen in der Umgebung suchen</a>
+ <a class="button" href="<%= url_for('_autostop')->to_abs->scheme('https')->query({hafas => param('hafas')}) %>">Stationen in der Umgebung suchen</a>
</div>
% }
<div class="break"></div>
diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep
index e0265d0..5389c4b 100644
--- a/templates/layouts/legacy.html.ep
+++ b/templates/layouts/legacy.html.ep
@@ -17,13 +17,13 @@
<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }
- % my $av = 'v89'; # asset version
- %= stylesheet "/static/${av}/css/default.css"
+ % my $av = 'v99'; # asset version
+ %= stylesheet "/static/${av}/css/legacy.css"
%= stylesheet "/static/${av}/css/material-icons.css"
%= stylesheet "/static/${av}/css/jquery-ui.min.css"
% my $force_mobile = param('force_mobile') // stash('force_mobile');
% if ($force_mobile) {
- %= stylesheet "/static/${av}/css/mobile.css"
+ %= stylesheet "/static/${av}/css/legacy-mobile.css"
% }
%if (stash('load_marquee')) {
%= javascript '/static/js/jquery-3.4.1.min.js'
diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep
index 493d9c6..6781dca 100644
--- a/templates/wagenreihung.html.ep
+++ b/templates/wagenreihung.html.ep
@@ -7,37 +7,10 @@
</div>
% }
% else {
- % my $has_multi_dest = 0;
- % my $has_multi_desc = 0;
- % if (scalar $wr->destinations > 1) {
- % $has_multi_dest = 1;
- % }
- % if (scalar $wr->train_descriptions > 1) {
- % $has_multi_desc = 1;
- % }
<div class="container">
<div style="text-align: center;">
-%= join( ' / ', $wr->origins )
- →
-%= join( ' / ', map { $_->{name} } $wr->destinations )
+ <%= $wr->station->{name} %> Gleis <%= $wr->platform %><br/>
</div>
- % if ($has_multi_dest) {
- <div style="text-align: center;">
- % for my $destination ($wr->destinations) {
- Nach <%= $destination->{name} %> in Abschnitt <%= join(q{}, sort @{$destination->{sections} // []}) %><br/>
- % }
- </div>
- % }
- <%= $wr->station_name %> Gleis <%= $wr->platform %><br/>
- % for my $desc ($wr->train_descriptions) {
- % if ($desc->{text}) {
- %= $desc->{text}
- % if ($has_multi_desc and length(join(q{}, sort @{$desc->{sections}}))) {
- in Abschnitt <%= join(q{}, sort @{$desc->{sections}}) %>
- % }
- <br/>
- % }
- % }
</div>
<div class="container">
<div class="wagonorder exit-<%= stash('exit_dir') // 'unknown'%>">
@@ -49,10 +22,29 @@
</div>
% }
% }
-% for my $wagon ($wr->wagons) {
-%= include '_wagon', direction => $wr->direction, wagon => $wagon, type => $wr->train_type, wref => $wref, exit_dir => stash('exit_dir');
+% for my $group ($wr->groups) {
+% my $first = 1;
+% for my $wagon ($group->wagons) {
+%= include '_wagon', wr => $wr, wagon => $wagon, first => $first, multi => (scalar $wr->destinations) - 1 + (scalar $wr->train_nos) - 1, wref => $wref, exit_dir => stash('exit_dir');
+% $first = 0;
+% }
% }
</div>
+ <div style="text-align: center;">
+%= join( ' / ', map { $_->{name} } $wr->origins )
+ →
+%= join( ' / ', map { $_->{name} } $wr->destinations )
+ </div>
+ % for my $group ($wr->groups) {
+ % if ($group->description) {
+ <div style="text-align: center;">
+ %= $group->description
+ % if (scalar $wr->groups > 1 and $group->has_sections) {
+ in Abschnitt <%= join(q{}, sort $group->sections) %>
+ % }
+ </div>
+ % }
+ % }
<!-- <div>
Legende: ♿ Behindertengerechte Ausstattung / 🍴 Bistro/Restaurant / 🚪 Abteile vorhanden
</div>