moviewyrm/bookwyrm/templates/snippets/status.html
2020-10-28 12:44:30 -07:00

68 lines
2.4 KiB
HTML

{% load humanize %}
{% load fr_display %}
{% if not status.deleted %}
<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">
{% if status.privacy == 'public' %}
<span class="icon icon-globe">
<span class="is-sr-only">Public post</span>
</span>
{% elif status.privacy == 'unlisted' %}
<span class="icon icon-unlock">
<span class="is-sr-only">Unlisted post</span>
</span>
{% elif status.privacy == 'followers' %}
<span class="icon icon-lock">
<span class="is-sr-only">Followers-only post</span>
</span>
{% else %}
<span class="icon icon-envelope">
<span class="is-sr-only">Private post</span>
</span>
{% endif %}
{% 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-x">
<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 %}