Commit 8732babf authored by Evert Prants's avatar Evert Prants

Final discussion boards fixes

parent e59c0353
......@@ -53,14 +53,15 @@
<div class="user-content mb-auto">{{reply.body|markdown|safe}}</div>
<div class="actions d-flex flex-row-reverse">
{% if user.is_authenticated %}
{% if "can_moderate_board" in show_perms or board.user == user %}
{% if "can_moderate_board" in show_perms %}
<a href="{{show.url}}/discuss/board/delete/reply/{{reply.id}}" class="btn btn-warning ml-1">Delete Content</a>
<a href="{{show.url}}/create_ban?user={{reply.user.username}}" class="btn btn-warning ml-1">Ban</a>
{% else %}
{% elif not user == reply.user %}
<a href="{{show.url}}/discuss/board/report/{{reply.id}}" class="btn btn-secondary ml-1" title="Report" aria-label="Report"><i class="fa fa-fw fa-flag"></i></a>
{% endif %}
{% endif %}
<div class="vote-btns">
{% if not board.locked %}
<form method="POST" class="d-inline" action="{{show.url}}/discuss/vote/{{reply.id}}/1">
{% csrf_token %}
<button href="#" class="btn btn-link text-success">
......@@ -73,6 +74,14 @@
<i class="fa fa-fw fa-thumbs-down"></i>&nbsp;{{reply.negatives}}
</button>
</form>
{% else %}
<a href="#" class="btn btn-link disabled text-success">
<i class="fa fa-fw fa-thumbs-up"></i>&nbsp;{{reply.positives}}
</a>
<a href="#" class="btn btn-link disabled text-danger">
<i class="fa fa-fw fa-thumbs-down"></i>&nbsp;{{reply.negatives}}
</a>
{% endif %}
</div>
<!--<a href="#" class="btn btn-secondary mr-1">Quote</a>-->
</div>
......
......@@ -140,8 +140,7 @@ def BoardForm(req, abbr):
# Request context
ctx = {
'form': form,
'show': show,
'showurl': get_show_url(abbr)
'show': show
}
# Get bans for this user regarding this show
......
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