diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-31 12:48:01 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-31 12:48:01 +0000 |
commit | 6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e (patch) | |
tree | 5eed52b9d4f7f33a86604e66621ca925bb960ac8 /mktreasurer | |
parent | 8103337ecdc5ffef6c9a45e002539dcac8053735 (diff) | |
download | mgatres-6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e.tar mgatres-6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e.tar.gz mgatres-6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e.tar.bz2 mgatres-6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e.tar.xz mgatres-6c6ff997a0c19a3edbf7b6fd2cb91af2ac71567e.zip |
add donations_who.html page listing all people who donated money
git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8409 5b7c3c08-40e5-403b-9995-ace06908e4af
Diffstat (limited to 'mktreasurer')
-rwxr-xr-x | mktreasurer | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mktreasurer b/mktreasurer index f13b531..44b8d56 100755 --- a/mktreasurer +++ b/mktreasurer @@ -83,6 +83,7 @@ sub donations_infos { by_year => {}, by_pa => {}, total_30 => 0, + sorted_pa_by_total => [], ); foreach my $don (@{$res{donations}}) { my $dt = DateTime->from_epoch(epoch => $don->{date}); @@ -95,6 +96,7 @@ sub donations_infos { push @{$res{by_year}->{$year}->{months}}, $month unless grep { $_ eq $month } @{$res{by_year}->{$year}->{months}}; push @{$res{by_pa}->{$don->{pa}}->{donations}}, $don; + $res{by_pa}->{$don->{pa}}->{who} = $don->{who}; if (time - $don->{date} < '2592000') { # last 30 days $res{total_30} += $don->{amount}; } @@ -106,6 +108,9 @@ sub donations_infos { $d->{type}->{$don->{sc_name}} += $don->{amount}; } } + @{$res{sorted_pa_by_total}} = sort { + $res{by_pa}->{$b}->{total} <=> $res{by_pa}->{$a}->{total} + } keys %{$res{by_pa}}; return \%res; } @@ -267,6 +272,7 @@ sub output_pages { last_update => $last_update, }; process_template($template, 'donations', $vars, 'donations'); + process_template($template, 'donations_who', $vars, 'donations_who'); process_template($template, 'transactions', $vars, 'transactions'); process_template($template, 'index', $vars, 'index'); } |