lib.itmens/catalog/templates/item_mark_list.html
2023-10-22 17:46:34 -04:00

70 lines
2.8 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>
{% if followeing_only %}
<a href="{% url 'catalog:mark_list' item.url_path item.uuid %}">{% trans '全部标记' %}</a>
| {% trans '好友标记' %}
{% else %}
{% trans '全部标记' %}
| <a href="{% url 'catalog:mark_list' item.url_path item.uuid 'following' %}">{% trans '好友标记' %}</a>
{% endif %}
| <a href="{% url 'catalog:review_list' item.url_path item.uuid %}">{% trans '全部评论' %}</a>
</h5>
{% for member in marks %}
{% with member.mark as mark %}
<section>
<div class="action">
{% if mark.comment %}
<span>
{% liked_piece mark.comment as liked %}
{% include 'like_stats.html' with liked=liked piece=mark.comment %}
</span>
{% endif %}
<span>
<a target="_blank"
rel="noopener"
{% if mark.shared_link %} href="{{ mark.shared_link }}" title="打开联邦宇宙分享链接" {% else %} class="disabled" {% endif %}><i class="fa-solid {% if mark.visibility > 0 %} fa-lock {% else %} fa-globe {% endif %}"></i></a>
</span>
<span class="timestamp">{{ mark.created_time|date }}</span>
</div>
<div>
<a href="{{ mark.owner.url }}" title="@{{ mark.owner.handler }}">{{ mark.owner.display_name }}</a>
<span>{{ mark.action_label }}</span>
{% if mark.rating_grade %}{{ mark.rating_grade|rating_star }}{% endif %}
{% if mark.comment.item != item %}<a href="{{ mark.comment.item_url }}">{{ mark.comment.item.title }}</a>{% endif %}
</div>
<div>{{ mark.comment.html|safe }}</div>
</section>
{% endwith %}
{% 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>