diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-11-21 15:33:43 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-11-21 15:34:06 +0100 |
commit | ccfdd8007e136d5d98652d415dda8eb595a2ada9 (patch) | |
tree | 6b685625b796dfe3c251ab012a80239c6d3d1795 /templates/_history_years.html.ep | |
parent | e3fba3dcd493f609e107435867c4a67cb7ee420f (diff) |
testing a more organized history navigation1.18.9
Diffstat (limited to 'templates/_history_years.html.ep')
-rw-r--r-- | templates/_history_years.html.ep | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/templates/_history_years.html.ep b/templates/_history_years.html.ep index e0b1357..09ea5ce 100644 --- a/templates/_history_years.html.ep +++ b/templates/_history_years.html.ep @@ -1,12 +1,18 @@ <div class="row"> <div class="col s12"> - <ul class="pagination"> - % for my $year (journeys->get_years(uid => current_user->{id})) { - % my $link_to = $year->[0]; - % my $text = $year->[1]; - % my $class = $link_to eq $current ? 'active' : 'waves-effect'; - <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $text %></a></li> - % } - </ul> + % my @years = journeys->get_years(uid => current_user->{id}); + % if (@years) { + <ul class="pagination"> + % for my $year (journeys->get_years(uid => current_user->{id})) { + % my $link_to = $year->[0]; + % my $text = $year->[1]; + % my $class = $link_to eq $current ? 'active' : 'waves-effect'; + <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $text %></a></li> + % } + </ul> + % } + % else { + Keine Fahrten gefunden. + % } </div> </div> |