bookwyrm/fedireads/templates/snippets/status.html

44 lines
1.7 KiB
HTML
Raw Normal View History

2020-02-20 02:04:04 +00:00
{% load fr_display %}
<div class="update">
{% if activity.status_type == 'Review' %}
2020-02-20 02:41:37 +00:00
{% include 'snippets/status_banner.html' with content="reviewed <i>"|add:activity.book.data.title|add:"</i>" %}
2020-02-20 02:04:04 +00:00
<div class="book-preview review">
{% include 'snippets/book.html' with book=activity.book size=large %}
<h3>{{ activity.name }}</h3>
<p>{{ activity.rating | stars }}</p>
<p>{{ activity.content | safe }}</p>
</div>
<div class="interaction">
{% if activity.favorites.all %}
<span>
{{ activity.favorites.count }} like(s)
</span>
{% endif %}
<form name="favorite" action="/favorite/{{ activity.id }}" method="post">
{% csrf_token %}
<button>⭐️ Like</button>
</form>
<form name="comment" action="/comment" method="post">
{% csrf_token %}
<input type="hidden" name="review" value="{{ activity.id }}"></input>
{{ comment_form.content }}
<button type="submit">Comment</button>
</form>
</div>
{% elif activity.status_type == 'Note' %}
2020-02-20 02:41:37 +00:00
{% include 'snippets/status_banner.html' %}
<span>{{ activity.content | safe }}</span>
2020-02-20 02:04:04 +00:00
{% for book in activity.mention_books.all %}
<div class="book-preview review">
{% include 'snippets/book.html' with book=book size=large description=True %}
</div>
{% endfor %}
{% else %}
{# generic handling for a misc activity, which perhaps should not be displayed at all #}
did {{ activity.activity_type }}
</h2>
{% endif %}
</div>