mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Implement capability to pin comments above others
Adds capability to pin comments before others. Implements FS#10863. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
3088fd0f38
commit
7d4c0c9ffa
13 changed files with 187 additions and 14 deletions
|
@ -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;
|
||||
|
|
1
web/html/images/pin.min.svg
Normal file
1
web/html/images/pin.min.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><path style="fill:#3366aa;fill-opacity:1" d="M1.34 0a.5.5 0 0 0 .16 1h.5v2h-1c-.55 0-1 .45-1 1h3v3l.44 1 .56-1v-3h3c0-.55-.45-1-1-1h-1v-2h.5a.5.5 0 1 0 0-1h-4a.5.5 0 0 0-.09 0 .5.5 0 0 0-.06 0z" /></svg>
|
After Width: | Height: | Size: 283 B |
3
web/html/images/pin.svg
Normal file
3
web/html/images/pin.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
||||
<path style="fill:#3366aa;fill-opacity:1" d="M1.34 0a.5.5 0 0 0 .16 1h.5v2h-1c-.55 0-1 .45-1 1h3v3l.44 1 .56-1v-3h3c0-.55-.45-1-1-1h-1v-2h.5a.5.5 0 1 0 0-1h-4a.5.5 0 0 0-.09 0 .5.5 0 0 0-.06 0z" />
|
||||
</svg>
|
After Width: | Height: | Size: 287 B |
1
web/html/images/unpin.min.svg
Normal file
1
web/html/images/unpin.min.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><path style="fill:#3366aa;fill-opacity:1" d="M1.34 0a.5.5 0 0 0 .16 1h.5v2h-1c-.55 0-1 .45-1 1h3v3l.44 1 .56-1v-3h3c0-.55-.45-1-1-1h-1v-2h.5a.5.5 0 1 0 0-1h-4a.5.5 0 0 0-.09 0 .5.5 0 0 0-.06 0z" /><path style="fill:#3366aa;fill-opacity:1" d="m6.4 0l1 1-6.4 6.8-1-1z" /></svg>
|
After Width: | Height: | Size: 355 B |
4
web/html/images/unpin.svg
Normal file
4
web/html/images/unpin.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
||||
<path style="fill:#3366aa;fill-opacity:1" d="M1.34 0a.5.5 0 0 0 .16 1h.5v2h-1c-.55 0-1 .45-1 1h3v3l.44 1 .56-1v-3h3c0-.55-.45-1-1-1h-1v-2h.5a.5.5 0 1 0 0-1h-4a.5.5 0 0 0-.09 0 .5.5 0 0 0-.06 0z" />
|
||||
<path style="fill:#3366aa;fill-opacity:1" d="m6.4 0l1 1 -6.4 6.8 -1 -1z" />
|
||||
</svg>
|
After Width: | Height: | Size: 365 B |
|
@ -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;
|
||||
|
|
|
@ -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")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue