lib.itmens/catalog/templates/item_review_list.html

67 lines
2.5 KiB
HTML

{% load static %}
{% load i18n %}
{% load admin_url %}
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load highlight %}
{% load thumb %}
{% load user_actions %}
{% load duration %}
<!DOCTYPE html>
<html lang="zh" class="content-page">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site_name }} - {{ item.title }}{% trans '的评论' %}</title>
{% include "common_libs.html" with jquery=0 v2=1 %}
</head>
<body>
{% include '_header.html' %}
<main>
<div class="grid__main">
<h5>
<a href="{% url 'catalog:mark_list' item.url_path item.uuid %}">{% trans '全部标记' %}</a>
| <a href="{% url 'catalog:mark_list' item.url_path item.uuid 'following' %}">{% trans '好友标记' %}</a>
| {% trans '全部评论' %}
</h5>
{% for review in reviews %}
<section>
<div class="action">
<span>
<a target="_blank"
rel="noopener"
{% if review.metadata.shared_link %} href="{{ review.metadata.shared_link }}" title="打开联邦网络分享链接" {% else %} class="disabled" {% endif %}><i class="fa-solid {% if review.visibility > 0 %} fa-lock {% else %} fa-globe {% endif %}"></i></a>
</span>
<span>
{% liked_piece review as liked %}
{% include 'like_stats.html' with liked=liked piece=review %}
</span>
<span class="timestamp">{{ review.created_time|date }}</span>
</div>
<div>
{% if review.rating_grade %}{{ review.rating_grade|rating_star }}{% endif %}
<span>
<a href="{% url 'journal:review_retrieve' review.uuid %}">{{ review.title }}</a>
</span>
-
<span>
<a href="{% url 'journal:user_profile' review.owner.mastodon_username %}"
class="nickname"
title="@{{ review.owner.mastodon_username }}">{{ review.owner.display_name }}</a>
</span>
</div>
<div>{{ review.plain_content | truncate:200 }}</div>
</section>
{% empty %}
<div>{% trans '暂无评论' %}</div>
{% endfor %}
{% include "_pagination.html" %}
</div>
<aside class="grid__aside top">
{% include "_sidebar_item.html" %}
</aside>
</main>
{% include "_footer.html" %}
</body>
</html>