feat(FastAPI): add /pkgbase/{name}/comments/{id}/pin (post)

In addition, fix up some templates to display pinned comments,
and include the unpin form input for pinned comments, which is
not yet implemented.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-01 15:47:16 -07:00
parent bb45ae7ac3
commit 0895dd07ee
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
5 changed files with 100 additions and 14 deletions

View file

@ -12,7 +12,21 @@
</div>
{% endif %}
{% if comments %}
{% if pinned_comments.count() %}
<div class="comments package-comments">
<div class="comments-header">
<h3>
<span class="text">{{ "Pinned Comments" | tr }}</span>
<span class="arrow"></span>
</h3>
</div>
{% for comment in pinned_comments.all() %}
{% include "partials/packages/comment.html" %}
{% endfor %}
</div>
{% endif %}
{% if comments.count() %}
<div class="comments package-comments">
<div class="comments-header">
<h3>