From baf0d2db727126d0f389baea4bd971d848b62fd4 Mon Sep 17 00:00:00 2001 From: moanos Date: Tue, 17 Jun 2025 07:19:54 +0200 Subject: [PATCH] fix: Always use bulma for ANs --- .../details/detail_adoption_notice.html | 133 ------------------ src/fellchensammlung/views.py | 11 +- 2 files changed, 2 insertions(+), 142 deletions(-) delete mode 100644 src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html b/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html deleted file mode 100644 index 75c5067..0000000 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html +++ /dev/null @@ -1,133 +0,0 @@ -{% extends "fellchensammlung/base_generic.html" %} -{% load custom_tags %} -{% load i18n %} - -{% block title %}{{ adoption_notice.name }}{% endblock %} - -{% block content %} -
-
-

{{ adoption_notice.name }}

- {% if not is_subscribed %} -
-
- {% csrf_token %} - - - -
- - {% translate 'Abonniere diese Vermittlung um bei Kommentaren oder Statusänderungen benachrichtigt zu werden' %} - -
- {% else %} -
-
- {% csrf_token %} - - - -
- - {% translate 'Deabonnieren. Du bekommst keine Benachrichtigungen zu dieser Vermittlung mehr' %} - -
- {% endif %} - {% if adoption_notice.is_active %} - {% trans 'Aktive Vermittlung' %} - {% else %} - {% trans 'Vermittlung inaktiv' %} - {% endif %} -
- {% if has_edit_permission %} - {% translate 'Foto hinzufĂĽgen' %} - {% translate 'Bearbeiten' %} - {% endif %} -
-
- - - - - {% if adoption_notice.organization %} - - {% endif %} - - - - - - - - {% if adoption_notice.organization %} - - - {% endif %} - - - - - -
{% translate "Ort" %}{% translate "Organisation" %}{% translate "Suchen seit" %}{% translate "Zuletzt aktualisiert" %}{% translate "Weitere Informationen" %}
- {% if adoption_notice.location %} - {{ adoption_notice.location }} - {% else %} - {{ adoption_notice.location_string }} - {% endif %} - -
- {{ adoption_notice.organization }} - {% if adoption_notice.organization.trusted %} -
-
- - {% translate 'Diese Organisation kennt sich mit Ratten aus und achtet auf gute Abgabebedingungen' %} - -
- - {% endif %} -
-
{{ adoption_notice.searching_since }} - {{ adoption_notice.last_checked_hr }} - - {% if adoption_notice.further_information %} -
- - -
- {% else %} - - - {% endif %} -
-
-
-

{% translate "Bilder" %}

- {% for photo in adoption_notice.get_photos %} - {{ photo.alt_text }} - {% endfor %} -
-
-

{% translate "Beschreibung" %}

-

{% if adoption_notice.description %} - {{ adoption_notice.description | render_markdown }} - {% else %} - {% translate "Keine Beschreibung angegeben" %} - {% endif %} -

-
- -
- {% for animal in adoption_notice.animals %} - {% include "fellchensammlung/partials/partial-animal-card.html" %} - - {% endfor %} -
- - {% include "fellchensammlung/partials/partial-comment-section.html" %} - -{% endblock %} diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 75f3270..f1fdbf4 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -85,7 +85,7 @@ def change_language(request): return render(request, 'fellchensammlung/index.html') -def adoption_notice_detail(request, adoption_notice_id, template=None): +def adoption_notice_detail(request, adoption_notice_id): adoption_notice = AdoptionNotice.objects.get(id=adoption_notice_id) if request.user.is_authenticated: try: @@ -142,16 +142,9 @@ def adoption_notice_detail(request, adoption_notice_id, template=None): comment_form = CommentForm(instance=adoption_notice) context = {"adoption_notice": adoption_notice, "comment_form": comment_form, "user": request.user, "has_edit_permission": has_edit_permission, "is_subscribed": is_subscribed} - if template is not None: - return render(request, template, context=context) - else: - return render(request, 'fellchensammlung/details/detail_adoption_notice.html', context=context) + return render(request, 'fellchensammlung/details/bulma-detail-adoption-notice.html', context=context) -def adoption_notice_detail_bulma(request, adoption_notice_id): - return adoption_notice_detail(request, adoption_notice_id, - template='fellchensammlung/details/bulma-detail-adoption-notice.html') - @login_required() def adoption_notice_edit(request, adoption_notice_id):