From 7d4c0c9ffa55ca60aea24b6aa64417783a15ea80 Mon Sep 17 00:00:00 2001 From: Mark Weiman Date: Fri, 11 Dec 2015 19:01:31 -0500 Subject: Implement capability to pin comments above others Adds capability to pin comments before others. Implements FS#10863. Signed-off-by: Mark Weiman Signed-off-by: Lukas Fleischer --- web/html/css/aurweb.css | 6 +++--- web/html/images/pin.min.svg | 1 + web/html/images/pin.svg | 3 +++ web/html/images/unpin.min.svg | 1 + web/html/images/unpin.svg | 4 ++++ web/html/index.php | 2 ++ web/html/pkgbase.php | 4 ++++ 7 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 web/html/images/pin.min.svg create mode 100644 web/html/images/pin.svg create mode 100644 web/html/images/unpin.min.svg create mode 100644 web/html/images/unpin.svg (limited to 'web/html') diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index 11af7471..82b83d9e 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -101,7 +101,7 @@ color: #999; } -.delete-comment-form, .edit-comment { +.delete-comment-form, .pin-comment-form, .edit-comment { float: right; margin-left: 8px; } @@ -112,13 +112,13 @@ top: 1px; } -.delete-comment, .edit-comment { +.delete-comment, .edit-comment, .pin-comment { -webkit-filter: grayscale(100%); filter: grayscale(100%); opacity: 0.6; } -.delete-comment:hover, .edit-comment:hover { +.delete-comment:hover, .edit-comment:hover, .pin-comment:hover { -webkit-filter: none; filter: none; opacity: 1; diff --git a/web/html/images/pin.min.svg b/web/html/images/pin.min.svg new file mode 100644 index 00000000..ac08903d --- /dev/null +++ b/web/html/images/pin.min.svg @@ -0,0 +1 @@ + diff --git a/web/html/images/pin.svg b/web/html/images/pin.svg new file mode 100644 index 00000000..b4ee9eb7 --- /dev/null +++ b/web/html/images/pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/html/images/unpin.min.svg b/web/html/images/unpin.min.svg new file mode 100644 index 00000000..3cf2413c --- /dev/null +++ b/web/html/images/unpin.min.svg @@ -0,0 +1 @@ + diff --git a/web/html/images/unpin.svg b/web/html/images/unpin.svg new file mode 100644 index 00000000..de897152 --- /dev/null +++ b/web/html/images/unpin.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/html/index.php b/web/html/index.php index ec99bb72..e99d22f8 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -182,6 +182,8 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { break; case "/images/x.min.svg": case "/images/pencil.min.svg": + case "/images/pin.min.svg": + case "/images/unpin.min.svg": header("Content-Type: image/svg+xml"); readfile("./$path"); break; diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index cbbf3cc4..45b8084b 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -99,6 +99,10 @@ if (check_token()) { list($ret, $output) = pkgbase_notify($ids, false); } elseif (current_action("do_DeleteComment")) { list($ret, $output) = pkgbase_delete_comment(); + } elseif (current_action("do_PinComment")) { + list($ret, $output) = pkgbase_pin_comment(); + } elseif (current_action("do_UnpinComment")) { + list($ret, $output) = pkgbase_pin_comment(true); } elseif (current_action("do_SetKeywords")) { list($ret, $output) = pkgbase_set_keywords($base_id, preg_split("/[\s,;]+/", $_POST['keywords'], -1, PREG_SPLIT_NO_EMPTY)); } elseif (current_action("do_FileRequest")) { -- cgit v1.2.3-24-g4f1b