moviewyrm/bookwyrm/templates/snippets/status.html
2020-10-08 12:32:45 -07:00

42 lines
1.5 KiB
HTML

{% load humanize %}
{% load fr_display %}
<div class="card">
<header class="card-header">
{% include 'snippets/status_header.html' with status=status %}
</header>
<div class="card-content">
{% if status.status_type == 'Boost' %}
{% include 'snippets/status_content.html' with status=status.boosted_status %}
{% else %}
{% include 'snippets/status_content.html' with status=status %}
{% endif %}
</div>
<footer class="card-footer">
{% if status.status_type == 'Boost' %}
{% include 'snippets/interaction.html' with activity=status.boosted_status %}
{% else %}
{% include 'snippets/interaction.html' with activity=status %}
{% endif %}
<div class="card-footer-item">
<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>