summaryrefslogtreecommitdiff
path: root/templates/_history_months_for_year.html.ep
blob: 1d035ab7720106406c409b08679870c5aa2b8ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div class="row">
	<div class="col s12">
		<div class="collection">
			% for my $month (journeys->get_months_for_year(uid => current_user->{id}, year => $year)) {
				% if (defined $month->[2]) {
					<a class="collection-item" href="/history/<%= $month->[0] %>"><%= $month->[1] %>
						% if (defined $month->[2]{km_route}) {
							<span class="secondary-content"><%= sprintf('%.f', $month->[2]{km_route}) %> km</span>
						% }
					</a>
				% }
				% else {
					<div class="collection-item disabled"><%= $month->[1] %></div>
				% }
			% }
		</div>
	</div>
</div>