Commit 9bae6017 authored by okhin's avatar okhin 🚴

Adds votes, reject, publish and unpublish buttons on article details

parent 43cf545d
Pipeline #2658 passed with stages
in 3 minutes and 45 seconds
......@@ -28,9 +28,17 @@
<span class="btn-group" role="group" aria-label="Actions">
{% if object.status == 'PUBLISHED' %}
<a class="btn btn-outline-danger" href="{% url 'rp:article-edit' object.id %}">Edit</a>
{% if perms.rp.can_change_status %}
<a class="btn btn-outline-default" href="{% url 'api:article-unpublish' object.id %}">UnPublish</a>
<a class="btn btn-outline-danger" href="{% url 'api:article-reject' object.id %}">Reject</a>
{% endif %}
{% else %}
<a class="btn btn-outline-primary" href="{% url 'rp:article-edit' object.id %}">Edit</a>
<a class="btn btn-outline-warning" href="#">Publish</a>
{% if perms.rp.can_change_status %}
<a class="btn btn-outline-warning" href="{% url 'api:article-publish' object.id %}">Publish</a>
<a class="btn btn-outline-danger" href="{% url 'api:article-reject' object.id %}">Reject</a>
<a class="btn btn-outline-default" href="{% url 'api:article-recover' object.id %}">Recover</a>
{% endif %}
{% endif %}
</span>
</div>
......@@ -65,6 +73,12 @@
<a target="mailto:{{ article.created_by.user.email }}"><span class="glyphicon glyphicon-envelope" aria-label="{{ _("Contact this user by email")}}"></span>
</p>
<p>{{object.extracts |markdown}}</p>
{% if perms.rp.can_vote %}
<span>
<a href="{% url 'api:upvote' object.id %}" class="btn btn-outline-default">+1</a>
<a href="{% url 'api:downvote' object.id %}" class="btn btn-outline-default">-1</a>
</span>
{% endif %}
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment