mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
other pages like the "package search" have this as well. Issue report: #390 Signed-off-by: moson-mo <mo-son@mailbox.org>
56 lines
1.6 KiB
HTML
56 lines
1.6 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>
|
|
{% set page = ((O / PP) | int) %}
|
|
{% set pages = ((comments_total / PP) | ceil) %}
|
|
|
|
{% if pages > 1 %}
|
|
<p class="comments-header-nav">
|
|
{{ page | pager_nav(comments_total, prefix) | safe }}
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% for comment in comments.all() %}
|
|
{% include "partials/packages/comment.html" %}
|
|
{% endfor %}
|
|
<div class="comments-footer">
|
|
{% if pages > 1 %}
|
|
<p class="comments-footer-nav">
|
|
{{ page | pager_nav(comments_total, prefix) | safe }}
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|