diff options
author | Romain d'Alverny <rda@mageia.org> | 2013-01-29 18:33:59 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2013-01-29 18:33:59 +0000 |
commit | c905b814006d0b426eb04ae8f7e419fc69af1858 (patch) | |
tree | a372fedf00bb20afcf545251f0d1c325d8c2aac6 /en/about/reports | |
parent | 04074b7adaf346b5140c66e987cba151f9964764 (diff) | |
download | www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.gz www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.bz2 www-c905b814006d0b426eb04ae8f7e419fc69af1858.tar.xz www-c905b814006d0b426eb04ae8f7e419fc69af1858.zip |
updates for 2013 report display
Diffstat (limited to 'en/about/reports')
-rw-r--r-- | en/about/reports/index.php | 5 | ||||
-rw-r--r-- | en/about/reports/template.php | 14 | ||||
-rw-r--r-- | en/about/reports/template_lib.php | 4 |
3 files changed, 13 insertions, 10 deletions
diff --git a/en/about/reports/index.php b/en/about/reports/index.php index 693b2e21a..811aec653 100644 --- a/en/about/reports/index.php +++ b/en/about/reports/index.php @@ -24,10 +24,9 @@ _lang_load($locale, 'about/reports'); <p><?php _e('Here you will find our various activity and financial reports for every year.')?></p> <ul> - <li>2012: <?php _e('<a href="2012/">Financial report</a> (in progress).')?></li> - + <li>2013: <?php _e('<a href="2013/">Financial report</a> (in progress).')?></li> + <li>2012: <?php _e('<a href="2012/">Financial report</a>.')?></li> <li>2011: <?php _e('<a href="https://wiki.mageia.org/en/Rapport_moral_2011">Moral report</a> (in French & English), <a href="2011/">financial report</a>.')?></li> - <li>2010: <?php _e('Moral report, <a href="2010/">financial report</a>.')?></li> </ul> </div> diff --git a/en/about/reports/template.php b/en/about/reports/template.php index 8947f961f..24c2e5e53 100644 --- a/en/about/reports/template.php +++ b/en/about/reports/template.php @@ -73,10 +73,13 @@ $flow = array( $list = array(); $count = array(); + +// FIXME take ## Other revenues lines into account. foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) { $list[] = $line[2]; $count[] = $line[1]; } + unset($list[0]); unset($list[13]); unset($count[0]); @@ -87,7 +90,7 @@ $flow['revenue_op'] = $count; include 'template_lib.php'; -$R = get_revenues($parsed['# Income details > ## Donations monthly summary']); +$R = get_revenues($parsed['# Income details > ## Donations monthly summary'], $_months); $expenses_total = array_sum($expenses_monthly_summary[0]); @@ -194,6 +197,7 @@ $expenses_total = array_sum($expenses_monthly_summary[0]); #summary { width: 300px; float: left; text-align: left; background: #fff; border-bottom: 1px solid #ddd; } #report { text-align: left; width: 800px; float: left; border: 1px solid #ddd; border-top: 0; } #links { width: 150px; float: left; background: #fff; text-align: left; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 1em;} + .accounts tr.total { font-weight: 600; } </style> <aside id="summary"> <div class="para"> @@ -204,10 +208,12 @@ $expenses_total = array_sum($expenses_monthly_summary[0]); $k = sprintf('# Account balance on %d/12/31', $year); $k = array_key_exists($k, $parsed) ? $k : '# Account balance'; $v = $parsed[$k]; - $s = '<table class="fr-table">'; + $s = '<table class="fr-table accounts">'; foreach ($v as $k => $w) { - $s .= sprintf('<tr><td>%s</td><td class="money">%s</td></tr>', - $k, number_format(str_replace(',', '.', $w), 2, '.', ',')); + $s .= sprintf('<tr class="%s"><td>%s</td><td class="money">%s</td></tr>', + str_replace(' ', '-', $k), + $k, + number_format(str_replace(',', '.', $w), 2, '.', ',')); } $s .= '</table>'; echo $s; diff --git a/en/about/reports/template_lib.php b/en/about/reports/template_lib.php index 1d6911548..e2f749e50 100644 --- a/en/about/reports/template_lib.php +++ b/en/about/reports/template_lib.php @@ -68,10 +68,8 @@ H; * * @return array('html' => string, 'data' => mixed) */ -function get_revenues($v) +function get_revenues($v, $_months) { - global $_months; - $html = '<div id="income-pie"></div>'; $html .= '<table class="fr-table">'; |