SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 50e083be authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Solve bug in templates: comment form now appearing

parent 1c95b453
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,20 @@
{% include 'scipost/comments_block.html' %}
{% if user.is_authenticated and commentary.open_for_commenting and user.contributor.rank > 0 %}
<section>
<hr class="hr12">
<div class="flex-greybox">
<h1>Contribute a Comment:</h1>
</div>
<form action="{% url 'commentaries:commentary' commentary.id %}" method="post">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
</form>
</section>
{% endif %}
{% endif %} <!-- Temporary strip -->
{% endblock bodysup %}
......@@ -16,7 +16,8 @@
{{ comment.print_identifier|safe }}
{{ comment.categories_as_ul|safe }}
<div class="opinionsDisplay">
{% if user.is_authenticated and user.contributor.rank > 0 and user.contributor != comment.author %}
{% if user.is_authenticated and user.contributor.rank > 0 %}
{% if user.contributor != comment.author %}
<form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='A' %}" method="post">
{% csrf_token %}
<input type="submit" class="agree" value="Agree {{ comment.nr_A }} "/>
......@@ -29,6 +30,9 @@
{% csrf_token %}
<input type="submit" class="disagree" value="Disagree {{ comment.nr_D }}"/>
</form>
{% else %}
{{ comment.opinions_as_ul|safe }}
{% endif %}
{% endif %}
</div>
</div>
......@@ -81,18 +85,3 @@
</div id="commentslist">
</section>
{% endif %}
{% if user.is_authenticated and commentary.open_for_commenting and user.contributor.rank > 0 %}
<section>
<hr class="hr12">
<div class="flex-greybox">
<h1>Contribute a Comment:</h1>
</div>
<form action="{% url 'commentaries:commentary' commentary.id %}" method="post">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
</form>
</section>
{% endif %}
......@@ -138,6 +138,20 @@
{% include 'scipost/comments_block.html' %}
{% if user.is_authenticated and submission.open_for_commenting and user.contributor.rank > 0 %}
<section>
<hr class="hr12">
<div class="flex-greybox">
<h1>Contribute a Comment:</h1>
</div>
<form action="{% url 'submissions:submission' submission.id %}" method="post">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
</form>
</section>
{% endif %}
{% endif %} <!-- Temporary strip -->
{% endblock bodysup %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment