diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-09 18:20:51 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-09 18:20:51 +0200 |
commit | bfb1e834ce6c3171011dc20b32117065960b8771 (patch) | |
tree | d564322a73fd66a911fc2fdb3e951afe8c0db970 /templates | |
parent | 42f9a00d98dbd675234c05b3e25c3e722cfdd7ba (diff) | |
parent | f1da50f9f18f0a2a5fd202daff4b6f0b517f35e0 (diff) |
Merge branch 'main' into efa-support
Diffstat (limited to 'templates')
25 files changed, 566 insertions, 163 deletions
diff --git a/templates/_backend_line.html.ep b/templates/_backend_line.html.ep index e640cfe..00496d3 100644 --- a/templates/_backend_line.html.ep +++ b/templates/_backend_line.html.ep @@ -6,7 +6,7 @@ % } % if ($backend->{has_area}) { <br/> - <a href="https://dbf.finalrewind.org/coverage/<%= uc($backend->{type}) %>/<%= $backend->{name} %>"><%= join(q{, }, @{$backend->{regions} // []}) || '[Karte]' %></a> + <a href="https://dbf.finalrewind.org/coverage/<%= $backend->{type} %>/<%= $backend->{name} %>"><%= join(q{, }, @{$backend->{regions} // []}) || '[Karte]' %></a> % } % elsif ($backend->{regions}) { <br/> diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 797ff57..016e56b 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -68,7 +68,7 @@ % } % if (my $wr = $journey->{wagonorder}) { <br/> - <!-- <a href="https://dbf.finalrewind.org/carriage-formation?<%= $journey->{train_no} %>/<%= $journey->{sched_departure}->strftime('%Y%m%d%H%M') %>?e=<%= $journey->{dep_direction} // q{} %>"> --> + <a href="https://dbf.finalrewind.org/carriage-formation?<%= join('&', map { $_ . '=' . $journey->{extra_data}{wagonorder_param}{$_} } sort keys %{$journey->{extra_data}{wagonorder_param}}) %>&e=<%= $journey->{dep_direction} // q{} %>"> % my $direction = $wr->direction == 100 ? '→' : '←'; % my $rev = 0; % if ($journey->{dep_direction}) { @@ -111,7 +111,7 @@ % } % } %= $direction - <!-- </a> --> + </a> % } </div> <div class="progress" style="height: 1ex;"> @@ -128,7 +128,7 @@ % } </div> <div style="float: right; text-align: right;"> - <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/> + <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id} =~ s{[ #|]}{x}gr, dbris => $journey->{is_dbris} ? $journey->{backend_name} : q{}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}, is_iris => $journey->{is_iris}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/> % if ($journey->{real_arrival}->epoch) { <b><%= $journey->{real_arrival}->strftime('%H:%M') %></b> % if ($journey->{real_arrival}->epoch != $journey->{sched_arrival}->epoch) { @@ -242,13 +242,7 @@ <a class="tablerow action-checkout" data-station="<%= $station->[1] // $station->[0] %>"> <span><%= $station->[0] %></span> <span> - % if ($station->[2]{load}{SECOND}) { - % my ($first, $second) = load_icon($station->[2]{load}); - % if ($first ne 'help_outline') { - <i class="material-icons tiny" aria-hidden="true"><%= $first %></i> - % } - <i class="material-icons tiny" aria-hidden="true"><%= $second %></i> - % } + %= include '_show_load_icons', station => $station % if ($station->[2]{isCancelled}) { entfällt % } @@ -327,15 +321,16 @@ % if (@{stash('timeline') // []}) { %= include '_timeline_link', timeline => stash('timeline'), from_checkin => 1 % } - % if ($journey->{arr_name}) { + % if ($journey->{arr_name} and @{$journey->{extra_data}{him_msg} // []}) { <div class="card" style="margin-top: <%= scalar @{stash('timeline') // []} ? '1.5rem' : '3em' %>;"> <div class="card-content"> - <span class="card-title">Details</span> + <i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i> + <span class="card-title">Meldungen</span> % if (@{$journey->{extra_data}{him_msg} // []}) { <p style="margin-bottom: 2ex;"> <ul> % for my $message (@{$journey->{extra_data}{him_msg} // []}) { - <li> <i class="material-icons tiny">info</i> <%= $message->{header} %> <%= $message->{lead} %></li> + <li> <i class="material-icons tiny"><%= ($message->{prio} and $message->{prio} eq 'HOCH') ? 'warning' : 'info' %></i> <%= $message->{header} %> <%= $message->{lead} %></li> % } </ul> </p> @@ -355,26 +350,16 @@ </p> % } </div> - <div class="card-action"> - % my $url = 'https://bahn.expert/details/'; - % if ($journey->{train_id} =~ m{[|]}) { - % if ($journey->{train_type} and $journey->{train_no}) { - % $url .= $journey->{train_type} . ' ' . $journey->{train_no}; - % } - % $url .= '/' . $journey->{sched_departure}->epoch . '000?jid=' . $journey->{train_id} =~ s{#}{%23}gr; - % } - % else { - % $url .= $journey->{train_type} . ' ' . $journey->{train_no} . '/' . $journey->{sched_departure}->epoch . '000?station=' . $journey->{dep_eva}; - % } - % if ($journey->{backend_id} <= 1) { - <a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left" aria-hidden="true">timeline</i> Zuglauf</a> - % } - % else { - - % } - % if ($journey->{extra_data}{trip_id}) { - <a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr %>/<%= $journey->{train_line} || 0 %>?hafas=<%= $journey->{backend_name} // 'DB' %>&from=<%= $journey->{dep_name} %>&to=<%= $journey->{arr_name} %>&dark=<%= (session('theme') and session('theme') eq 'dark') ? 1 : 0 %>"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> - % } + </div> + % } + % if ($journey->{arr_name}) { + <div class="card" style="margin-top: 3em;"> + <div class="card-content"> + <i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i> + <span class="card-title">Karte</span> + <div id="map" style="height: 70vh;"> + </div> + %= include '_map', with_map_header => 0, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups') </div> </div> <div class="card" style="margin-top: 3em;"> @@ -387,13 +372,7 @@ <a class="action-checkout tablerow" style="<%= $is_dest? 'font-weight: bold;' : '' %>" data-station="<%= $station->[1] // $station->[0] %>"> <span><%= $station->[0] %></span> <span> - % if ($station->[2]{load}{SECOND}) { - % my ($first, $second) = load_icon($station->[2]{load}); - % if ($first ne 'help_outline') { - <i class="material-icons tiny" aria-hidden="true"><%= $first %></i> - % } - <i class="material-icons tiny" aria-hidden="true"><%= $second %></i> - % } + %= include '_show_load_icons', station => $station % if ($station->[2]{isCancelled}) { entfällt % } @@ -408,7 +387,7 @@ % } </span> </a> - <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1], tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}) %>"><i class="material-icons tiny"><%= $journey->{is_hafas} ? 'directions' : 'train' %></i></a> + <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1], tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id} =~ s{[ #|]}{x}gr, dbris => $journey->{is_dbris} ? $journey->{backend_name} : q{}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}, is_iris => $journey->{is_iris}) %>"><i class="material-icons tiny"><%= $journey->{is_hafas} ? 'directions' : 'train' %></i></a> % } </div> </div> diff --git a/templates/_departures_dbris.html.ep b/templates/_departures_dbris.html.ep new file mode 100644 index 0000000..dbd1a70 --- /dev/null +++ b/templates/_departures_dbris.html.ep @@ -0,0 +1,55 @@ +<ul class="collection departures"> +% my $orientation_bar_shown = param('train'); +% my $now_epoch = now->epoch; +% for my $result (@{$results}) { + % my $row_class = ''; + % my $link_class = 'action-checkin'; + % if ($result->is_cancelled) { + % $row_class = "cancelled"; + % $link_class = 'action-cancelled-from'; + % } + % if (not $orientation_bar_shown and $result->dep->epoch < $now_epoch) { + % $orientation_bar_shown = 1; + <li class="collection-item" id="now"> + <strong class="dep-time"> + %= now->strftime('%H:%M') + </strong> + <strong>— Anfragezeitpunkt —</strong> + </li> + % } + <li class="collection-item <%= $link_class %> <%= $row_class %>" + data-dbris="<%= $dbris %>" + data-station="<%= $result->stop_eva %>" + data-train="<%= $result->id %>" + data-suffix="<%= $result->maybe_line_no %>" + data-ts="<%= ($result->sched_dep // $result->dep)->epoch %>" + > + <a class="dep-time" href="#"> + %= $result->dep->strftime('%H:%M') + % if ($result->delay) { + (<%= sprintf('%+d', $result->delay) %>) + % } + % elsif (not defined $result->delay and not $result->is_cancelled) { + <i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i> + % } + </a> + <span class="dep-line <%= $result->type // q{} %>"> + %= $result->line + </span> + <span class="dep-dest"> + % if ($result->is_cancelled) { + Fahrt nach <%= $result->destination // $result->via_last %> entfällt + % } + % else { + %= $result->destination // $result->via_last + % for my $checkin (@{$checkin_by_train->{$result->id} // []}) { + <span class="followee-checkin"> + <i class="material-icons tiny" aria-label="Eine Person, der du folgst, ist hier eingecheckt">people</i> + <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> + </span> + % } + % } + </span> + </li> +% } +</ul> diff --git a/templates/_departures_motis.html.ep b/templates/_departures_motis.html.ep new file mode 100644 index 0000000..2ebc5de --- /dev/null +++ b/templates/_departures_motis.html.ep @@ -0,0 +1,54 @@ +<ul class="collection departures"> +% my $orientation_bar_shown = param('train'); +% my $now_epoch = now->epoch; +% for my $result (@{$results}) { + % my $row_class = ''; + % my $link_class = 'action-checkin'; + % if ($result->is_cancelled) { + % $row_class = "cancelled"; + % $link_class = 'action-cancelled-from'; + % } + % if (not $orientation_bar_shown and $result->stopover->departure->epoch < $now_epoch) { + % $orientation_bar_shown = 1; + <li class="collection-item" id="now"> + <strong class="dep-time"> + %= now->strftime('%H:%M') + </strong> + <strong>— Anfragezeitpunkt —</strong> + </li> + % } + <li class="collection-item <%= $link_class %> <%= $row_class %>" + data-motis="<%= $motis %>" + data-station="<%= $result->stopover->stop->id %>" + data-train="<%= $result->id %>" + data-ts="<%= ($result->stopover->departure)->epoch %>" + > + <a class="dep-time" href="#"> + %= $result->stopover->departure->strftime('%H:%M') + % if ($result->stopover->delay) { + (<%= sprintf('%+d', $result->stopover->delay) %>) + % } + % elsif (not $result->stopover->is_realtime and not $result->stopover->is_cancelled) { + <i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i> + % } + </a> + <span class="dep-line <%= $result->mode %>" style="background-color: #<%= $result->route_color // q{} %>;"> + %= $result->route_name + </span> + <span class="dep-dest"> + % if ($result->is_cancelled) { + Fahrt nach <%= $result->headsign %> entfällt + % } + % else { + %= $result->headsign + % for my $checkin (@{$checkin_by_train->{$result->id} // []}) { + <span class="followee-checkin"> + <i class="material-icons tiny" aria-label="Eine Person, der du folgst, ist hier eingecheckt">people</i> + <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> + </span> + % } + % } + </span> + </li> +% } +</ul> diff --git a/templates/_format_train.html.ep b/templates/_format_train.html.ep index 1d6acaa..e82f3f9 100644 --- a/templates/_format_train.html.ep +++ b/templates/_format_train.html.ep @@ -2,7 +2,9 @@ 🏳️🌈 % } <span class="dep-line <%= $journey->{train_type} // q{} %>"> - <%= $journey->{train_type} %> + % if (not $journey->{is_motis}) { + <%= $journey->{train_type} %> + % } <%= $journey->{train_line} // $journey->{train_no}%> </span> % if ($journey->{train_line}) { diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep index cf998ab..7ae2a1d 100644 --- a/templates/_history_trains.html.ep +++ b/templates/_history_trains.html.ep @@ -17,7 +17,10 @@ <li class="collection-item"> <a href="<%= $detail_link %>"> <span class="dep-line <%= $travel->{type} // q{} %>"> - <%= $travel->{type} %> <%= $travel->{line} // $travel->{no}%> + % if (not $travel->{is_motis}) { + <%= $travel->{type} %> + % } + <%= $travel->{line} // $travel->{no}%> </span> </a> diff --git a/templates/_map.html.ep b/templates/_map.html.ep index daa16f0..223bd68 100644 --- a/templates/_map.html.ep +++ b/templates/_map.html.ep @@ -1,16 +1,18 @@ -<div class="row"> - <div class="col s12"> - <div id="map" style="height: 70vh;"> +% if (stash('with_map_header') // 1) { + <div class="row"> + <div class="col s12"> + <div id="map" style="height: 70vh;"> + </div> </div> </div> -</div> -<div class="row"> - <div class="col s12"> - <span style="color: #f03;">●</span> Ein-/Ausstiegsstation<br/> - <span style="color: #673ab7;">—</span> Streckenverlauf oder Luftlinie + <div class="row"> + <div class="col s12"> + <span style="color: #f03;">●</span> Ein-/Ausstiegsstation<br/> + <span style="color: #673ab7;">—</span> Streckenverlauf oder Luftlinie + </div> </div> -</div> +% } <script> var map = L.map('map').setView([51.306, 9.712], 6); diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index 6dda46d..33f4236 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -14,17 +14,14 @@ <a href="/p/<%= $name %>"><%= $name %></a> ist unterwegs % } <i class="material-icons right"><%= visibility_icon($journey->{effective_visibility_str}) %></i> - % if (stash('from_timeline') and $journey->{extra_data}{trip_id}) { - <a class="right" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr %>/<%= $journey->{train_line} || 0 %>?hafas=<%= $journey->{backend_name} // 'DB' %>&from=<%= $journey->{dep_name} %>&to=<%= $journey->{arr_name} // '' %>"><i class="material-icons">map</i></a> - % } % if (not $journey->{extra_data}{rt}) { <i class="material-icons right grey-text">gps_off</i> % } </span> % if ($privacy->{comments_visible} and $journey->{comment}) { - <p>„<%= $journey->{comment} %>“</p> + <div>„<%= $journey->{comment} %>“</div> % } - <p> + <div> % if (not stash('from_profile') and not stash('from_timeline')) { <div class="center-align"> %= include '_format_train', journey => $journey @@ -63,8 +60,8 @@ <div class="progress" style="height: 1ex;"> <div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div> </div> - </p> - <p> + </div> + <div class="status-card-progress-annot"> <div style="float: left;"> <b><%= $journey->{dep_name} %></b><br/> <b><%= $journey->{real_departure}->strftime('%H:%M') %></b> @@ -95,20 +92,31 @@ % last; % } % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) { - <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %> + %= $station->[0] + <br/> + %= $station->[2]{arr}->strftime('%H:%M') % if ($station->[2]{arr_delay}) { - %= sprintf('(%+d)', $station->[2]{arr_delay} / 60); + %= sprintf('(%+d)', $station->[2]{arr_delay} / 60) + % } + % if ($station->[2]{load}{SECOND}) { + <br/> + %= include '_show_load_icons', station => $station % } % last; % } % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{dep}) { - <%= $station->[0] %><br/> + %= $station->[0] + <br/> % if ($station->[2]{arr}) { <%= $station->[2]{arr}->strftime('%H:%M') %> → % } %= $station->[2]{dep}->strftime('%H:%M') % if ($station->[2]{dep_delay}) { - %= sprintf('(%+d)', $station->[2]{dep_delay} / 60); + %= sprintf('(%+d)', $station->[2]{dep_delay} / 60) + % } + % if ($station->[2]{load}{SECOND}) { + <br/> + %= include '_show_load_icons', station => $station % } % last; % } @@ -123,34 +131,46 @@ % } % if (($station->[2]{arr_countdown} // 0) > 0 and $station->[2]{arr}) { Nächster Halt:<br/> - <%= $station->[0] %><br/><%= $station->[2]{arr}->strftime('%H:%M') %> + %= $station->[0] + <br/> + %= $station->[2]{arr}->strftime('%H:%M') % if ($station->[2]{arr_delay}) { - %= sprintf('(%+d)', $station->[2]{arr_delay} / 60); + %= sprintf('(%+d)', $station->[2]{arr_delay} / 60) + % } + % if ($station->[2]{load}{SECOND}) { + <br/> + %= include '_show_load_icons', station => $station % } % last; % } % if (($station->[2]{dep_countdown} // 0) > 0 and $station->[2]{arr} and $station->[2]{dep}) { Aktueller Halt:<br/> - <%= $station->[0] %><br/> - <%= $station->[2]{arr}->strftime('%H:%M') %> → - <%= $station->[2]{dep}->strftime('%H:%M') %> + %= $station->[0] + <br/> + %= $station->[2]{arr}->strftime('%H:%M') + → + %= $station->[2]{dep}->strftime('%H:%M') % if ($station->[2]{dep_delay}) { - %= sprintf('(%+d)', $station->[2]{dep_delay} / 60); + %= sprintf('(%+d)', $station->[2]{dep_delay} / 60) + % } + % if ($station->[2]{load}{SECOND}) { + <br/> + %= include '_show_load_icons', station => $station % } % last; % } % } </div> - </p> + </div> % if ($journey->{extra_data}{cancelled_destination}) { - <p style="margin-bottom: 2ex;"> + <div style="margin-bottom: 2ex;"> <i class="material-icons tiny" aria-hidden="true">error</i> Der Halt an der Zielstation <b><%= $journey->{extra_data}{cancelled_destination} %></b> entfällt. - </p> + </div> % } % if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) { - <p style="margin-bottom: 2ex;"> + <div style="margin-top: 2ex;"> <ul> % for my $message (reverse @{$journey->{messages} // []}) { % if ($journey->{sched_departure}->epoch - $message->[0]->epoch < 1800) { @@ -161,25 +181,95 @@ <li> <i class="material-icons tiny">info</i> <%= $message->[0]->strftime('%H:%M') %>: <%= $message->[1] %></li> % } </ul> - </p> + </div> % } - </div> - % if (not stash('from_timeline')) { - <div class="card-action"> - % if ($journey->{traewelling_url}) { - <a style="margin-right: 0;" href="<%= $journey->{traewelling_url} %>"><i class="material-icons left">timeline</i> Träwelling</a> - % } elsif ($journey->{backend_id} <= 1) { - % my $url = 'https://bahn.expert/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000'; - <a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a> + % if (@{$journey->{extra_data}{him_msg} // []}) { + <div style="margin-top: 2ex;"> + <ul> + % for my $message (@{$journey->{extra_data}{him_msg} // []}) { + % if (not stash('from_timeline') or $message->{prio} and $message->{prio} eq 'HOCH') { + <li> <i class="material-icons tiny"><%= ($message->{prio} and $message->{prio} eq 'HOCH') ? 'warning' : 'info' %></i> <%= $message->{header} %> <%= $message->{lead} %></li> + % } + % } + </ul> + </div> + % } + % if (stash('station_coordinates')) { + <div id="map" style="height: 70vh;"> + </div> + %= include '_map', with_map_header => 0, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups') + % } + % if ( @{$journey->{wagongroups} // []} ) { + % if (stash('from_timeline')) { + <div class="wagons" style="margin-top: 2ex;"> + % for my $wagongroup (@{$journey->{wagongroups}}) { + %= $wagongroup->{desc} // $wagongroup->{name} + % if ($wagongroup->{designation}) { + „<%= $wagongroup->{designation} %>“ + % } + % if ($wagongroup->{to}) { + → <%= $wagongroup->{to} %> + % } + <br/> + % } + </div> % } % else { - - % } - % if ($journey->{extra_data}{trip_id}) { - <a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr %>/<%= $journey->{train_line} || 0 %>?hafas=<%= $journey->{backend_name} // 'DB' %>&from=<%= $journey->{dep_name} %>&to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a> + <div class="wagons" style="margin-top: 2ex;"> + Wagen:<br/> + %= include '_wagons', wagongroups => $journey->{wagongroups}; + </div> % } - </div> - % } + % } + % if (not stash('from_timeline')) { + <div style="margin-top: 2ex;"> + Route:<br/> + % my $before = 1; + % my $within = 0; + % my $at_startstop = 0; + % for my $station (@{$journey->{route}}) { + % if (($station->[1] and $station->[1] == $journey->{dep_eva}) or $station->[0] eq $journey->{dep_name}) { + % $within = 1; $at_startstop = 1; + % } + % elsif ($journey->{arr_eva} and (($station->[1] and $station->[1] == $journey->{arr_eva}) or $station->[0] eq $journey->{arr_name})) { + % $within = 0; $at_startstop = 1; + % } + % else { + % $at_startstop = 0; + % } + <span style="color: #808080;"> + % if ($before and $station->[2]{sched_dep}) { + %= $station->[2]{sched_dep}->strftime('%H:%M') + % } + % elsif (not $before and $station->[2]{sched_arr}) { + %= $station->[2]{sched_arr}->strftime('%H:%M') + % } + </span> + % if ($at_startstop or $within) { + %= $station->[0] + % } + % else { + <span style="color: #808080;"><%= $station->[0] %></span> + % } + <span> + %= include '_show_load_icons', station => $station + </span> + <span style="color: #808080;"> + % if ($before and $station->[2]{rt_dep} and $station->[2]{dep_delay}) { + %= sprintf('%+d', $station->[2]{dep_delay} / 60) + % } + % elsif (not $before and $station->[2]{rt_arr} and $station->[2]{arr_delay}) { + %= sprintf('%+d', $station->[2]{arr_delay} / 60) + % } + </span> + % if (($station->[1] and $station->[1] == $journey->{dep_eva}) or $station->[0] eq $journey->{dep_name}) { + % $before = 0; + % } + <br/> + % } + </div> + % } + </div> </div> % } % else { @@ -192,7 +282,7 @@ % else { <span class="card-title"><a href="/p/<%= $name %>"><%= $name %></a> ist gerade nicht eingecheckt</span> % } - <p> + <div> % if ($journey->{arr_name}) { Zuletzt gesehen % if ($journey->{real_arrival}->epoch) { @@ -204,7 +294,7 @@ in <b><%= $journey->{arr_name} %></b> % } % } - </p> + </div> </div> </div> % } diff --git a/templates/_show_load_icons.html.ep b/templates/_show_load_icons.html.ep new file mode 100644 index 0000000..e69dab5 --- /dev/null +++ b/templates/_show_load_icons.html.ep @@ -0,0 +1,7 @@ +% if ($station->[2]{load}{SECOND}) { + % my ($first, $second) = load_icon($station->[2]{load}); + % if ($first ne 'help_outline') { + <i class="material-icons tiny" aria-hidden="true"><%= $first %></i> + % } + <i class="material-icons tiny" aria-hidden="true"><%= $second %></i> +% } diff --git a/templates/_wagons.html.ep b/templates/_wagons.html.ep index b4af3bc..4090f11 100644 --- a/templates/_wagons.html.ep +++ b/templates/_wagons.html.ep @@ -1,7 +1,10 @@ % for my $wagongroup (@{$wagongroups // []}) { - <%= $wagongroup->{name} %> + %= $wagongroup->{desc} // $wagongroup->{name} % my ($wagon_number) = ($wagongroup->{name} =~ m{ ^ ICE 0* (\d+) $ }x); - % if ($wagon_number and my $group_name = app->ice_name->{$wagon_number}) { + % if ($wagongroup->{designation}) { + „<%= $wagongroup->{designation} %>“ + % } + % elsif ($wagon_number and my $group_name = app->ice_name->{$wagon_number}) { „<%= $group_name %>“ % } als <b><%= $wagongroup->{type} // $journey->{type} %> <%= $wagongroup->{no} %></b> diff --git a/templates/about.html.ep b/templates/about.html.ep index d1fcb4b..3167d91 100644 --- a/templates/about.html.ep +++ b/templates/about.html.ep @@ -1,13 +1,16 @@ <div class="row"> <div class="col s12"> <a href="https://finalrewind.org/projects/travelynx">travelynx</a> v<%= stash('version') // '???' %><br/> - Entwickelt von <a href="https://finalrewind.org">derf</a><br/> - <a href="<%= app->config->{ref}{source} // 'https://github.com/derf/travelynx' %>">Quelltext</a> lizensiert unter AGPL v3<br/><br/> + Entwickelt von <a href="https://finalrewind.org">derf</a> + und <a href="https://github.com/derf/travelynx/graphs/contributors">weiteren</a><br/> + <a href="<%= app->config->{ref}{source} // 'https://git.finalrewind.org/travelynx' %>">Quelltext</a> lizensiert unter AGPL v3<br/><br/> Backends: + <a href="https://finalrewind.org/projects/Travel-Status-DE-DBRIS/">Travel::Status::DE::DBRIS</a> + v<%= $Travel::Status::DE::DBRIS::VERSION %>, + <a href="https://finalrewind.org/projects/Travel-Status-DE-HAFAS/">Travel::Status::DE::HAFAS</a> + v<%= $Travel::Status::DE::HAFAS::VERSION %> und <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a> - v<%= $Travel::Status::DE::IRIS::VERSION %> und - <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a> - v<%= $Travel::Status::DE::HAFAS::VERSION %><br/> + v<%= $Travel::Status::DE::IRIS::VERSION %><br/> Haltestellendaten © DB Station&Service AG, Europaplatz 1, @@ -16,6 +19,19 @@ </div> <div class="row"> + <div class="col s12"> + <p> + Travelynx ist ein kostenfreies, privat betriebenes Projekt ohne + Verfügbarkeitsgarantie. Unangekündigte Downtimes oder eine + kurzfristige Einstellung dieser Seite sind nicht vorgesehen, aber + möglich. Feature Requests, Bug Reports und sonstige Nachrichten + werden je nach Kapazität und Motivation zeitnah, verzögert oder gar + nicht bearbeitet / beantwortet. + </p> + </div> +</div> + +<div class="row"> <div class="col s12 m12 l4 center-align" style="margin-top: 1em;"> <a href="https://social.skyshaper.org/derf" class="waves-effect waves-light btn"><i class="material-icons left">message</i>Kontakt</a> </div> diff --git a/templates/account.html.ep b/templates/account.html.ep index 036fb35..e4bf38d 100644 --- a/templates/account.html.ep +++ b/templates/account.html.ep @@ -123,6 +123,8 @@ <tr> <th scope="row">Träwelling</th> <td> + Wird wegen Inkompatibilität zwischen bahn.de und transitous derzeit nicht unterstützt + <!-- <a href="/account/traewelling"><i class="material-icons">edit</i></a> % if (not ($traewelling->{token})) { <span style="color: #999999;">Nicht verknüpft</span> @@ -145,6 +147,7 @@ – Checkins in travelynx werden zu Träwelling weitergereicht % } % } + --> </td> </tr> % } diff --git a/templates/api_documentation.html.ep b/templates/api_documentation.html.ep index 4453286..099474c 100644 --- a/templates/api_documentation.html.ep +++ b/templates/api_documentation.html.ep @@ -129,12 +129,13 @@ {<br/> "token" : "<%= $uid %>-<%= $token->{travel} // 'TOKEN' %>",<br/> "action" : "checkin",<br/> - "hafas" : "DB", (HAFAS-Instanz – Default: Deutsche Bahn)<br/> + "dbris" : "bahn.de", (DBRIS-Instanz – Default: bahn.de)<br/> + "hafas" : null, (HAFAS-Instanz, falls verwendet, sonste null)<br/> "train" : {<br/> - "journeyID" : "1|1426396|4|80|19082023",<br/> + "journeyID" : "2|#VN#1#ST#1742845592#PI#0#ZI#315136#TA#0#DA#270325#1S#8000080#1T#1841#LS#8006486#LT#2024#PU#80#RT#1#CA#RE#ZE#10773#ZB#RE10773#PC#3#FR#8000080#FT#1841#TO#8006486#TT#2024#",<br/> }<br/> - "fromStation" : 651806, (Name oder EVA-Nummer)<br/> - "toStation" : 654645, (optional, Name oder EVA-Nummer)<br/> + "fromStation" : 8000080, (Name oder EVA-Nummer – bei bahn.de nur EVA-Nummer)<br/> + "toStation" : 8006486, (optional, Name oder EVA-Nummer – bei bahn.de nur EVA-Nummer)<br/> "comment" : "Beliebiger Text" (optional, überschreibt vorherigen Kommentar)<br/> } </p> diff --git a/templates/bad_gateway.html.ep b/templates/bad_gateway.html.ep index ca69188..07bf29e 100644 --- a/templates/bad_gateway.html.ep +++ b/templates/bad_gateway.html.ep @@ -6,7 +6,12 @@ <p> Das von travelynx genutzte Backend hat einen Fehler zurückgegeben. travelynx hat keine Möglichkeiten, diese Situation zu beheben. - Versuche es in ein paar Sekunden bis Minuten noch einmal. + % if (stash('select_new_backend')) { + Versuche es in ein paar Sekunden bis Minuten noch einmal oder <a href="/account/select_backend">wähle ein anderes Backend</a>. + % } + % else { + Versuche es in ein paar Sekunden bis Minuten noch einmal. + % } </p> </div> </div> diff --git a/templates/changelog.html.ep b/templates/changelog.html.ep index ad3291a..ced431a 100644 --- a/templates/changelog.html.ep +++ b/templates/changelog.html.ep @@ -2,6 +2,106 @@ <div class="row"> <div class="col s12 m1 l1"> + 2.13 + </div> + <div class="col s12 m11 l11"> + <p> + <i class="material-icons left" aria-label="Neues Feature">add</i> + Experimentelle Unterstützung für Checkins via MOTIS-Backends + (derzeit transitous und RNV). Vielen Dank an <a href="https://github.com/networkException">networkException</a> + für die Implementierung der API und Einbindung in travelynx. + Träwelling-Synchronisierung ist noch nicht wiederhergestellt. + Time zones are currently somewhat wibbly-wobbly timey-wimey. + </p> + </div> +</div> + +<div class="row"> + <div class="col s12 m1 l1"> + 2.12 + </div> + <div class="col s12 m11 l11"> + <p> + <i class="material-icons left" aria-label="Neues Feature">add</i> + Kartografische Visualisierung der Route bei eigenen Checkins und auf + der Statusseite sowie Angaben zu Meldungen, Rollmaterial, Route und + Auslastung auf der Statusseite. Feinheiten wie die Markierung der + geschätzten aktuellen Zugposition oder eine regelmäßige + Aktualisierung ohne Zurücksetzen der Kartenansicht folgen später. + Die Kartenlinks zu dbf.finalrewind.org entfallen. + </p> + <p> + <i class="material-icons left" aria-label="Ankündigung">announcement</i> + Das IRIS-TTS-Backend der Deutschen Bahn wird wegen zunehmend + schlechter Datenanreicherunngsmöglichkeiten nicht mehr + weiterentwickelt. Bei Checkins per IRIS-TTS stehen regelmäßig keine + Echtzeitdaten und insbesondere bei Nebenbahnen auch keine + Kartendaten zur Verfügung. In diesem Fall fehlt auch die + ersatzwiese Visualisierung der Luftlinie zwischen den + Unterwegshalten. Dies betrifft auch die Visualisierung in der + Fahrtenkarte. + </p> + <p> + <i class="material-icons left" aria-label="Ankündigung">announcement</i> + Derzeit besteht wegen inkompatibler Backends keine + Synchronisierungsmöglichkeit zwischen Träwelling (transitous MOTIS) + und travelynx (DB IRIS-TTS / DB HAFAS / bahn.de). + MOTIS-Unterstützung in travelynx ist in Arbeit. + </p> + </div> +</div> + +<div class="row"> + <div class="col s12 m1 l1"> + 2.11 + </div> + <div class="col s12 m11 l11"> + <p> + <i class="material-icons left" aria-label="Neues Feature">add</i> + Neues Backend: bahn.de. Somit steht nach Abschaltung von DB HAFAS + und VRN HAFAS wieder ein Backend zur Verfügung, welches für + innerdeutschen Nah-, Regional- und Fernverkehr geeignet ist und + eine Synchronisierung mit Träwelling unterstützt. Teile der + Implementierung können noch unvollständig sein. Ebenso besteht die + Möglichkeit, dass es wegen Rate Limits auf Seiten von bahn.de nicht + immer zuverlässig nutzbar ist. + </p> + </div> +</div> + +<div class="row"> + <div class="col s12 m1 l1"> + 2.10 + </div> + <div class="col s12 m11 l11"> + <p> + <i class="material-icons left" aria-label="Neues Feature">add</i> + Neue HAFAS-Backends: PKP, SaarVV. + </p> + <p> + <i class="material-icons left" aria-label="Bug">warning</i> Das DB + HAFAS-Backend wurde am 8. Januar 2025 abgeschaltet und wird von + travelynx daher seit v2.9.11 nicht mehr angeboten. Als vorläufiger + Ersatz bietet sich das VRN HAFAS-Backend an. Eine Wieder-Anbindung + der DB mittels Travel::Status::DE::DBRIS ist in Arbeit. Bis dahin + ist keine Synchronisierung mit Traewelling möglich. + </p> + <p> + <i class="material-icons left" aria-label="Administration">announcement</i> + Das PKP HAFAS befindet sich hinter einem GeoIP-Filter und wird + daher in travelynx-Installationen außerhalb von travelynx.de + standardmäßig nicht angeboten. Sofern die travelynx-Instanz auf + einer geeigneten IP-Adresse betrieben wird oder eine solche per + Proxy erreichbar ist, lässt es sich über einen Eintrag in + travelynx.conf aktivieren. Als Nebenwirkung davon kann auch auf + beliebige andere HAFAS-Instanzen bei Bedarf über einen + Instanz-spezifischen Proxy zugegriffen werden. + </p> + </div> +</div> + +<div class="row"> + <div class="col s12 m1 l1"> 2.9 </div> <div class="col s12 m11 l11"> diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 0c563de..917973b 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -9,9 +9,15 @@ </div> <div class="col s4 center-align"> % my $self_link = url_for('sstation', station => $station // param('station')); - % if (param('hafas')) { + % if (param('dbris')) { + <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= param('dbris') %></a> + % } + % elsif (param('hafas')) { <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= param('hafas') %></a> % } + % elsif (param('motis')) { + <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= param('motis') %></a> + % } % else { % if ($user->{backend_id}) { <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= $user->{backend_name} %></a> @@ -30,7 +36,13 @@ <div class="card"> <div class="card-content"> <span class="card-title">Aktuell eingecheckt</span> - <p>In <%= $user_status->{train_type} %> <%= $user_status->{train_no} %> + <p>In + % if ( not $user_status->{is_motis} ) { + <%= $user_status->{train_type} %> + % } + + <%= $user_status->{train_line} // $user_status->{train_no} %> + % if ( $user_status->{arr_name}) { von <%= $user_status->{dep_name} %> nach <%= $user_status->{arr_name} %> % } @@ -93,8 +105,8 @@ <div class="row"> <div class="col s4 center-align"> - % if ($hafas) { - <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({hafas => $hafas, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i><span class="hide-on-small-only">früher</span></a> + % if ($dbris or $hafas or $motis) { + <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i><span class="hide-on-small-only">früher</span></a> % } </div> <div class="col s4 center-align"> @@ -103,8 +115,8 @@ % } </div> <div class="col s4 center-align"> - % if ($hafas) { - <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({hafas => $hafas, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>"><span class="hide-on-small-only">später</span><i class="material-icons right" aria-hidden="true">chevron_right</i></a> + % if ($dbris or $hafas or $motis) { + <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>"><span class="hide-on-small-only">später</span><i class="material-icons right" aria-hidden="true">chevron_right</i></a> % } </div> </div> @@ -134,20 +146,47 @@ Fahrt auswählen zum Einchecken. % } % else { - Keine Abfahrten gefunden. Ein Checkin ist frühestens 30 Minuten vor - und maximal 120 Minuten nach Abfahrt möglich. + % if ($dbris or $hafas) { + Keine Abfahrten im ausgewählten Zeitfenster + (<%= $datetime->strftime('%d.%m.%Y %H:%M') %> ± 30min). + % } + % else { + Keine Abfahrten gefunden. Ein Checkin ist frühestens 30 Minuten vor + und maximal 120 Minuten nach Abfahrt möglich. + % } % } </p> % if (not $user_status->{checked_in} or ($can_check_out and $user_status->{arr_eva} and $user_status->{arrival_countdown} <= 0)) { - % if ($efa) { + % if ($dbris) { + %= include '_departures_dbris', results => $results, dbris => $dbris; + % } + % elsif ($efa) { %= include '_departures_efa', results => $results, efa => $efa; % } % elsif ($hafas) { %= include '_departures_hafas', results => $results, hafas => $hafas; % } + % elsif ($motis) { + %= include '_departures_motis', results => $results, motis => $motis; + % } % else { %= include '_departures_iris', results => $results; % } % } </div> </div> + +<div class="row"> + <div class="col s4 center-align"> + % if ($dbris or $hafas) { + <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i><span class="hide-on-small-only">früher</span></a> + % } + </div> + <div class="col s4 center-align"> + </div> + <div class="col s4 center-align"> + % if ($dbris or $hafas) { + <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>"><span class="hide-on-small-only">später</span><i class="material-icons right" aria-hidden="true">chevron_right</i></a> + % } + </div> +</div> diff --git a/templates/gateway_timeout.html.ep b/templates/gateway_timeout.html.ep index 86e844d..9cf8690 100644 --- a/templates/gateway_timeout.html.ep +++ b/templates/gateway_timeout.html.ep @@ -6,7 +6,12 @@ <p> Das von travelynx genutzte Backend hat nicht rechtzeitig reagiert. travelynx hat keine Möglichkeiten, diese Situation zu beheben. - Vrsuche es in ein paar Sekunden bis Minuten noch einmal. + % if (stash('select_new_backend')) { + Versuche es in ein paar Sekunden bis Minuten noch einmal oder <a href="/account/select_backend">wähle ein anderes Backend</a>. + % } + % else { + Versuche es in ein paar Sekunden bis Minuten noch einmal. + % } </p> </div> </div> diff --git a/templates/journey.html.ep b/templates/journey.html.ep index c13da5f..e97c729 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -177,6 +177,16 @@ </td> </tr> % } + % if ($journey->{user_data}{him_msg} and @{$journey->{user_data}{him_msg}}) { + <tr> + <th scope="row">Meldungen</th> + <td> + % for my $message (@{$journey->{user_data}{him_msg} // []}) { + <i class="material-icons tiny"><%= ($message->{prio} and $message->{prio} eq 'HOCH') ? 'warning' : 'info' %></i> <%= $message->{header} %> <%= $message->{lead} %><br/> + % } + </td> + </tr> + % } % if ($journey->{user_data} and $journey->{user_data}{comment}) { <tr> <th scope="row">Kommentar</th> @@ -269,7 +279,7 @@ % } <div class="row"> <div class="col s12 grey-text"> - <i class="material-icons tiny" aria-hidden="true"><%= $journey->{is_iris} ? 'train' : 'directions' %></i> + <i class="material-icons tiny" aria-hidden="true"><%= $journey->{is_hafas} ? 'directions' : 'train' %></i> %= $journey->{backend_name} || 'IRIS' #<%= $journey->{id} %> </div> diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index 68ff41c..56aa8ff 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -57,21 +57,17 @@ <div class="card-content"> <span class="card-title">Hallo, <%= $user->{name} %>!</span> <p>Du bist gerade nicht eingecheckt.</p> - <div class="geolocation" data-recent="<%= join('|', map { $_->{eva} . ';' . $_->{name} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>"> + <div class="geolocation" data-recent="<%= join('|', map { $_->{external_id_or_eva} . ';' . $_->{name} . ';' . $_->{dbris} . ';' . $_->{motis} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>"> <a class="btn waves-effect waves-light btn-flat request">Stationen in der Umgebung abfragen</a> </div> + %= hidden_field backend_dbris => $user->{backend_dbris} <div class="input-field"> %= text_field 'station', id => 'station', class => 'autocomplete contrast-color-text', autocomplete => 'off', required => undef <label for="station">Manuelle Eingabe</label> </div> </div> <div class="card-action"> - % if ($user->{backend_id}) { - <a href="/account/select_backend?redirect_to=/" class="btn btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= $user->{backend_name} %></a> - % } - % else { - <a href="/account/select_backend?redirect_to=/" class="btn btn-flat"><i class="material-icons left" aria-hidden="true">train</i>IRIS</a> - % } + <a href="/account/select_backend?redirect_to=/" class="btn btn-flat"><i class="material-icons left" aria-hidden="true"><%= $user->{backend_hafas} ? 'directions' : 'train' %></i><%= $user->{backend_name} // 'IRIS' %></a> <button class="btn right waves-effect waves-light btn-flat" type="submit" name="action" value="departures"> <i class="material-icons left" aria-hidden="true">send</i> Abfahrten @@ -82,6 +78,25 @@ % } </div> </div> + % if (not $user->{backend_name}) { + <div class="row"> + <div class="col s12"> + <div class="card purple white-text"> + <div class="card-content"> + <span class="card-title">Legacy-Backend ausgewählt</span> + <p> + Das aktuell aktive IRIS-Backend wird nicht mehr weiterentwickelt und voraussichtlich bald von der Deutschen Bahn abgeschaltet. + Schon jetzt ist die Datenqualität wegen zunehmend schlechter Datenaufbereitungsmöglichkeiten oft unzureichend. + Das bahn.de-Backend ist in fast jeder Hinsicht besser geeignet; lediglich bei Verspätungs- und Servicemeldungen ist es geringfügig weniger detailliert und Checkin-Vorschläge werden derzeit nicht unterstützt. + </p> + </div> + <div class="card-action"> + <a class="btn btn-flat" href="/account/select_backend?redirect_to=/">Backend wechseln</a> + </div> + </div> + </div> + </div> + % } <h2 style="margin-left: 0.75rem;">Letzte Fahrten</h2> %= include '_history_trains', date_format => '%d.%m.%Y', journeys => [journeys->get(uid => $user->{id}, limit => 5, with_datetime => 1)]; % } @@ -89,9 +104,11 @@ <div class="row"> <div class="col s12"> <p> - Travelynx erlaubt das Einchecken in Züge im Netz der Deutschen - Bahn. So können die eigenen Fahrten später inklusive Echtzeitdaten - und eingetragenen Servicemeldungen nachvollzogen und brennende + Travelynx erlaubt das Einchecken in Verkehrsmittel (Busse, + Bahnen, Züge) unter anderem in Deutschland, Österreich, der + Schweiz, Luxemburg, Irland, Dänemark und Teilen der USA. So + können die eigenen Fahrten später inklusive Echtzeitdaten und + eingetragenen Servicemeldungen nachvollzogen und brennende Fragen wie „Wie viele Stunden war ich letzten Monat unterwegs?“ beantwortet werden. </p> @@ -109,7 +126,7 @@ <li>Statistiken über Reisezeiten und Verspätungen</li> <li>Unterstützung beim Ausfüllen von Fahrgastrechteformularen</li> <li>Optional: Öffentlicher Reisestatus und öffentliche Angaben zu vergangenen Fahrten</li> - <li>Optional: Verknüpfung mit Träwelling</li> + <!-- <li>Optional: Verknüpfung mit Träwelling</li> --> </ul> </p> <p> diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index e74a731..e8ce9f7 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -13,7 +13,7 @@ % while (my ($key, $value) = each %{stash('opengraph') // {}}) { <meta property="og:<%= $key %>" content="<%= $value %>"> % } - % my $av = 'v82'; # asset version + % my $av = 'v87'; # asset version <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-96x96.png" sizes="96x96"> diff --git a/templates/legend.html.ep b/templates/legend.html.ep index 73fded9..3dc113a 100644 --- a/templates/legend.html.ep +++ b/templates/legend.html.ep @@ -15,11 +15,11 @@ </tr> <tr> <td><i class="material-icons">train</i></td> - <td>Backend: DB IRIS. Bevorzugte Datenquelle für (mindestens teilweise) innerdeutsche Zugfahrten.</td> + <td>Backend: Deutsche Bahn (bahn.de oder IRIS-TTS).</td> </tr> <tr> <td><i class="material-icons">directions</i></td> - <td>Backend: DB HAFAS. Bevorzugte Datenquelle für Nahverkehr und vollständig außerdeutsche Zugfahrten. Weniger detailliert als IRIS.</td> + <td>Backend: HAFAS.</td> </tr> </tbody> </table> diff --git a/templates/profile.html.ep b/templates/profile.html.ep index 6f78ea0..a2c965c 100644 --- a/templates/profile.html.ep +++ b/templates/profile.html.ep @@ -79,7 +79,7 @@ </div> <div class="row"> <div class="col s12 publicstatuscol" data-user="<%= $name %>" data-profile="1"> - %= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, from_profile => 1 + %= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, from_profile => 1, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups') </div> </div> % if ($journeys and @{$journeys}) { diff --git a/templates/select_backend.html.ep b/templates/select_backend.html.ep index db1674e..e54bcfd 100644 --- a/templates/select_backend.html.ep +++ b/templates/select_backend.html.ep @@ -3,6 +3,7 @@ <h2>Backend auswählen</h2> <p style="text-align: justify;"> Das ausgewählte Backend bestimmt die Datenquelle für Fahrten in travelynx. + <a href="#help">Details</a>. </p> </div> </div> @@ -14,6 +15,11 @@ <div class="row"> <div class="col s12"> <h3>Vorschläge</h3> + <p style="text-align: justify;"> + Anhand der Zielstation der letzten Fahrt und den + empfohlenen Nutzungsbereichen der verfügbaren Backends + (soweit bekannt). + </p> </div> </div> % for my $backend (@{ stash('suggestions') // [] }) { @@ -22,27 +28,57 @@ % } <div class="row"> <div class="col s12"> - <h3>Alle Backends</h3> + <h3>Empfohlen</h3> + <p style="text-align: justify;"> + <strong>bahn.de</strong> für Regional- und Fernverkehr in Deutschland. + <strong>ÖBB</strong> für Nah-, Regional- und Fernverkehr in Österreich sowie Regional- und Fernverkehr in der EU. + </p> </div> </div> - % for my $backend (@{ stash('backends') // [] }) { + % for my $backend (grep { $_->{recommended} } @{ stash('backends') // [] }) { + %= include '_backend_line', user => $user, backend => $backend + % } + <div class="row"> + <div class="col s12"> + <h3>Verbünde</h3> + <p style="text-align: justify;"> + Diese Backends sind meist die beste Wahl für + Nahverkehrsfahrten in der jeweiligen Region. + Backends außerhalb Deutschlands sind im Regelfall auch + für dortigen Regional- und Fernverkehr die beste Wahl. + </p> + </div> + </div> + % for my $backend (grep { $_->{association} } @{ stash('backends') // [] }) { + %= include '_backend_line', user => $user, backend => $backend + % } + <div class="row"> + <div class="col s12"> + <h3>Experimentell oder abgekündigt</h3> + <p style="text-align: justify;"> + Einchecken auf eigene Gefahr. + </p> + </div> + </div> + % for my $backend (grep { $_->{experimental} or $_->{legacy} } @{ stash('backends') // [] }) { %= include '_backend_line', user => $user, backend => $backend % } %= end <div class="row"> <div class="col s12"> - <h2>Details</h2> + <h2 id="help">Hilfe</h2> <p> - <strong>Deutsche Bahn</strong> ist eine gute Wahl für Nah-, Regional- und Fernverkehr in Deutschland und (teilweise) Nachbarländern. - Hier stehen zumeist brauchbare Echtzeitdaten zur Verfügung; bei Zügen sind zusätzlich Kartendaten vorhanden. - </p> + <strong>Deutsche Bahn: bahn.de</strong> ist eine gute Wahl für Fahrten des Nah-, Regional- und Fernverkehrs innerhalb Deutschlands. + Die Implementierung ist noch recht frisch, bietet jedoch prinzipiell akkurate Echtzeit- und Kartendaten sowie Wagenreihungen. <p> - <strong>Deutsche Bahn (IRIS-TTS)</strong> unterstützt ausschließlich Schienenverkehr; im Gegensatz zum HAFAS sind hier detaillierte Verspätungsgründe verfügbar. + <strong>Deutsche Bahn: IRIS-TTS</strong> liefert Echtzeitdaten (nur am Start- und Zielbahnhof), Wagenreihungen und Verspätungsmeldungen für Regional- und Fernverkehr in Deutschland. Kartendaten sind nur teilweise verfügbar. + <strong>ÖBB</strong> liefern Kartendaten und Wagenreihungen für Fernverkehr in Deutschland und Umgebung, jedoch keine Meldungen. Echtzeitdaten sind teilweise verfügbar. </p> <p> - Die restlichen Backends können sich für Fahrten in den zugehörigen Verkehrsverbünden lohnen. - Im Gegensatz zum Deutsche Bahn-HAFAS haben sie oft besser gepflegte Echtzeitdaten und liefern in vielen (aber nicht allen) Fällen auch Kartendaten für Nahverkehrsmittel wie Busse oder Stadtbahnen. + Die restlichen Backends lohnen sich für Fahrten in den zugehörigen Verkehrsverbünden bzw. Ländern. + Im Gegensatz zu bahn.de liefern sie in vielen (aber nicht allen) Fällen auch detaillierte Kartendaten für die dem Verbund zugehörigen Verkehrsmittel. In Einzelfällen (z.B. BVG) sind sogar Auslastungsdaten eingepflegt. + Bei Fahrten außerhalb von Deutschland und der Schweiz ist <strong>ÖBB</strong> zumeist die beste Wahl. </p> </div> </div> diff --git a/templates/traewelling.html.ep b/templates/traewelling.html.ep index 1e0d65d..49b5c80 100644 --- a/templates/traewelling.html.ep +++ b/templates/traewelling.html.ep @@ -41,30 +41,6 @@ </div> % } -<div class="row"> - <div class="col s12"> - <div class="card purple"> - <div class="card-content white-text"> - <span class="card-title">Eingeschränkte Synchronisierung</span> - <p> - Träwelling und travelynx setzen unterschiedliche Schwerpunkte und haben unterschiedliche Features. - Kombiniert mit der Vielzahl an möglichen Randfällen heißt das, dass die Synchronisierung nicht immer funktioniert. - Diese Einschränkung ist bekannt und wird voraussichtlich bestehen bleiben. - </p> - <p> - Bei hohen Verspätungen, Ausfällen und nachträglichen Checkin-Änderungen ist die Synchronisierung u.U. nicht möglich und muss von Hand vorgenommen werden. - travelynx-Hooks werden bei via Träwelling vorgenommenen Checkins nicht ausgelöst. - </p> - </div> - <div class="card-action"> - <a href="https://github.com/derf/travelynx/issues" class="waves-effect waves-light btn-flat white-text"> - <i class="material-icons left" aria-hidden="true">bug_report</i>Bug melden - </a> - </div> - </div> - </div> -</div> - % if ($traewelling->{token} and ($traewelling->{expired} or $traewelling->{expiring})) { <div class="row"> <div class="col s12"> diff --git a/templates/user_status.html.ep b/templates/user_status.html.ep index 45fba54..bf11004 100644 --- a/templates/user_status.html.ep +++ b/templates/user_status.html.ep @@ -1,5 +1,5 @@ <div class="row"> <div class="col s12 publicstatuscol" data-user="<%= $name %>"> - %= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey + %= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups') </div> </div> |