diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-25 10:43:41 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-25 11:36:15 +0200 |
commit | 959c61a77dd6a41bf82cc12b5eb873c9cfb0ffb8 (patch) | |
tree | 3c72832cba6fa9c1d715895f375a9645fc54b183 /web/template | |
parent | d8dbad0c3ec28f531bb057fea8b76e3faa235da6 (diff) | |
download | aur-959c61a77dd6a41bf82cc12b5eb873c9cfb0ffb8.tar.gz aur-959c61a77dd6a41bf82cc12b5eb873c9cfb0ffb8.tar.xz |
Add an accept button to the package request list
This button allows for accepting a request, disowning the affected
package or redirecting to the package deletion page. The request is
closed automatically when the action has been performed.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkgreq_results.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php index 213f1808..8ab8351f 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -44,6 +44,17 @@ <td<?php if (time() - intval($row['RequestTS']) > $REQUEST_IDLE_TIME): ?> class="flagged"<?php endif; ?>><?= gmdate("Y-m-d H:i", intval($row['RequestTS'])) ?></td> <?php if ($row['Status'] == 0): ?> <td> + <?php if ($row['BaseID']): ?> + <?php if ($row['Type'] == 'deletion'): ?> + <a href="<?= get_pkgbase_uri($row['Name']) ?>delete/?via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a> + <?php elseif ($row['Type'] == 'orphan'): ?> + <form action="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method="post"> + <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> + <input type="hidden" name="via" value="<?= intval($row['ID']) ?>" /> + <input type="submit" class="button text-button" name="do_Disown" value="<?= __('Accept') ?>" /> + </form> + <?php endif; ?> + <?php endif; ?> <form action="<?= get_uri('/pkgbase/'); ?>" method="post"> <fieldset> <input type="hidden" name="IDs[<?= $row['BaseID'] ?>]" value="1" /> |