summaryrefslogtreecommitdiff
path: root/templates/_history_years.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_history_years.html.ep')
-rw-r--r--templates/_history_years.html.ep22
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>