diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-17 18:34:33 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-17 18:34:33 +0100 |
commit | 11d77d4bb95e0f79d2afbcf0ab9bb7b66cc12003 (patch) | |
tree | a748c24a00ed6ed6fcc27d7c50f22477aa019fec /templates/history.html.ep | |
parent | 629ca9e9f69be662ef877e1f0e5bf2e020e4a691 (diff) |
add journey detail view
Diffstat (limited to 'templates/history.html.ep')
-rw-r--r-- | templates/history.html.ep | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/history.html.ep b/templates/history.html.ep index cf81765..d79b515 100644 --- a/templates/history.html.ep +++ b/templates/history.html.ep @@ -19,12 +19,13 @@ </tr> </thead> <tbody> - % for my $travel (get_user_travels(0)) { + % for my $travel (get_user_travels()) { % if ($travel->{completed}) { + % my $detail_link = '/journey/' . current_user()->{id} . '-' . $travel->{checkin}->epoch . '-' . $travel->{checkout}->epoch; <tr> <td><%= $travel->{sched_departure}->strftime('%d.%m.%Y') %></td> - <td><%= $travel->{type} %> <%= $travel->{line} // '' %> <%= $travel->{no} %></td> - <td><%= $travel->{from_name} %> → <%= $travel->{to_name} %></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> <td><%= $travel->{rt_departure}->strftime('%H:%M') %> % if ($travel->{sched_departure} != $travel->{rt_departure}) { (+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>) |