summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-06-25 10:43:41 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-06-25 11:36:15 +0200
commit959c61a77dd6a41bf82cc12b5eb873c9cfb0ffb8 (patch)
tree3c72832cba6fa9c1d715895f375a9645fc54b183 /web/template
parentd8dbad0c3ec28f531bb057fea8b76e3faa235da6 (diff)
downloadaurweb-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.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index 213f180..8ab8351 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" />