1
0
Fork 0

Merge pull request #239 from mouse-reeve/deletion

Deletion
This commit is contained in:
Mouse Reeve 2020-10-16 17:03:34 -07:00 committed by GitHub
commit 1672c699e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 155 additions and 5 deletions

View file

@ -1,6 +1,7 @@
{% load humanize %}
{% load fr_display %}
{% if not status.deleted %}
<div class="card">
<header class="card-header">
{% include 'snippets/status_header.html' with status=status %}
@ -25,7 +26,29 @@
<span class="icon icon-public">
<span class="is-sr-only">Public post</span>
</span>
{% if status.user == request.user %}
<form name="delete-{{status.id}}" action="/delete-status" method="post">
{% csrf_token %}
<input type="hidden" name="status" value="{{ status.id }}">
<button type="submit">
<span class="icon icon-cancel">
<span class="is-sr-only">Delete post</span>
</span>
</button>
</form>
{% endif %}
<a href="{{ status.remote_id }}">{{ status.published_date | naturaltime }}</a>
</div>
</footer>
</div>
{% else %}
<div class="card">
<header class="card-header">
<p>
{% include 'snippets/avatar.html' with user=status.user %}
{% include 'snippets/username.html' with user=status.user %}
deleted this status
</p>
</header>
</div>
{% endif %}