mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
With this change, we've decoupled some partials shared between `/pkgbase/{name}` and `/account/{username}/comments`. The comment actions template now resolves its package base via the `comment` instance instead of requiring `pkgbase`. We've also modified the existing package comment routes to support execution from any location using the `next` parameter. This allows us to reuse code from package comments for account comments actions. Moved the majority of comment editing javascript to its own .js file. Signed-off-by: Kevin Morris <kevr@0cost.org>
41 lines
1.1 KiB
HTML
41 lines
1.1 KiB
HTML
<!--
|
|
This partial requires the following to render properly
|
|
- pkgname
|
|
- pkgbase-id
|
|
- comments (list)
|
|
-->
|
|
|
|
{% if request.user.is_authenticated() %}
|
|
<div id="generic-form" class="box">
|
|
<h2>Add Comment</h2>
|
|
{% include "partials/packages/comment_form.html" %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% 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>
|
|
<span class="text">{{ "Latest Comments" | tr }}</span>
|
|
<span class="arrow"></span>
|
|
</h3>
|
|
</div>
|
|
{% for comment in comments.all() %}
|
|
{% include "partials/packages/comment.html" %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|