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/landingpage.html.ep | |
parent | 629ca9e9f69be662ef877e1f0e5bf2e020e4a691 (diff) |
add journey detail view
Diffstat (limited to 'templates/landingpage.html.ep')
-rw-r--r-- | templates/landingpage.html.ep | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index c672dd2..dcc0083 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -75,12 +75,13 @@ </tr> </thead> <tbody> - % for my $travel (get_user_travels(1)) { + % for my $travel (get_user_travels(limit => 1)) { % if ($travel->{completed}) { <tr> + % my $detail_link = '/journey/' . current_user()->{id} . '-' . $travel->{checkin}->epoch . '-' . $travel->{checkout}->epoch; <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> % if ($travel->{rt_arrival}->epoch and $travel->{rt_departure}->epoch) { <td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min </td> |