2020-12-13 02:25:04 +00:00
|
|
|
{% load bookwyrm_tags %}
|
2020-11-08 02:59:38 +00:00
|
|
|
{% load humanize %}
|
|
|
|
|
|
|
|
{% if not status.deleted %}
|
2021-01-07 04:05:28 +00:00
|
|
|
<article class="card">
|
2020-11-08 02:59:38 +00:00
|
|
|
<header class="card-header">
|
2021-01-07 03:52:47 +00:00
|
|
|
<div class="card-header-title has-background-white-ter">
|
2020-11-08 02:59:38 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column is-narrow">
|
|
|
|
{% include 'snippets/status_header.html' with status=status %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
2021-01-07 04:05:28 +00:00
|
|
|
<section class="card-content">
|
2020-11-08 02:59:38 +00:00
|
|
|
{% include 'snippets/status_content.html' with status=status %}
|
2021-01-07 04:05:28 +00:00
|
|
|
</section>
|
2020-11-08 02:59:38 +00:00
|
|
|
|
|
|
|
<footer>
|
2021-01-07 03:52:47 +00:00
|
|
|
<div class="card-footer has-background-white-bis">
|
2020-11-08 02:59:38 +00:00
|
|
|
<div class="card-footer-item">
|
|
|
|
{% if request.user.is_authenticated %}
|
2021-01-14 21:02:50 +00:00
|
|
|
{% include 'snippets/toggle/toggle_button.html' with controls_text="show-comment" controls_uid=status.id text="Reply" icon='comment' small=True %}
|
2020-11-08 02:59:38 +00:00
|
|
|
{% include 'snippets/boost_button.html' with status=status %}
|
|
|
|
{% include 'snippets/fav_button.html' with status=status %}
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
<a href="/login">
|
2021-01-14 22:13:23 +00:00
|
|
|
<span class="icon icon-comment" title="Reply">
|
2020-11-12 02:32:52 +00:00
|
|
|
<span class="is-sr-only">Reply</span>
|
|
|
|
</span>
|
2020-11-08 02:59:38 +00:00
|
|
|
|
2021-01-14 22:13:23 +00:00
|
|
|
<span class="icon icon-boost" title="Boost status">
|
2020-11-12 02:32:52 +00:00
|
|
|
<span class="is-sr-only">Boost status</span>
|
|
|
|
</span>
|
2020-11-08 02:59:38 +00:00
|
|
|
|
2021-01-14 22:13:23 +00:00
|
|
|
<span class="icon icon-heart" title="Like status">
|
2020-11-12 02:32:52 +00:00
|
|
|
<span class="is-sr-only">Like status</span>
|
|
|
|
</span>
|
2020-11-08 02:59:38 +00:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-footer-item">
|
2020-11-11 00:18:48 +00:00
|
|
|
{% include 'snippets/privacy-icons.html' with item=status %}
|
2020-11-08 02:59:38 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<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">
|
2021-01-14 21:02:50 +00:00
|
|
|
{% include 'snippets/toggle/toggle_button.html' with controls_text="more-info" controls_uid=status.id text="More options" icon="dots-three" small=True %}
|
2020-11-08 02:59:38 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2020-11-12 02:32:52 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
2021-01-14 21:02:50 +00:00
|
|
|
{% with status.id|uuid as uuid %}
|
|
|
|
<input class="toggle-control" type="checkbox" name="show-comment-{{ status.id }}" id="show-comment-{{ status.id }}" data-hover-target="id_content_{{ status.id }}-{{ uuid }}">
|
2020-11-12 02:32:52 +00:00
|
|
|
<div class="toggle-content hidden">
|
|
|
|
<div class="card-footer">
|
|
|
|
<div class="card-footer-item">
|
|
|
|
{% include 'snippets/reply_form.html' with status=status %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-14 21:02:50 +00:00
|
|
|
{% endwith %}
|
2020-11-12 02:32:52 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2020-11-11 19:52:14 +00:00
|
|
|
{% if status.user == request.user %}
|
2020-11-08 02:59:38 +00:00
|
|
|
<div>
|
|
|
|
<input class="toggle-control" type="checkbox" name="more-info-{{ status.id }}" id="more-info-{{ status.id }}">
|
|
|
|
<div class="toggle-content hidden card-footer">
|
|
|
|
{% if status.user == request.user %}
|
|
|
|
<div class="card-footer-item">
|
2020-11-11 05:39:24 +00:00
|
|
|
<form name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
|
2020-11-08 02:59:38 +00:00
|
|
|
{% csrf_token %}
|
2020-11-09 20:10:37 +00:00
|
|
|
<button class="button is-danger is-light" type="submit">
|
2020-11-08 02:59:38 +00:00
|
|
|
Delete post
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-11 19:52:14 +00:00
|
|
|
{% endif %}
|
2020-11-08 02:59:38 +00:00
|
|
|
</footer>
|
2021-01-07 04:05:28 +00:00
|
|
|
</article>
|
2020-11-08 02:59:38 +00:00
|
|
|
{% else %}
|
2021-01-07 04:05:28 +00:00
|
|
|
<article class="card">
|
2020-11-08 02:59:38 +00:00
|
|
|
<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>
|
2021-01-07 04:05:28 +00:00
|
|
|
</article>
|
2020-11-08 02:59:38 +00:00
|
|
|
{% endif %}
|