summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-02-03 21:53:21 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-02-03 21:53:21 +0100
commit6ee13212111ab67f920ff7778e39acd69a9878df (patch)
tree1d1a603c362ee5823d06de6d32a0d028e0759697
parent44ac24d394d15941416b0fcc33fe471d7d19c64c (diff)
downloadaur-6ee13212111ab67f920ff7778e39acd69a9878df.tar.gz
aur-6ee13212111ab67f920ff7778e39acd69a9878df.tar.xz
Hide intermediate voting results
In order to make votes as neutral as possible, current yes/no votes should not be shown until the voting period is over. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/template/tu_details.php4
-rw-r--r--web/template/tu_list.php4
2 files changed, 8 insertions, 0 deletions
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index 5fe66c0c..fca18151 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -62,17 +62,21 @@ if ($yes > $active_tus / 2) {
<table>
<tr>
+ <?php if (!$isrunning): ?>
<th><?= __("Yes") ?></th>
<th><?= __("No") ?></th>
<th><?= __("Abstain") ?></th>
+ <?php endif; ?>
<th><?= __("Total") ?></th>
<th><?= __('Voted') ?></th>
<th><?= __('Participation') ?></th>
</tr>
<tr>
+ <?php if (!$isrunning): ?>
<td><?= $yes ?></td>
<td><?= $no ?></td>
<td><?= $abstain ?></td>
+ <?php endif; ?>
<td><?= $total ?></td>
<td>
<?php if ($hasvoted == 0): ?>
diff --git a/web/template/tu_list.php b/web/template/tu_list.php
index 6ad9f90d..b3e1073a 100644
--- a/web/template/tu_list.php
+++ b/web/template/tu_list.php
@@ -17,8 +17,10 @@
<th><a href="?off=<?= $off ?>&amp;by=<?= $by_next ?>"><?= __("Start") ?></a></th>
<th><?= __("End") ?></th>
<th><?= __("User") ?></th>
+ <?php if ($type != __("Current Votes")): ?>
<th><?= __("Yes") ?></th>
<th><?= __("No") ?></th>
+ <?php endif; ?>
<th><?= __('Voted') ?></th>
</tr>
</thead>
@@ -46,8 +48,10 @@
endif;
?>
</td>
+ <?php if ($type != __("Current Votes")): ?>
<td><?= $row['Yes'] ?></td>
<td><?= $row['No'] ?></td>
+ <?php endif; ?>
<td>
<?php if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))): ?>
<span style="color: green; font-weight: bold"><?= __("Yes") ?></span>