From e9fe1a9eb100b11fda80f05b5b3239ee97e3a905 Mon Sep 17 00:00:00 2001 From: Mark Weiman Date: Mon, 14 Dec 2015 16:18:16 -0500 Subject: Add link to flag OOD comment Implements: FS#46546 Signed-off-by: Mark Weiman Signed-off-by: Lukas Fleischer --- web/html/css/aurweb.css | 4 ++++ web/html/index.php | 3 +++ web/html/pkgflagcomment.php | 19 +++++++++++++++++++ web/lib/pkgbasefuncs.inc.php | 32 ++++++++++++++++++++++++++++++++ web/template/flag_comment.php | 25 +++++++++++++++++++++++++ web/template/pkgbase_actions.php | 2 +- 6 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 web/html/pkgflagcomment.php create mode 100644 web/template/flag_comment.php diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index 82b83d9e..92ff8989 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -130,6 +130,10 @@ top: 4px; } +.flagged a { + color: inherit; +} + legend { padding: 1em 0; } diff --git a/web/html/index.php b/web/html/index.php index 8b5cb621..0a9fd05d 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -73,6 +73,9 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { case "unflag": $_POST['do_UnFlag'] = __('UnFlag'); break; + case "flag-comment": + include('pkgflagcomment.php'); + return; case "delete": include('pkgdel.php'); return; diff --git a/web/html/pkgflagcomment.php b/web/html/pkgflagcomment.php new file mode 100644 index 00000000..98680ef6 --- /dev/null +++ b/web/html/pkgflagcomment.php @@ -0,0 +1,19 @@ +query($q); + + $row = array(); + + if (!$result) { + $row['error'] = __("Error retrieving package details."); + } + else { + $row = $result->fetch(PDO::FETCH_ASSOC); + if (empty($row)) { + $row['error'] = __("Package details could not be found."); + } + } + + return $row; +} + /** * Delete package bases * diff --git a/web/template/flag_comment.php b/web/template/flag_comment.php new file mode 100644 index 00000000..36af43ea --- /dev/null +++ b/web/template/flag_comment.php @@ -0,0 +1,25 @@ +
+

+

+ + ', html_format_username($message['Username']), '', + '', htmlspecialchars($pkgbase_name), '', + '', gmdate('Y-m-d', $message['OutOfDateTS']), ''); ?> + + ', htmlspecialchars($pkgbase_name), ''); ?> + +

+

+

+

+
+

+

+

+ " /> +
+

+
+ diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index f8968fb2..85b1c3b7 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -8,7 +8,7 @@
  • -
  • +
  • -- cgit v1.2.3-24-g4f1b