Loading index.pl +6 −0 Original line number Diff line number Diff line Loading @@ -647,6 +647,12 @@ post '/action' => sub { } }; get '/a/history' => sub { my ($self) = @_; $self->render('history'); }; get '/x/about' => sub { my ($self) = @_; Loading templates/history.html.ep 0 → 100644 +30 −0 Original line number Diff line number Diff line <h1>Bisherige 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(0)) { % if ($travel->{completed}) { <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> % if ($travel->{rt_arrival} and $travel->{rt_departure}) { <td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min</td> % } % else { <td>?</td> % } </tr> % } % } </tbody> </tabel> </div> templates/layouts/default.html.ep +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ <div class="nav-wrapper container"> <a href="/" class="brand-logo left">travelynx</a> <ul id="nav-mobile" class="right"> <li class="<%= navbar_class('/a/history') %>"><a href='/a/history' title="History"><i class="material-icons">history</i></a></li> <li class="<%= navbar_class('/x/about') %>"><a href='/x/about' title="About"><i class="material-icons">info_outline</i></a></li> </ul> </div> Loading Loading
index.pl +6 −0 Original line number Diff line number Diff line Loading @@ -647,6 +647,12 @@ post '/action' => sub { } }; get '/a/history' => sub { my ($self) = @_; $self->render('history'); }; get '/x/about' => sub { my ($self) = @_; Loading
templates/history.html.ep 0 → 100644 +30 −0 Original line number Diff line number Diff line <h1>Bisherige 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(0)) { % if ($travel->{completed}) { <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> % if ($travel->{rt_arrival} and $travel->{rt_departure}) { <td><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min</td> % } % else { <td>?</td> % } </tr> % } % } </tbody> </tabel> </div>
templates/layouts/default.html.ep +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ <div class="nav-wrapper container"> <a href="/" class="brand-logo left">travelynx</a> <ul id="nav-mobile" class="right"> <li class="<%= navbar_class('/a/history') %>"><a href='/a/history' title="History"><i class="material-icons">history</i></a></li> <li class="<%= navbar_class('/x/about') %>"><a href='/x/about' title="About"><i class="material-icons">info_outline</i></a></li> </ul> </div> Loading