From 60ac03a9514fadefbf8317088ea466eb421ad54e Mon Sep 17 00:00:00 2001
From: Your Name
Date: Sun, 18 Jun 2023 20:53:10 -0400
Subject: [PATCH] list user comment ui
---
catalog/templates/_item_comments.html | 9 +-
.../templates/_item_comments_by_episode.html | 9 +-
catalog/templates/_item_user_data.html | 155 ++++++++++++++++++
catalog/templates/item_base.html | 130 +--------------
catalog/views.py | 5 +
common/static/scss/_item.scss | 22 ++-
6 files changed, 192 insertions(+), 138 deletions(-)
create mode 100644 catalog/templates/_item_user_data.html
diff --git a/catalog/templates/_item_comments.html b/catalog/templates/_item_comments.html
index 763667d5..3c26df01 100644
--- a/catalog/templates/_item_comments.html
+++ b/catalog/templates/_item_comments.html
@@ -13,7 +13,7 @@
{% if item.episodes.all %}
全部
{% for ep in item.episodes.all %}
-
+
第{{ ep.episode_number }}集
@@ -24,6 +24,13 @@
{% endif %}
+
{% endif %}
{% for comment in comments %}
{% if forloop.counter <= 10 %}
diff --git a/catalog/templates/_item_comments_by_episode.html b/catalog/templates/_item_comments_by_episode.html
index 00f0e6b2..91e22f67 100644
--- a/catalog/templates/_item_comments_by_episode.html
+++ b/catalog/templates/_item_comments_by_episode.html
@@ -17,7 +17,7 @@
hx-target="#comments">全部
{% for ep in item.episodes.all %}
-
+
第{{ ep.episode_number }}集
@@ -41,6 +41,13 @@
+
{% endif %}
{% for comment in comments %}
{% if forloop.counter <= 10 %}
diff --git a/catalog/templates/_item_user_data.html b/catalog/templates/_item_user_data.html
new file mode 100644
index 00000000..ab44fd36
--- /dev/null
+++ b/catalog/templates/_item_user_data.html
@@ -0,0 +1,155 @@
+{% load user_actions %}
+
+
+
+ {% for tag in mark.tags %}
+
+ {{ tag }}
+
+ {% endfor %}
+
+
+
+
+ {% if mark.comment %}
+
+
+ {% liked_piece mark.comment as liked %}
+ {% include 'like_stats.html' with liked=liked piece=mark.comment %}
+
+
+
+
+ {% comment %} {{ mark.comment.created_time|date }} {% endcomment %}
+
+ {{ mark.comment.html|safe }}
+ {% else %}
+
+ {% endif %}
+
+ {% for comment in child_item_comments %}
+
+
+
+
+
+
+ {% liked_piece comment as liked %}
+ {% include 'like_stats.html' with liked=liked piece=comment %}
+
+
+
+
+ {% comment %} {{ comment.created_time|date }} {% endcomment %}
+
+
+ 评{{ comment.item.title }}: {{ comment.html|safe }}
+
+ {% endfor %}
+
+
+
+ 我的评论
+
+ {% if review %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
+
+
+ {% if review %}
+
+
+ {% liked_piece mark.review as liked %}
+ {% include 'like_stats.html' with liked=liked piece=mark.review %}
+
+
+
+
+ {{ mark.review.created_time|date }}
+
+
+ {{ review.title }}
+
+ {% else %}
+
+ {% endif %}
+
+
+
+ 我的收藏单
+
+
+
+
+
+
+
+ {% for c in my_collections %}
+
+ {{ c.title }}
+ {% if c.visibility > 0 %}{% endif %}
+
+ {% empty %}
+
+ {% endfor %}
+
+
+
diff --git a/catalog/templates/item_base.html b/catalog/templates/item_base.html
index 17dbabea..2cdaf138 100644
--- a/catalog/templates/item_base.html
+++ b/catalog/templates/item_base.html
@@ -106,135 +106,7 @@
{% endif %}