diff options
Diffstat (limited to 'templates/_history_months.html.ep')
-rw-r--r-- | templates/_history_months.html.ep | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/_history_months.html.ep b/templates/_history_months.html.ep index 465a159..6a83d74 100644 --- a/templates/_history_months.html.ep +++ b/templates/_history_months.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/%m'); + % for my $month (history_months()) { + % my $link_to = $month->[0]; + % my $text = $month->[1]; % my $class = $link_to eq $current ? 'active' : 'waves-effect'; - <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $since->strftime('%m.%Y') %></a></li> - % $since->add(months => 1)->set(day => 1, hour => 0, minute => 0, second => 0); + <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $text %></a></li> % } </ul> </div> |