blob: c9a963f20999b4b9bd6ed8a9e8004f8d92759e69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %]: Donations for [% year %]</title>
[% INCLUDE head_chart.html %]
</head>
<body>
<h1>Mageia.Org donations for year [% year %]</h1>
<h3>Summary</h3>
<ul>
<li>
<b>Total</b>: [% donations.by_year.$year.total %] Euros
</li>
[%- FOR type IN donations.by_year.$year.type.keys -%]
<li>
<b>[% type %]</b>: [% donations.by_year.$year.type.$type %] Euros
</li>
[%- END -%]
</ul>
<h3>Donations for each month</h3>
[% IF donations.by_year.$year.months.size > 1 %]
<canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.$year.months.size * 65 %]"></canvas>
<script>
var barChartData = {
labels : ["[% donations.by_year.$year.months.sort.join('","') %]"],
datasets : [
{
fillColor : "#151f79",
strokeColor : "#101333",
data : [
[%- FOR month IN donations.by_year.$year.months.sort -%]
[%- donations.by_month.$month.total -%]
[%- IF ! loop.last() -%],[%- END -%]
[%- END %]]
}
]
}
var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData);
</script>
[% END %]
<ul>
[%- FOR month IN donations.by_month.keys.sort -%]
[%- IF donations.by_month.$month.year == year -%]
<li><a href="donations_m_[% month %].html">[% month %]: [% donations.by_month.$month.total %] Euros</a></li>
[%- END -%]
[%- END -%]
</ul>
</body>
</html>
|