moviewyrm/fedireads/templates/snippets/status.html

60 lines
2.6 KiB
HTML
Raw Normal View History

2020-03-15 21:15:36 +00:00
{% load humanize %}
{% load fr_display %}
<div class="post {{ status.status_type|lower }} depth-{{ depth }} {% if main %}main{% else %}reply{% endif %}">
2020-03-15 21:15:36 +00:00
<h2>
{% include 'snippets/avatar.html' with user=status.user %}
{% include 'snippets/username.html' with user=status.user %}
{% if status.status_type == 'Update' %}
{{ status.content | safe }}
{% elif status.status_type == 'Review' %}
reviewed {{ status.book.title }}
2020-03-21 23:50:49 +00:00
{% elif status.status_type == 'Comment' %}
commented on {{ status.book.title }}
2020-03-30 15:31:31 +00:00
{% elif status.status_type == 'Boost' %}
boosted
2020-03-15 21:15:36 +00:00
{% elif status.reply_parent %}
{% with parent_status=status|parent %}
replied to {% include 'snippets/username.html' with user=parent_status.user possessive=True %} <a href="{{parent_status.absolute_id }}">{{ parent_status.status_type|lower }}</a>
{% endwith %}
{% endif %}
<span class="time-ago">
<a href="{{ status.absolute_id }}">{{ status.published_date | naturaltime }}</a>
</span>
</h2>
{% if not hide_book and status.mention_books.count %}
{% for book in status.mention_books.all|slice:"0:3" %}
<div class="book-preview">
2020-03-15 21:15:36 +00:00
{% if status.status_type == 'Review' %}
{% include 'snippets/book.html' with book=book %}
2020-03-15 21:15:36 +00:00
{% else %}
{% include 'snippets/book.html' with book=book description=True %}
2020-03-15 21:15:36 +00:00
{% endif %}
</div>
{% endfor %}
{% endif %}
{% if not hide_book and status.book%}
<div class="book-preview">
2020-03-15 21:15:36 +00:00
{% if status.status_type == 'Review' %}
{% include 'snippets/book.html' with book=status.book %}
{% else %}
{% include 'snippets/book.html' with book=status.book description=True %}
{% endif %}
</div>
{% endif %}
{% if status.status_type == 'Review' %}<h4>{{ status.name }}
<small>{{ status.rating | stars }} stars, by {% include 'snippets/username.html' with user=status.user %}</small>
</h4>{% endif %}
2020-03-30 15:31:31 +00:00
{% if status.status_type != 'Update' and status.status_type != 'Boost' %}
2020-03-13 00:16:55 +00:00
<blockquote>{{ status.content | safe }}</blockquote>
2020-03-15 21:15:36 +00:00
{% endif %}
2020-03-30 15:31:31 +00:00
{% if status.status_type == 'Boost' %}
{% include 'snippets/status.html' with status=status.boosted_status depth=depth|add:1 %}
{% endif %}
2020-03-10 00:27:54 +00:00
{% if not max_depth and status.reply_parent or status|replies %}<p><a href="{{ status.absolute_id }}">Thread</a>{% endif %}
</div>
2020-03-30 15:31:31 +00:00
{% if status.status_type != 'Boost' %}
2020-03-15 21:15:36 +00:00
{% include 'snippets/interaction.html' with activity=status %}
2020-03-30 15:31:31 +00:00
{% endif %}