From d6e6c9992e85151ee12b9104bca647ce0e11782b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 27 Apr 2019 09:11:42 +0200 Subject: History: Only show months and years with logged journeys --- templates/_history_years.html.ep | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/_history_years.html.ep') 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 @@
    - % 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'; -
  • <%= $since->strftime('%Y') %>
  • - % $since->add(years => 1)->set(month => 1, day => 1, hour => 0, minute => 0, second => 0); +
  • <%= $text %>
  • % }
-- cgit v1.2.3