This adds an field that indicates whether the vote was accepted or
rejected, based on the rules specified in the TU Bylaws.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/template/tu_details.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index 4f291f0..6ed6efd 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -21,6 +21,17 @@
                <br />
                <?= __("End") ?>:
                <strong><?= gmdate("Y-m-d H:i", $row['End']) ?></strong>
+               <?php if ($isrunning == 0): ?>
+               <br />
+               <?= __("Result") ?>:
+               <?php if ($row['Quorum'] == 0): ?>
+               <span><?= __("unknown") ?></span>
+               <?php elseif (($row['Yes'] > $row['ActiveTUs'] / 2) || 
(($row['Yes'] + $row['No'] + $row['Abstain']) / $row['ActiveTUs'] >= 
$row['Quorum'] && $row['Yes'] > $row['No'])): ?>
+               <span style="color: green; font-weight: bold"><?= 
__("Accepted") ?></span>
+               <?php else: ?>
+               <span style="color: red; font-weight: bold"><?= __("Rejected") 
?></span>
+               <?php endif; ?>
+               <?php endif; ?>
        </p>
 
        <p>
-- 
1.8.4.rc1.383.g13e9f3f

Reply via email to