mirror of
https://github.com/derf/travelynx
synced 2024-11-26 14:30:18 +00:00
show expected load of suggested connections, if available
This commit is contained in:
parent
8bb803366a
commit
90d2e0357c
3 changed files with 39 additions and 3 deletions
|
@ -280,6 +280,11 @@ sub get_connecting_trains_p {
|
|||
and $hafas_train->number
|
||||
== $iris_train->[0]->train_no )
|
||||
{
|
||||
if ( $hafas_train->load
|
||||
and $hafas_train->load->{SECOND} )
|
||||
{
|
||||
$iris_train->[3] = $hafas_train->load;
|
||||
}
|
||||
for my $stop ( $hafas_train->route ) {
|
||||
if ( $stop->{name}
|
||||
and $stop->{name} eq $iris_train->[1]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div><table class="striped"><tbody>
|
||||
% for my $res (@{$connections}) {
|
||||
% my ($train, $via, $via_arr) = @{$res};
|
||||
% my ($train, $via, $via_arr, $load) = @{$res};
|
||||
% $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
|
||||
% my $td_class = '';
|
||||
% my $link_class = 'action-checkin';
|
||||
|
@ -39,6 +39,10 @@
|
|||
%= $via
|
||||
% }
|
||||
<br/>
|
||||
% if ($load) {
|
||||
% my ($first, $second) = load_icon($load);
|
||||
<i class="material-icons tiny" aria-hidden="true"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true"><%= $second %></i>
|
||||
% }
|
||||
% if ($train->{interchange_icon}) {
|
||||
<i class="material-icons tiny" aria-label="<%= $train->{interchange_text} %>"><%= $train->{interchange_icon} %></i>
|
||||
% }
|
||||
|
@ -46,7 +50,7 @@
|
|||
<i class="material-icons tiny" aria-label="Zug ist überbesetzt">warning</i>
|
||||
% }
|
||||
% if ($train->{message_id}{82} or $train->{message_id}{85}) {
|
||||
<i class="material-icons tiny" aria-label="Fehlende Wagen">people</i>
|
||||
<i class="material-icons tiny" aria-label="Fehlende Wagen">remove</i>
|
||||
% }
|
||||
% if (($train->{message_id}{73} or $train->{message_id}{74} or $train->{message_id}{75} or $train->{message_id}{76} or $train->{message_id}{80}) and not $train->{message_id}{84}) {
|
||||
<i class="material-icons tiny" aria-label="Abweichende Wagenreihung">compare_arrows</i>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<tr>
|
||||
<td><i class="material-icons">directions_run</i></td>
|
||||
<td>Knapper Umstieg. Zug wird möglicherweise nicht erreicht.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">warning</i></td>
|
||||
<td>Der Zug ist überbesetzt. Möglicherweise sind keine freien Sitzplätze vorhanden.</td>
|
||||
|
@ -26,7 +27,7 @@
|
|||
<td>Eingeschränkte Barrierefreihet, z.B. fehlendes oder defektes rollstuhlgerechtes WC.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">people</i></td>
|
||||
<td><i class="material-icons">remove</i></td>
|
||||
<td>Mindestens ein Wagen fehlt.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -39,5 +40,31 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Auslastung</h3>
|
||||
<p>Die erwartete Auslastung der ersten und zweiten Wagenklasse wird bei Anschluss-Vorschlägen sowie bei Unterwegshalten des aktuellen Zuges angegeben, sofern verfügbar.</p>
|
||||
<table class="striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><i class="material-icons">help_outline</i></td>
|
||||
<td>Auslastung unbekannt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">person_outline</i></td>
|
||||
<td>Niedrige Auslastung</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">people</i></td>
|
||||
<td>Hohe Auslastung</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">priority_high</i></td>
|
||||
<td>Sehr hohe Auslastung</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="material-icons">not_interested</i></td>
|
||||
<td>Der Zug ist ausgebucht</td>
|
||||
<tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue