76 lines
3.1 KiB
HTML
76 lines
3.1 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% load l10n %}
|
|
{% load admin_url %}
|
|
{% load mastodon %}
|
|
{% load oauth_token %}
|
|
{% load truncate %}
|
|
{% load thumb %}
|
|
{% load prettydate %}
|
|
{% load user_actions %}
|
|
{% load duration %}
|
|
{% wish_item_action activity.action_object.item.parent_item as action %}
|
|
{% like_piece_action activity.action_object as like_action %}
|
|
<span class="action">
|
|
<span>
|
|
{% liked_piece activity.action_object as liked %}
|
|
{% include 'like_stats.html' with liked=liked piece=activity.action_object %}
|
|
</span>
|
|
<span>
|
|
<a title="评论节目"
|
|
hx-get="{% url 'journal:comment' activity.action_object.item.uuid %}"
|
|
hx-target="body"
|
|
hx-swap="beforeend"><i class="fa-regular fa-comment"></i></a>
|
|
</span>
|
|
{% if activity.action_object.item.class_name == 'podcastepisode' %}
|
|
<span>
|
|
<a title="播放节目"
|
|
class="episode"
|
|
data-uuid="{{ activity.action_object.item.uuid }}"
|
|
data-media="{{ activity.action_object.item.media_url }}"
|
|
data-cover="{{ activity.action_object.item.cover_url|default:activity.action_object.item.parent_item.cover.url }}"
|
|
data-title="{{ activity.action_object.item.title }}"
|
|
data-album="{{ activity.action_object.item.parent_item.title }}"
|
|
data-hosts="{{ activity.action_object.item.parent_item.hosts|join:' / ' }}"
|
|
data-position="{{ activity.action_object.metadata.position | default:0 }}"><i class="fa-solid fa-circle-play"></i></a>
|
|
</span>
|
|
{% endif %}
|
|
<span>
|
|
{% if not action.taken %}
|
|
<a title="添加标记"
|
|
hx-get="{% url 'journal:mark' activity.action_object.item.parent_item.uuid %}?shelf_type=wishlist"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<i class="fa-regular fa-bookmark"></i>
|
|
</a>
|
|
{% else %}
|
|
<a title="修改标记"
|
|
hx-get="{% url 'journal:mark' activity.action_object.item.parent_item.uuid %}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<i class="fa-solid fa-bookmark"></i>
|
|
</a>
|
|
{% endif %}
|
|
</span>
|
|
<span>
|
|
<a {% if activity.action_object.metadata.shared_link %} href="{{ activity.action_object.metadata.shared_link }}" target="_blank" rel="noopener" title="打开联邦网络分享链接" {% else %} class="disabled" {% endif %}><i class="fa-solid {% if activity.action_object.visibility > 0 %} fa-lock {% else %} fa-globe {% endif %} "></i></a>
|
|
</span>
|
|
</span>
|
|
<div class="spacing">
|
|
{{ activity.action_object.mark.action_label }}
|
|
<a href="{{ activity.action_object.item_url }}">{{ activity.action_object.item.title }}</a>
|
|
{% if activity.action_object.metadata.position %}
|
|
<span class="muted">{{ activity.action_object.metadata.position|duration_format:1 }}</span>
|
|
{% endif %}
|
|
{% if activity.action_object.mark.rating_grade %}
|
|
{{ activity.action_object.mark.rating_grade | rating_star }}
|
|
{% endif %}
|
|
</div>
|
|
<article>
|
|
{% include "_item_card.html" with item=activity.action_object.item.parent_item allow_embed=1 %}
|
|
{% if activity.action_object.mark.comment_text %}
|
|
<footer>
|
|
<p>{{ activity.action_object.mark.comment_html|safe }}</p>
|
|
</footer>
|
|
{% endif %}
|
|
</article>
|