feat: use markdown for adoption description

This commit is contained in:
moanos [he/him] 2024-08-04 14:40:14 +02:00
parent 83d8f04af8
commit 904a46652e
2 changed files with 9 additions and 6 deletions

View File

@ -5,7 +5,8 @@
{% block content %} {% block content %}
<div class="detail-adoption-notice-header"> <div class="detail-adoption-notice-header">
<h1 class="detail-adoption-notice-header">{{ adoption_notice.name }}</h1> <h1 class="detail-adoption-notice-header">{{ adoption_notice.name }}</h1>
<a class="btn2" href="{% url 'adoption-notice-add-photo' adoption_notice_id=adoption_notice.pk %}">{% translate 'Foto hinzufügen' %}</a> <a class="btn2"
href="{% url 'adoption-notice-add-photo' adoption_notice_id=adoption_notice.pk %}">{% translate 'Foto hinzufügen' %}</a>
<a class="btn2 detail-adoption-notice-header" <a class="btn2 detail-adoption-notice-header"
href="{% url 'adoption-notice-edit' adoption_notice_id=adoption_notice.pk %}">{% translate 'Bearbeiten' %}</a> href="{% url 'adoption-notice-edit' adoption_notice_id=adoption_notice.pk %}">{% translate 'Bearbeiten' %}</a>
</div> </div>
@ -34,13 +35,15 @@
</tr> </tr>
</table> </table>
</div> </div>
<p> <div class="card">
{% if adoption_notice.description %} <h1>{% translate "Beschreibung" %}</h1>
{{ adoption_notice.description }} <p>{% if adoption_notice.description %}
{{ adoption_notice.description | render_markdown }}
{% else %} {% else %}
{% translate "Keine Beschreibung angegeben" %} {% translate "Keine Beschreibung angegeben" %}
{% endif %} {% endif %}
</p> </p>
</div>
<div> <div>
{% for animal in adoption_notice.animals %} {% for animal in adoption_notice.animals %}

View File

@ -21,7 +21,7 @@
</p> </p>
<p> <p>
{% if adoption_notice.description %} {% if adoption_notice.description %}
{{ adoption_notice.description }} {{ adoption_notice.description | render_markdown }}
{% else %} {% else %}
{% translate "Keine Beschreibung" %} {% translate "Keine Beschreibung" %}
{% endif %} {% endif %}