feat: Add comments to adoption notices

This commit is contained in:
2024-05-30 13:58:24 +02:00
parent a16098f648
commit e77a936c30
8 changed files with 132 additions and 10 deletions

View File

@@ -37,9 +37,6 @@
{% endif %}
</p>
<div class="container-cards">
{% for animal in adoption_notice.animals %}
{% include "fellchensammlung/partials/partial-animal-card.html" %}
{% endfor %}
</div>
{% include "fellchensammlung/partials/partial-comment-section.html" %}
{% endblock %}

View File

@@ -0,0 +1,13 @@
{% load i18n %}
<div class="container-comments">
<h2>{% translate 'Comments' %}</h2>
{% if adoption_notice.comments %}
{% for comment in adoption_notice.comments %}
{% include "fellchensammlung/partials/partial-comment.html" %}
{% endfor %}
{% else %}
{% translate 'Noch keine Kommentare' %}
{% endif %}
</div>

View File

@@ -0,0 +1,13 @@
{% load i18n %}
{% load custom_tags %}
<div class="comment">
<div class="comment-header">
<b>{{ comment.user }}</b>
{{ comment.created_at }}
</div>
<p>
{{ comment.text | render_markdown }}
</p>
</div>