mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: allow co-maintainers to [un]pin comments on a package
Closes #279 Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
35e7486ea3
commit
708ade4dbf
6 changed files with 47 additions and 8 deletions
|
@ -47,13 +47,13 @@
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.has_credential(creds.COMMENT_PIN, approved=[comment.PackageBase.Maintainer]) %}
|
||||
{% if request.user.has_credential(creds.COMMENT_PIN, approved=comment.maintainers()) %}
|
||||
{% if comment.PinnedTS %}
|
||||
<form class="pin-comment-form"
|
||||
method="post"
|
||||
action="/pkgbase/{{ comment.PackageBase.Name }}/comments/{{ comment.ID }}/unpin"
|
||||
>
|
||||
<fieldset style="display:inline;">
|
||||
<fieldset style="display: inline;">
|
||||
<input type="hidden" name="next" value="{{ request.url.path }}" />
|
||||
<input type="image"
|
||||
class="pin-comment"
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
</a>
|
||||
{% set len = comaintainers | length %}
|
||||
{% if comaintainers %}
|
||||
({% for co in comaintainers %}<a href="{{ co.User | account_url }}">{{ co.User }}</a>{% if loop.index < len %}, {% endif %}{% endfor %})
|
||||
({% for co in comaintainers %}<a href="{{ co | account_url }}">{{ co }}</a>{% if loop.index < len %}, {% endif %}{% endfor %})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ pkgbase.Maintainer.Username | default("None" | tr) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue