voting options and new motion links for board members only
[cacert-boardvoting.git] / motions.php
index f4ebdac..6de0beb 100644 (file)
@@ -85,14 +85,13 @@ BODY;
                                                ?>
                                                </td>
                                                <td>
-                                               <i><a href="motions.php?id=<?php echo $row['tag'].'">'.$row['tag']; ?></a></i><br/>
-                                               <b><?php echo htmlentities($row['title']); ?></b><br/>
+                                               <i><a href="motions.php?motion=<?php echo $row['tag'].'">'.$row['tag']; ?></a></i><br/>
+                                               <b><?php echo htmlspecialchars($row['title']); ?></b><br/>
                                                <pre><?php echo htmlspecialchars($row['content']); ?></pre>
                                                <br/>
                                                <i>Due: <?php echo($row['due']); ?> UTC</i><br/>
                                                <i>Proposed: <?php echo($row['proposer']); ?> (<?php echo($row['proposed']); ?> UTC)</i><br/>
-                                               <i>Required Votes: <?php echo($row['quorum']); ?></i><br/>
-                                               <i>Majority: <?php echo($row['majority']); ?>%</i><br/>
+                                               <i>Vote type: <?php echo(!$row['votetype']?'motion':'veto'); ?></i><br/>
                                                <i>Aye|Naye|Abstain: <?php echo($row['ayes']); ?>|<?php echo($row['nayes']); ?>|<?php echo($row['abstains']); ?></i><br/>
                                        <?php
                                                if ($row['status'] ==0 || $_REQUEST['showvotes']) {
@@ -110,7 +109,7 @@ BODY;
                                                </td>
                                        <td class="actions">
                                                <?php
-                                                       if ($row['status'] == 0) {
+                                                       if ($row['status'] == 0 && $user ) {
                                                                ?>
                                                                <ul>
                                                                        <li><a href="vote.php?motion=<?php echo($row['id']); ?>&amp;vote=1">Aye</a></li>
@@ -138,9 +137,7 @@ BODY;
                                        <?php if ($items>9) { ?><a href="?page=<?php echo($page+1); ?>">&gt;</a><?php } else { ?>&nbsp;<?php } ?>
                                </td>
                                <td class="actions">
-                                       <ul>
-                                               <li><a href="motion.php">New Motion</a></li>
-                                       </ul>
+                                       <?php if ($user) echo('<ul><li><a href="motion.php">New Motion</a></li></ul>'); ?>
                                </td>
                        </tr>
                        <?php