2022-11-19 23:30:07 +00:00
|
|
|
{% set can_comment = request.user.is_authenticated and comment_form and not comment_lock %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<div id="comments" class="comment-area">
|
2023-01-27 23:11:10 +00:00
|
|
|
<h2 id="comment-header">
|
|
|
|
<i style="padding-right: 0.3em" class="fa fa-comments"></i>{{ _('Comments') }}
|
2022-11-19 23:30:07 +00:00
|
|
|
{% if can_comment %}
|
2023-01-27 23:11:10 +00:00
|
|
|
<a href="" id="write-comment" style="float: right; font-size: 0.6em; margin-right: -26px;"> {{ _('Write comment') }} </a>
|
2022-11-19 16:02:45 +00:00
|
|
|
{% endif %}
|
2023-01-27 23:11:10 +00:00
|
|
|
</h2>
|
|
|
|
{% if can_comment %}
|
|
|
|
<div id="new-comment" class="form-area comment-submit" style="display: none;" >
|
|
|
|
{% block comment_submit_title %}
|
|
|
|
<h3>{{ _('New comment') }}</h3>
|
|
|
|
<hr>
|
|
|
|
{% endblock %}
|
|
|
|
{% if is_new_user %}
|
|
|
|
<div style="margin-bottom: 0" class="alert alert-info">
|
|
|
|
{{ _('You need to have solved at least one problem before your voice can be heard.') }}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<form class="comment-submit-form" action="" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
{% if comment_form.errors %}
|
|
|
|
<div id="form-errors">
|
|
|
|
{{ comment_form.non_field_errors() }}
|
|
|
|
{{ comment_form.parent.errors }}
|
|
|
|
{% if comment_form.body.errors %}{{ _('Invalid comment body.') }}{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{{ comment_form.parent }}
|
|
|
|
<div class="comment-post-wrapper">
|
|
|
|
<div id="comment-form-body">{{ comment_form.body }}</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<input style="float:right" type="submit" value="{{ _('Post!') }}" class="button">
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-05-22 16:11:40 +00:00
|
|
|
{% if has_comments %}
|
2023-05-22 13:52:18 +00:00
|
|
|
<ul class="comments top-level-comments new-comments" id="comment-0">
|
|
|
|
{% include "comments/content-list.html" %}
|
2023-01-27 23:11:10 +00:00
|
|
|
</ul>
|
|
|
|
{% elif not comment_lock %}
|
|
|
|
<p class="no-comments-message">{{ _('There are no comments at the moment.') }}</p>
|
|
|
|
{% endif %}
|
2020-01-21 06:35:58 +00:00
|
|
|
|
2023-01-27 23:11:10 +00:00
|
|
|
{% if comment_lock %}
|
|
|
|
<div class="alert alert-warning comment-lock">
|
|
|
|
{{ _('Comments are disabled on this page.') }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-01-21 06:35:58 +00:00
|
|
|
</div>
|