summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2013-08-26 17:29:24 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2013-08-26 17:34:31 +0200
commit2dd3d04f45f8a0e57f0c8686a12d7b95fe5bdb59 (patch)
treec2899efec29286a45b09942e03dd02bdadae1c4e /web/template
parentfb76aab8cffbc3d251fb635ae8e986c7138d8d68 (diff)
downloadaur-2dd3d04f45f8a0e57f0c8686a12d7b95fe5bdb59.tar.gz
aur-2dd3d04f45f8a0e57f0c8686a12d7b95fe5bdb59.tar.xz
Add "Last Votes by TU" list
This shows a list of all Trusted Users and the vote ID of the last proposal each of the TUs voted on. This list is sorted by vote ID. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/tu_last_votes_list.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php
new file mode 100644
index 00000000..090ce8d0
--- /dev/null
+++ b/web/template/tu_last_votes_list.php
@@ -0,0 +1,40 @@
+<div class="box">
+ <h2><?= __("Last Votes by TU") ?></h2>
+ <table class="results">
+ <thead>
+ <tr>
+ <th><?= __("User") ?></th>
+ <th><?= __("Last vote") ?></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <?php if (empty($result)): ?>
+ <tr><td align="center" colspan="0"><?= __("No results found.") ?></td></tr>
+ <?php else: while (list($indx, $row) = each($result)):
+ if ($indx % 2):
+ $c = "even";
+ else:
+ $c = "odd";
+ endif;
+ $username = username_from_id($row["UserID"]);
+ ?>
+ <tr class="<?= $c ?>">
+ <td>
+ <?php if (!$USE_VIRTUAL_URLS): ?>
+ <a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?= htmlspecialchars($row['UserID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= htmlspecialchars($username) ?>"><?= htmlspecialchars($username) ?></a></td>
+ <?php else: ?>
+ <a href="<?= get_uri('/account/') . htmlspecialchars($username, ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($username)) ?>"><?= htmlspecialchars($username) ?></a>
+ <?php endif; ?>
+ </td>
+ <td>
+ <a href="<?= get_uri('/tu/'); ?>?id=<?= $row['LastVote'] ?>"><?= intval($row["LastVote"]) ?></a>
+ </td>
+ </tr>
+ <?php
+ endwhile;
+ endif;
+ ?>
+ </tbody>
+ </table>
+</div>