diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-07 18:44:33 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-07 18:44:33 +0200 |
commit | ffee7177ac26f4e79227cdf0abcd83f80f34faa4 (patch) | |
tree | 9232d785b19f5e10239be0c20ca55bcc60062700 /templates/landingpage.html.ep | |
parent | 828dd54266dfaf2b58c0498b7ced6c06d6e104ef (diff) |
Refactor history template, add yearly stats
Diffstat (limited to 'templates/landingpage.html.ep')
-rw-r--r-- | templates/landingpage.html.ep | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index b01896d..5d06dbf 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -91,38 +91,7 @@ </div> </div> <h1>Letzte Fahrten</h1> - <div class="row"> - <table class="striped"> - <thead> - <tr> - <th>Datum</th> - <th>Zug</th> - <th>Strecke</th> - <th>Dauer</th> - </tr> - </thead> - <tbody> - % for my $travel (get_user_travels(limit => 1)) { - % if ($travel->{completed}) { - <tr> - % my $detail_link = '/journey/' . current_user()->{id} . '-' . $travel->{ids}->[1]; - <td><%= $travel->{sched_departure}->strftime('%d.%m.%Y') %></td> - <td><a href="<%= $detail_link %>"><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %></a></td> - <td><a href="<%= $detail_link %>"><%= $travel->{from_name} %> → <%= $travel->{to_name} %></a></td> - % if ($travel->{rt_arrival}->epoch and $travel->{rt_departure}->epoch) { - <td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min - </td> - % } else { - <td><%= sprintf('%.f', $self->get_travel_distance($travel->{from_name}, $travel->{to_name}, $travel->{route})) %>km - <i class="material-icons">timer_off</i> - </td> - % } - </tr> - % } - % } - </tbody> - </tabel> - </div> + %= include '_history_trains', journeys => [get_user_travels(limit => 1)]; % } % else { <div class="row"> |