Skip to content
Snippets Groups Projects
Unverified Commit 6594d74e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

show expected utilization alongsie train route

parent c92b6bc9
No related branches found
No related tags found
No related merge requests found
...@@ -466,6 +466,21 @@ sub startup { ...@@ -466,6 +466,21 @@ sub startup {
} }
); );
$self->helper(
'load_icon' => sub {
my ( $self, $load ) = @_;
my $first = $load->{FIRST} // 0;
my $second = $load->{SECOND} // 0;
my @symbols
= (
qw(help_outline person_outline people priority_high not_interested)
);
return ( $symbols[$first], $symbols[$second] );
}
);
$self->helper( $self->helper(
'checkin' => sub { 'checkin' => sub {
my ( $self, %opt ) = @_; my ( $self, %opt ) = @_;
......
...@@ -43,6 +43,9 @@ a.tablerow { ...@@ -43,6 +43,9 @@ a.tablerow {
span { span {
display: inline-block; display: inline-block;
} }
.material-icons {
margin-bottom: 0.2em;
}
} }
.pagination { .pagination {
......
...@@ -219,18 +219,24 @@ ...@@ -219,18 +219,24 @@
% for my $station (@{$journey->{route_after}}) { % for my $station (@{$journey->{route_after}}) {
<a class="tablerow action-checkout" data-station="<%= $station->[0] %>"> <a class="tablerow action-checkout" data-station="<%= $station->[0] %>">
<span><%= $station->[0] %></span> <span><%= $station->[0] %></span>
<span>
% if ($station->[1]{load}{SECOND}) {
% my ($first, $second) = load_icon($station->[1]{load});
<i class="material-icons tiny" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true" style="vertical-align: bottom;"><%= $second %></i>
% }
% if ($station->[2] and $station->[2] eq 'cancelled') { % if ($station->[2] and $station->[2] eq 'cancelled') {
<span>entfällt</span> entfällt
% } % }
% elsif ($station->[1]{rt_arr}) { % elsif ($station->[1]{rt_arr}) {
<span><%= $station->[1]{rt_arr}->strftime('%H:%M') %></span> <%= $station->[1]{rt_arr}->strftime('%H:%M') %>
% } % }
% elsif ($station->[1]{sched_arr}) { % elsif ($station->[1]{sched_arr}) {
<span><%= $station->[1]{sched_arr}->strftime('%H:%M') %></span> <%= $station->[1]{sched_arr}->strftime('%H:%M') %>
% } % }
% elsif ($station->[2] and $station->[2] eq 'additional') { % elsif ($station->[2] and $station->[2] eq 'additional') {
<span>Zusatzhalt</span> Zusatzhalt
% } % }
</span>
</a> </a>
% } % }
</p> </p>
...@@ -328,18 +334,24 @@ ...@@ -328,18 +334,24 @@
% my $is_dest = ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}); % my $is_dest = ($journey->{arr_name} and $station->[0] eq $journey->{arr_name});
<a class="action-checkout tablerow" style="<%= $is_dest? 'font-weight: bold;' : '' %>" data-station="<%= $station->[0] %>"> <a class="action-checkout tablerow" style="<%= $is_dest? 'font-weight: bold;' : '' %>" data-station="<%= $station->[0] %>">
<span><%= $station->[0] %></span> <span><%= $station->[0] %></span>
<span>
% if ($station->[1]{load}{SECOND}) {
% my ($first, $second) = load_icon($station->[1]{load});
<i class="material-icons tiny" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true" style="vertical-align: bottom;"><%= $second %></i>
% }
% if ($station->[2] and $station->[2] eq 'cancelled') { % if ($station->[2] and $station->[2] eq 'cancelled') {
<span>entfällt</span> entfällt
% } % }
% elsif ($station->[1]{rt_arr}) { % elsif ($station->[1]{rt_arr}) {
<span><%= $station->[1]{rt_arr}->strftime('%H:%M') %></span> <%= $station->[1]{rt_arr}->strftime('%H:%M') %>
% } % }
% elsif ($station->[1]{sched_arr}) { % elsif ($station->[1]{sched_arr}) {
<span><%= $station->[1]{sched_arr}->strftime('%H:%M') %></span> <%= $station->[1]{sched_arr}->strftime('%H:%M') %>
% } % }
% elsif ($station->[2] and $station->[2] eq 'additional') { % elsif ($station->[2] and $station->[2] eq 'additional') {
<span>Zusatzhalt</span> Zusatzhalt
% } % }
</span>
</a> </a>
% if ($user->{sb_template}) { % if ($user->{sb_template}) {
<a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1]{eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>"><i class="material-icons tiny">train</i></a> <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1]{eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>"><i class="material-icons tiny">train</i></a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment