Adds block option to status menu

This commit is contained in:
Mouse Reeve 2021-01-21 16:43:40 -08:00
parent 7ed63bacc9
commit 54f8a65ae2
2 changed files with 12 additions and 2 deletions

View file

@ -54,11 +54,9 @@
<div class="card-footer-item">
<a href="{{ status.remote_id }}">{{ status.published_date | post_date }}</a>
</div>
{% if status.user == request.user %}
<div class="card-footer-item">
{% include 'snippets/status_options.html' with class="is-small" right=True %}
</div>
{% endif %}
{% endblock %}

View file

@ -1,4 +1,5 @@
{% extends 'snippets/components/dropdown.html' %}
{% load bookwyrm_tags %}
{% block dropdown-trigger %}
<span class="icon icon-dots-three">
@ -7,6 +8,7 @@
{% endblock %}
{% block dropdown-list %}
{% if status.user == request.user %}
<li role="menuitem">
<form class="dropdown-item pt-0 pb-0" name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
{% csrf_token %}
@ -15,4 +17,14 @@
</button>
</form>
</li>
<li><hr class="navbar-divider"></li>
{% endif %}
<li role="menuitem">
<form class="dropdown-item pt-0 pb-0" name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
{% csrf_token %}
<button class="button is-danger is-light is-fullwidth is-small" type="submit">
Block @{{ status.user|username }}
</button>
</form>
</li>
{% endblock %}