summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2013-08-04 15:15:44 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2013-08-22 17:47:53 +0200
commit86fa42f399dafb2a41b1cfb9c2e0d0b5ab9fedfe (patch)
treec82dd102eb76138e375c68da9702cd4c335ce0ed
parent9ff082be25d444535ce99410363e63f6cca5f30d (diff)
downloadaurweb-86fa42f399dafb2a41b1cfb9c2e0d0b5ab9fedfe.tar.xz
Show participation in vote details
This is calculated by dividing the sum of all votes by the total number of TUs (where the number of TUs is measured when the vote starts). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/template/tu_details.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index be816ce..4f291f0 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -34,6 +34,7 @@
<th><?= __("Abstain") ?></th>
<th><?= __("Total") ?></th>
<th><?= __('Voted') ?></th>
+ <th><?= __('Participation') ?></th>
</tr>
<tr>
<td><?= $row['Yes'] ?></td>
@@ -47,6 +48,11 @@
<span style="color: green; font-weight: bold"><?= __("Yes") ?></span>
<?php endif; ?>
</td>
+ <?php if ($row['ActiveTUs'] > 0): ?>
+ <td><?= number_format(($row['Yes'] + $row['No'] + $row['Abstain']) / $row['ActiveTUs'] * 100, 2) ?>%</td>
+ <?php else: ?>
+ <td><?= __("unknown") ?></td>
+ <?php endif; ?>
</tr>
</table>
</div>