Update wiki links to the new short URL
[aur.git] / web / template / tu_list.php
blob204c89ea37f76176d31f2d6b65e7f7c64dd69cd1
1 <div class="box">
2 <h2><?= $type ?></h2>
4 <?php if ($type == __("Current Votes")): ?>
5 <ul class="admin-actions">
6 <li><a href="<?= get_uri('/addvote/'); ?>"><?= __("Add Proposal") ?></a></li>
7 </ul>
8 <?php endif; ?>
10 <?php if (empty($result)): ?>
11 <p><?= __("No results found.") ?></p>
12 <?php else: ?>
13 <table class="results">
14 <thead>
15 <tr>
16 <th><?= __("Proposal") ?></th>
17 <th><a href="?off=<?= $off ?>&amp;by=<?= $by_next ?>"><?= __("Start") ?></a></th>
18 <th><?= __("End") ?></th>
19 <th><?= __("User") ?></th>
20 <?php if ($type != __("Current Votes")): ?>
21 <th><?= __("Yes") ?></th>
22 <th><?= __("No") ?></th>
23 <?php endif; ?>
24 <th><?= __('Voted') ?></th>
25 </tr>
26 </thead>
28 <tbody>
29 <?php foreach ($result as $indx => $row): ?>
30 <?php
31 if ($indx % 2) {
32 $c = "even";
33 } else {
34 $c = "odd";
37 <tr class="<?= $c ?>">
38 <td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
39 <a href="<?= get_uri('/tu/'); ?>?id=<?= $row['ID'] ?>"><?= $row["Agenda"] ?></a>
40 </td>
41 <td><?= date("Y-m-d", $row["Submitted"]) ?></td>
42 <td><?= date("Y-m-d", $row["End"]) ?></td>
43 <td>
44 <?php if (!empty($row['User'])): ?>
45 <a href="<?= get_uri('/packages/'); ?>?K=<?= $row['User'] ?>&amp;SeB=m"><?= $row['User'] ?></a>
46 <?php else:
47 print "N/A";
48 endif;
50 </td>
51 <?php if ($type != __("Current Votes")): ?>
52 <td><?= $row['Yes'] ?></td>
53 <td><?= $row['No'] ?></td>
54 <?php endif; ?>
55 <td>
56 <?php if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))): ?>
57 <span style="color: green; font-weight: bold"><?= __("Yes") ?></span>
58 <?php else: ?>
59 <span style="color: red; font-weight: bold"><?= __("No") ?></span>
60 <?php endif; ?>
61 </td>
62 </tr>
63 <?php endforeach; ?>
64 </tbody>
65 </table>
67 <div class="pkglist-stats">
68 <p class="pkglist-nav">
69 <?php if ($result):
70 $by = htmlentities($by, ENT_QUOTES); ?>
71 <?php if ($nextresult > 0 && $off != 0):
72 $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
73 <a class="page" href='<?= get_uri('/tu/'); ?>?off=<?= $back ?>&amp;by=<?= $by ?>'>&lsaquo; <?= __("Back") ?></a>
74 <?php endif; ?>
75 <?php if (($off + $limit) < $nextresult):
76 $forw = $off + $limit; ?>
77 <a class="page" href="<?= get_uri('/tu/'); ?>?off=<?= $forw ?>&amp;by=<?= $by ?>"><?= __("Next") ?> &rsaquo;</a>
78 <?php endif; ?>
79 <?php endif; ?>
80 </div>
81 <?php endif; ?>
82 </div>