2023-06-16 17:47:22 -04:00
|
|
|
{% load static %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% load l10n %}
|
|
|
|
{% load mastodon %}
|
|
|
|
{% load duration %}
|
|
|
|
{% load user_actions %}
|
|
|
|
<div id="comments_by_episode">
|
|
|
|
{% if not request.GET.last %}
|
2023-06-19 20:49:57 -04:00
|
|
|
<div class="season-picker">
|
|
|
|
<span class="season-number">
|
|
|
|
<a hx-swap="innerHTML"
|
|
|
|
hx-get="{% url "catalog:comments" item.url_path item.uuid %}"
|
2025-01-13 22:27:09 -05:00
|
|
|
hx-target="#comments">{% trans "this season" %}</a>
|
2023-06-19 20:49:57 -04:00
|
|
|
</span>
|
|
|
|
{% for ep in item.all_episodes %}
|
|
|
|
<span class="season-number" id="ci_{{ ep.uuid }}">
|
2023-06-16 17:47:22 -04:00
|
|
|
<a hx-swap="innerHTML"
|
2023-06-19 20:49:57 -04:00
|
|
|
{% if ep.uuid == episode_uuid %} class="current" {% else %} hx-get="{% url "catalog:comments_by_episode" item.url_path item.uuid %}?episode_uuid={{ ep.uuid }}" {% endif %}
|
|
|
|
hx-target="#comments">{{ ep.episode_number }}</a>
|
2023-06-16 17:47:22 -04:00
|
|
|
</span>
|
2023-06-19 20:49:57 -04:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-06-16 17:47:22 -04:00
|
|
|
<p>
|
|
|
|
<small>
|
|
|
|
<a href="#"
|
|
|
|
hx-get="{% url 'journal:comment' episode_uuid %}"
|
|
|
|
class="item-mark-icon"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend">
|
|
|
|
{% if mark.comment_text %}
|
2024-05-29 10:50:41 -04:00
|
|
|
<i class="fa-regular fa-pen-to-square"></i>
|
2023-06-16 17:47:22 -04:00
|
|
|
{% else %}
|
|
|
|
<i class="fa-regular fa-square-plus"></i>
|
|
|
|
{% endif %}
|
2024-05-19 16:32:59 -04:00
|
|
|
{% trans "comment this episode" %}
|
2023-06-16 17:47:22 -04:00
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
</p>
|
2023-06-18 20:53:10 -04:00
|
|
|
<script defer>
|
|
|
|
$(function(){
|
|
|
|
window.cil.forEach(function(uuid){
|
|
|
|
$('#ci_'+uuid).addClass('marked');
|
|
|
|
})
|
|
|
|
});
|
|
|
|
</script>
|
2023-06-16 17:47:22 -04:00
|
|
|
{% endif %}
|
|
|
|
{% for comment in comments %}
|
|
|
|
{% if forloop.counter <= 10 %}
|
|
|
|
<section>
|
|
|
|
<span class="action">
|
2023-12-29 16:03:31 -05:00
|
|
|
{% if comment.latest_post %}
|
|
|
|
{% include "action_reply_piece.html" with post=comment.latest_post piece=comment %}
|
|
|
|
{% include "action_like_post.html" with post=comment.latest_post %}
|
|
|
|
{% include "action_boost_post.html" with post=comment.latest_post %}
|
|
|
|
{% include "action_open_post.html" with post=comment.latest_post %}
|
|
|
|
{% endif %}
|
2023-06-16 17:47:22 -04:00
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
{% if comment.rating_grade %}{{ comment.rating_grade|rating_star }}{% endif %}
|
2023-06-30 23:53:53 -04:00
|
|
|
<a href="{{ comment.owner.url }}"
|
2023-06-16 17:47:22 -04:00
|
|
|
class="nickname"
|
2024-02-25 23:04:50 -05:00
|
|
|
title="@{{ comment.owner.handle }}">{{ comment.owner.display_name }}</a>
|
2023-06-16 17:47:22 -04:00
|
|
|
</span>
|
|
|
|
<span class="action inline">
|
|
|
|
<span class="timestamp">
|
|
|
|
{{ comment.created_time|date }}
|
|
|
|
{{ comment.mark.action_label }}
|
|
|
|
</span>
|
|
|
|
</span>
|
2024-07-13 01:36:18 -04:00
|
|
|
{% if comment.focus_item %}
|
|
|
|
<a href="{{ comment.focus_item.url }}">{{ comment.focus_item.display_title }}</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if comment.item != item %}<a href="{{ comment.item.url }}">{{ comment.item.display_title }}</a>{% endif %}
|
2024-04-08 17:27:45 -04:00
|
|
|
<div class="tldr" _="on click toggle .tldr on me">{{ comment.html|safe }}</div>
|
2023-06-16 17:47:22 -04:00
|
|
|
</section>
|
|
|
|
{% else %}
|
|
|
|
<a hx-get="{% url "catalog:comments_by_episode" item.url_path item.uuid %}?episode_uuid={{ episode_uuid }}&last={{ comment.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>
|
2023-06-16 17:47:22 -04:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% empty %}
|
2024-05-19 16:32:59 -04:00
|
|
|
<div class="empty">{% trans 'nothing more.' %}</div>
|
2023-06-16 17:47:22 -04:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|