lib.itmens/catalog/templates/_item_reviews.html

49 lines
1.8 KiB
HTML
Raw Normal View History

{% load static %}
{% load i18n %}
{% load l10n %}
{% load mastodon %}
{% load duration %}
{% load user_actions %}
{% for review in reviews %}
{% if forloop.counter <= 10 %}
<section>
<span class="action">
{% if review.latest_post %}
{% include "action_reply_piece.html" with post=review.latest_post piece=review href=review.url %}
{% include "action_like_post.html" with post=review.latest_post %}
2023-12-29 16:03:31 -05:00
{% include "action_boost_post.html" with post=review.latest_post %}
{% include "action_open_post.html" with post=review.latest_post %}
{% endif %}
</span>
<span>
{% if review.rating_grade %}{{ review.rating_grade|rating_star }}{% endif %}
<a href="{{ review.owner.url }}"
class="nickname"
2024-02-25 23:04:50 -05:00
title="@{{ review.owner.handle }}">{{ review.owner.display_name }}</a>
2023-05-22 12:41:27 -04:00
</span>
<span class="action inline">
<span class="timestamp">{{ review.created_time|date }}</span>
2024-05-19 16:32:59 -04:00
<span class="timestamp">{% trans "review" %}</span>
</span>
{% if review.item != item %}
2024-07-13 01:36:18 -04:00
<a href="{{ review.item.url }}">{{ review.item.display_title }}</a><small class="title_deco">{{ comment.item.title_deco }}</small>
{% endif %}
2024-04-20 10:29:40 -04:00
<div class="tldr">
<span>
<a href="{% url 'journal:review_retrieve' review.uuid %}">{{ review.title }}</a>
</span>
-
2024-04-20 10:29:40 -04:00
{{ review.plain_content }}
</div>
</section>
{% else %}
<a hx-get="{% url 'catalog:reviews' review.item.url_path review.item.uuid %}?last={{ review.created_time|date:'Y-m-d H:i:s.uO'|urlencode }}"
hx-trigger="click"
hx-swap="outerHTML">
2024-05-19 16:32:59 -04:00
<button class="outline">{% trans "show more" %}</button>
</a>
{% endif %}
{% empty %}
2024-05-19 16:32:59 -04:00
<div class="empty">{% trans 'nothing more.' %}</div>
{% endfor %}