Merge branch 'main' into bookwyrm-groups

This commit is contained in:
Hugh Rundle
2021-10-04 21:10:15 +11:00
17 changed files with 197 additions and 52 deletions

View File

@ -1,5 +1,6 @@
{% extends 'feed/layout.html' %}
{% load i18n %}
{% load bookwyrm_tags %}
{% block panel %}
<header class="block">
@ -9,7 +10,26 @@
</a>
</header>
{% include 'feed/thread.html' with status=status depth=0 max_depth=6 is_root=True direction=0 %}
<div class="thread-parent is-relative block">
<div class="thread">
{% for parent in ancestors %}
{% if parent.id %}
<div class="block">
{% include 'snippets/status/status.html' with status=parent|load_subclass %}
</div>
{% endif %}
{% endfor %}
<div class="is-main block" id="anchor-{{ status.id }}">
{% include 'snippets/status/status.html' with status=status main=True %}
</div>
{% for child in children %}
<div class="block">
{% include 'snippets/status/status.html' with status=child %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,25 +0,0 @@
{% load status_display %}
<div class="thread-parent is-relative block">
<div class="thread">
{% with depth=depth|add:1 %}
{% if depth <= max_depth and status.reply_parent and direction <= 0 %}
{% with direction=-1 %}
{% include 'feed/thread.html' with status=status|parent is_root=False %}
{% endwith %}
{% endif %}
<div{% if is_root %} class="block mt-5 is-main"{% endif %}>
{% include 'snippets/status/status.html' with status=status main=is_root %}
</div>
{% if depth <= max_depth and direction >= 0 %}
{% for reply in status|replies %}
{% with direction=1 %}
{% include 'feed/thread.html' with status=reply is_root=False %}
{% endwith %}
{% endfor %}
{% endif %}
{% endwith %}
</div>
</div>

View File

@ -7,7 +7,7 @@
{% block form %}
<form name="create-shelf" action="{% url 'shelf-create' %}" method="post">
{% include "shelf/form.html" with editable=shelf.editable form=create_form %}
{% include "shelf/form.html" with editable=True form=create_form %}
</form>
{% endblock %}