summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-06-25 09:29:07 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-06-25 11:34:31 +0200
commitfc1db28c9b1b13c5b9e6baf6d24963081f18f017 (patch)
treed4adc2a358772396febfbc3a9f7c7e8a25536d20 /web/html
parent8260111bcce49b73bd4973ae80296c913af2631d (diff)
downloadaur-fc1db28c9b1b13c5b9e6baf6d24963081f18f017.tar.gz
aur-fc1db28c9b1b13c5b9e6baf6d24963081f18f017.tar.xz
Allow for closing package requests
This allows Trusted Users to close package requests via the request list. Also, entries are now sorted such that open requests are shown before closed requests. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/css/aur.css30
-rw-r--r--web/html/pkgbase.php8
2 files changed, 23 insertions, 15 deletions
diff --git a/web/html/css/aur.css b/web/html/css/aur.css
index 78fd4ce8..cbebb306 100644
--- a/web/html/css/aur.css
+++ b/web/html/css/aur.css
@@ -24,20 +24,6 @@
padding: 0;
}
-#actionlist .text-button {
- color: #07b;
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
- font-size: 100%;
-}
-
-#actionlist .text-button:hover {
- text-decoration: underline;
- color: #666;
-}
-
.arch-bio-entry ul {
list-style: none;
padding: 0;
@@ -61,3 +47,19 @@
#pkg-updates td.pkg-date {
text-align:right;
}
+
+.text-button {
+ background: transparent;
+ border: none !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ font: normal 100% sans-serif;
+ text-decoration: none;
+ color: #07b;
+ cursor: pointer;
+}
+
+.text-button:hover {
+ text-decoration: underline;
+ color: #666;
+}
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index dd099774..9047f5b8 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -96,6 +96,8 @@ if (check_token()) {
list($ret, $output) = pkgbase_change_category($base_id, $atype);
} elseif (current_action("do_FileRequest")) {
list($ret, $output) = pkgbase_file_request($ids, $_POST['type'], $_POST['comments']);
+ } elseif (current_action("do_CloseRequest")) {
+ list($ret, $output) = pkgbase_close_request($_POST['reqid']);
}
if (isset($_REQUEST['comment'])) {
@@ -105,7 +107,11 @@ if (check_token()) {
}
if ($ret) {
- if (isset($base_id)) {
+ if (current_action("do_CloseRequest")) {
+ /* Redirect back to package request page on success. */
+ header('Location: ' . get_pkgreq_route());
+ exit();
+ } if (isset($base_id)) {
/* Redirect back to package base page on success. */
header('Location: ' . get_pkgbase_uri($pkgbase_name));
exit();