diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-27 09:11:42 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-27 09:11:42 +0200 |
commit | d6e6c9992e85151ee12b9104bca647ce0e11782b (patch) | |
tree | 4bddfc005f4694aff7724f3479cac2e0bd4f5032 /templates/_history_years.html.ep | |
parent | 8c1888263ba1b79c86c677b8f7f665b7342b04c2 (diff) |
History: Only show months and years with logged journeys
Diffstat (limited to 'templates/_history_years.html.ep')
-rw-r--r-- | templates/_history_years.html.ep | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/_history_years.html.ep b/templates/_history_years.html.ep index 02bb70d..768c438 100644 --- a/templates/_history_years.html.ep +++ b/templates/_history_years.html.ep @@ -1,11 +1,11 @@ <div class="row"> <div class="col s12"> <ul class="pagination"> - % while ($since < $now) { - % my $link_to = $since->strftime('%Y'); + % for my $year (history_years()) { + % 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 %>"><%= $since->strftime('%Y') %></a></li> - % $since->add(years => 1)->set(month => 1, day => 1, hour => 0, minute => 0, second => 0); + <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $text %></a></li> % } </ul> </div> |