diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/donations.html | 31 | ||||
-rw-r--r-- | tmpl/donations_by_month.html | 28 | ||||
-rw-r--r-- | tmpl/donations_by_year.html | 29 |
3 files changed, 88 insertions, 0 deletions
diff --git a/tmpl/donations.html b/tmpl/donations.html new file mode 100644 index 0000000..aa8f80e --- /dev/null +++ b/tmpl/donations.html @@ -0,0 +1,31 @@ +[% SET login = users.$user.uid.0 %] +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>[% config.sitename %] Donations</title> + </head> + <body> + [%- USE date(format='%Y/%m/%d') -%] + <h1>Mageia.Org donations</h1> + [% donations.total_30 %] Euros have been donated to Mageia.org in the last 30 days. + + [%- l = 5 -%] + <h3>Last [% l %] donations</h3> + <ul> + [%- i=0 -%] + [%- FOR don IN donations.donations -%] + [%- i = i + 1 -%] + [%- LAST IF i > l -%] + <li><b>[% don.who %]</b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> + [%- END -%] + </ul> + + <h3>Donations per year</h3> + <ul> + [%- FOR year IN donations.by_year.keys.sort %] + <li><a href="donations_[% year %].html">[% year %]: [% donations.by_year.$year.total %] Euros</a></li> + [%- END %] + </ul> + <small>Last update: [% date.format(last_update, format => '%Y/%m/%d %H:%M:%S') %]</small> + </body> +</html> diff --git a/tmpl/donations_by_month.html b/tmpl/donations_by_month.html new file mode 100644 index 0000000..9dd338d --- /dev/null +++ b/tmpl/donations_by_month.html @@ -0,0 +1,28 @@ +[% SET login = users.$user.uid.0 %] +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>[% config.sitename %]: Donations for [% month %]</title> + </head> + <body> + <h1>Mageia.Org donations for month [% month %]</h1> + <h3>Summary</h3> + <ul> + <li> + <b>Total</b>: [% donations.by_month.$month.total %] Euros + </li> + [% FOR type IN donations.by_month.$month.type.keys %] + <li> + <b>[% type %]</b>: [% donations.by_month.$month.type.$type %] Euros + </li> + [%- END -%] + </ul> + <h3>Donations list</h3> + <ul> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR don IN donations.by_month.$month.donations %] + <li><b>[% don.who %]</b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> + [%- END -%] + </ul> + </body> +</html> diff --git a/tmpl/donations_by_year.html b/tmpl/donations_by_year.html new file mode 100644 index 0000000..e7941bb --- /dev/null +++ b/tmpl/donations_by_year.html @@ -0,0 +1,29 @@ +[% SET login = users.$user.uid.0 %] +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>[% config.sitename %]: Donations for [% year %]</title> + </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> + <ul> + [%- FOR month IN donations.by_month.keys -%] + [%- IF donations.by_month.$month.year == year -%] + <li><a href="donations_[% month %].html">[% month %]: [% donations.by_month.$month.total %] Euros</a></li> + [%- END -%] + [%- END -%] + </ul> + </body> +</html> |