4 $abstain = $row["Abstain"];
5 $active_tus = $row["ActiveTUs"];
6 $quorum = $row["Quorum"];
8 $total = $yes +
$no +
$abstain;
10 $participation = $total / $active_tus;
15 if ($yes > $active_tus / 2) {
16 $vote_accepted = true;
17 } elseif ($participation > $quorum && $yes > $no) {
18 $vote_accepted = true;
20 $vote_accepted = false;
24 <h2
><?
= __("Proposal Details") ?
></h2
>
26 <?php
if ($isrunning == 1): ?
>
27 <p style
="font-weight: bold; color: red">
28 <?
= __("This vote is still running.") ?
>
35 <?php
if (!empty($row['User'])): ?
>
36 <a href
="<?= get_uri('/packages/'); ?>?K=<?= $row['User'] ?>&SeB=m"><?
= $row['User'] ?
></a
>
42 <?
= __("Submitted: %s by %s", gmdate("Y-m-d H:i", $row['Submitted']), html_format_username(username_from_id($row['SubmitterID']))) ?
>
45 <strong
><?
= gmdate("Y-m-d H:i", $row['End']) ?
></strong
>
46 <?php
if ($isrunning == 0): ?
>
49 <?php
if ($active_tus == 0): ?
>
50 <span
><?
= __("unknown") ?
></span
>
51 <?php
elseif ($vote_accepted): ?
>
52 <span style
="color: green; font-weight: bold"><?
= __("Accepted") ?
></span
>
54 <span style
="color: red; font-weight: bold"><?
= __("Rejected") ?
></span
>
60 <?
= str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?
>
65 <?php
if (!$isrunning): ?
>
66 <th
><?
= __("Yes") ?
></th
>
67 <th
><?
= __("No") ?
></th
>
68 <th
><?
= __("Abstain") ?
></th
>
70 <th
><?
= __("Total") ?
></th
>
71 <th
><?
= __('Voted') ?
></th
>
72 <th
><?
= __('Participation') ?
></th
>
75 <?php
if (!$isrunning): ?
>
78 <td
><?
= $abstain ?
></td
>
80 <td
><?
= $total ?
></td
>
82 <?php
if ($hasvoted == 0): ?
>
83 <span style
="color: red; font-weight: bold"><?
= __("No") ?
></span
>
85 <span style
="color: green; font-weight: bold"><?
= __("Yes") ?
></span
>
88 <?php
if ($active_tus > 0): ?
>
89 <td
><?
= number_format($participation * 100, 2) ?
>%
</td
>
91 <td
><?
= __("unknown") ?
></td
>
97 <?php
if (!$isrunning): ?
>
99 <h2
><?
= __("Voters"); ?
></h2
>
101 <?php
foreach($whovoted as $voter): ?
>
102 <li
><a href
="<?= get_user_uri($voter) ?>"><?
= htmlspecialchars($voter) ?
></a
></li
>
110 <?php
if ($canvote == 1): ?
>
111 <form action
="<?= get_uri('/tu/'); ?>?id=<?= $row['ID'] ?>" method
="post">
113 <input type
="submit" class="button" name
="voteYes" value
="<?= __("Yes
") ?>" />
114 <input type
="submit" class="button" name
="voteNo" value
="<?= __("No
") ?>" />
115 <input type
="submit" class="button" name
="voteAbstain" value
="<?= __("Abstain
") ?>" />
116 <input type
="hidden" name
="doVote" value
="1" />
117 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />