2020-09-29 04:08:42 +00:00
|
|
|
{% load humanize %}
|
2020-03-10 00:03:59 +00:00
|
|
|
{% load fr_display %}
|
2020-04-01 21:55:32 +00:00
|
|
|
|
2020-10-08 19:38:06 +00:00
|
|
|
{% if not status.deleted %}
|
2020-09-29 22:05:50 +00:00
|
|
|
<div class="card">
|
2020-09-29 04:08:42 +00:00
|
|
|
<header class="card-header">
|
2020-11-02 19:46:23 +00:00
|
|
|
<div class="card-header-title">
|
2020-11-06 20:09:14 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column is-narrow">
|
|
|
|
{% if status.status_type == 'Boost' %}
|
|
|
|
{% include 'snippets/avatar.html' with user=status.user %}
|
|
|
|
{% include 'snippets/username.html' with user=status.user %}
|
|
|
|
boosted
|
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
{% include 'snippets/status_header.html' with status=status|boosted_status %}
|
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/status_header.html' with status=status %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-05 16:21:00 +00:00
|
|
|
</div>
|
2020-09-29 01:25:05 +00:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<div class="card-content">
|
|
|
|
{% if status.status_type == 'Boost' %}
|
2020-11-02 19:46:23 +00:00
|
|
|
{% include 'snippets/status_content.html' with status=status|boosted_status %}
|
2020-09-29 01:25:05 +00:00
|
|
|
{% else %}
|
2020-04-02 02:38:07 +00:00
|
|
|
{% include 'snippets/status_content.html' with status=status %}
|
2020-09-29 01:25:05 +00:00
|
|
|
{% endif %}
|
2020-04-02 02:38:07 +00:00
|
|
|
</div>
|
2020-04-01 21:32:56 +00:00
|
|
|
|
2020-11-05 18:48:28 +00:00
|
|
|
<footer>
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<input class="toggle-control" type="checkbox" name="show-comment-{{ status.id }}" id="show-comment-{{ status.id }}">
|
|
|
|
<div class="toggle-content hidden">
|
|
|
|
<div class="card-footer">
|
|
|
|
<div class="card-footer-item">
|
|
|
|
{% if status.status_type == 'Boost' %}
|
|
|
|
{% include 'snippets/reply_form.html' with status=status|boosted_status %}
|
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/reply_form.html' with status=status %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-29 01:25:05 +00:00
|
|
|
{% endif %}
|
2020-11-05 18:48:28 +00:00
|
|
|
<div class="card-footer">
|
|
|
|
<div class="card-footer-item">
|
|
|
|
{% if request.user.is_authenticated %}
|
2020-09-29 04:08:42 +00:00
|
|
|
|
2020-11-05 19:40:03 +00:00
|
|
|
<label class="button is-small" for="show-comment-{{ status.id }}">
|
|
|
|
<span class="icon icon-comment"><span class="is-sr-only">Comment</span></span>
|
2020-11-05 18:48:28 +00:00
|
|
|
</label>
|
|
|
|
{% if status.status_type == 'Boost' %}
|
|
|
|
{% include 'snippets/boost_button.html' with status=status|boosted_status %}
|
|
|
|
{% include 'snippets/fav_button.html' with status=status|boosted_status %}
|
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/boost_button.html' with status=status %}
|
|
|
|
{% include 'snippets/fav_button.html' with status=status %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
<a href="/login">
|
|
|
|
<span class="icon icon-comment">
|
|
|
|
<span class="is-sr-only">Comment</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="icon icon-boost">
|
|
|
|
<span class="is-sr-only">Boost status</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="icon icon-heart">
|
|
|
|
<span class="is-sr-only">Like status</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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 %}
|
2020-11-05 19:40:03 +00:00
|
|
|
</div>
|
2020-11-05 18:48:28 +00:00
|
|
|
|
2020-11-05 19:40:03 +00:00
|
|
|
<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">
|
2020-11-05 18:48:28 +00:00
|
|
|
<label class="button" for="more-info-{{ status.id }}">
|
|
|
|
<div class="icon icon-dots-three">
|
|
|
|
<span class="is-sr-only">More options</span>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-11-05 19:40:03 +00:00
|
|
|
{% endif %}
|
2020-11-05 18:48:28 +00:00
|
|
|
</div>
|
|
|
|
|
2020-11-05 19:40:03 +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">
|
|
|
|
<form name="delete-{{status.id}}" action="/delete-status" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="status" value="{{ status.id }}">
|
2020-11-06 22:01:43 +00:00
|
|
|
<button class="button is-danger" type="submit">
|
2020-11-05 19:40:03 +00:00
|
|
|
Delete post
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-11-05 18:48:28 +00:00
|
|
|
</div>
|
2020-09-29 04:08:42 +00:00
|
|
|
</div>
|
2020-09-29 01:25:05 +00:00
|
|
|
</footer>
|
2020-03-10 00:03:59 +00:00
|
|
|
</div>
|
2020-10-08 19:38:06 +00:00
|
|
|
{% 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 %}
|