aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-19 21:45:24 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-19 21:45:24 +0000
commit9d2f9bec07faa7ee4b1772c75cdbb687cdde249b (patch)
tree86e9097dbe5319e16f317f9829d6b39463b5557e
parent182750d3107f1143ac27e96e7baf79d353767d01 (diff)
downloadwww-9d2f9bec07faa7ee4b1772c75cdbb687cdde249b.tar
www-9d2f9bec07faa7ee4b1772c75cdbb687cdde249b.tar.gz
www-9d2f9bec07faa7ee4b1772c75cdbb687cdde249b.tar.bz2
www-9d2f9bec07faa7ee4b1772c75cdbb687cdde249b.tar.xz
www-9d2f9bec07faa7ee4b1772c75cdbb687cdde249b.zip
donate: add donations total and current balance
-rw-r--r--en/donate/index.php5
-rw-r--r--g/js/treasurer.js7
2 files changed, 11 insertions, 1 deletions
diff --git a/en/donate/index.php b/en/donate/index.php
index de14c6888..1f8411209 100644
--- a/en/donate/index.php
+++ b/en/donate/index.php
@@ -21,6 +21,9 @@ _lang_load($locale, 'donate');
#options > li { list-style: none; padding: 0; margin: 0 0 4em 0; }
.dlinfo li { margin-bottom: 0.6em; }
</style>
+ <script src="http://static.mageia.org/g/js/jquery-1.10.1.min.js"></script>
+ <script src="http://static.mageia.org/g/js/treasurer.js"></script>
+ <script type="text/javascript">donate_page();</script>
</head>
<body class="donate">
<?php echo $hsnav; ?>
@@ -81,7 +84,7 @@ _lang_load($locale, 'donate');
<div class="para track">
<h2 id="status"><?php _e('How to track donation?')?></h2>
<p><?php echo sprintf(_t('Currently, we received a lot of generous donations (%s, remains %s) thanks to all of our <a href="../thank-you/">donors</a>!'),
- $g_donate_amount, $g_amount_remain);?></p>
+ '<span id="donations_total">x</span> euros', '<span id="balance">x</span> euros');?></p>
<p><?php echo sprintf(_t('We believe public accountability is crucial. You can know more about how are used the funds received by reading our <a href="%s">financial reports</a>.'), '../about/reports/' . date('Y') . '/')?></p>
<!--
diff --git a/g/js/treasurer.js b/g/js/treasurer.js
index 615b0c1ef..13654ce2a 100644
--- a/g/js/treasurer.js
+++ b/g/js/treasurer.js
@@ -425,3 +425,10 @@ function thankyou_page() {
document.getElementById("last_update").innerHTML=data.last_update;
});
}
+
+function donate_page() {
+ $.getJSON(treasurer_infos_url, function(data) {
+ document.getElementById("donations_total").innerHTML=data.donations_total;
+ document.getElementById("balance").innerHTML=data.balance;
+ });
+}