refactor: Restructure templates

This commit is contained in:
moanos [he/him] 2024-03-25 11:04:01 +01:00
parent 8b06a2045d
commit 701997e2e9
20 changed files with 17 additions and 17 deletions

View File

@ -3,5 +3,5 @@
{% block content %}
<h1>Rules</h1>
{% include "fellchensammlung/list-rules.html" %}
{% include "fellchensammlung/lists/list-rules.html" %}
{% endblock %}

View File

@ -7,10 +7,10 @@
Wenn du sehen willst welche Moderationsentscheidungen getroffen werden, schau zu einem späteren Zeitpunkt wieder auf dieser Seite vorbei.
Wenn du unzufrieden mit der Entscheidung bist kannst du per Mail an <a href="mailto:info@notfellchen.org">info@notfellchen.org</a> Einspruch einlegen.
{% endif %}
{% include "fellchensammlung/partial-report.html" %}
{% include "fellchensammlung/partials/partial-report.html" %}
<h2>Moderationsverlauf</h2>
{% if report.get_moderation_actions %}
{% include "fellchensammlung/list-moderation-action.html" %}
{% include "fellchensammlung/lists/list-moderation-action.html" %}
{% else %}
Bisher wurden keine Maßnahmen vorgenommen
{% endif %}

View File

@ -32,7 +32,7 @@
<div class="animals">
{% for animal in adoption_notice.animals %}
{% include "fellchensammlung/partial-animal-card.html" %}
{% include "fellchensammlung/partials/partial-animal-card.html" %}
{% endfor %}
</div>
{% endblock %}

View File

@ -3,5 +3,5 @@
{% load i18n %}
{% block content %}
{% include "fellchensammlung/detail-animal-partial.html" %}
{% include "fellchensammlung/details/detail-animal-partial.html" %}
{% endblock %}

View File

@ -7,6 +7,6 @@
href="https://hyteck.de">moanos</a></em>!</p>
<h2>{% translate "Aktuelle Vermittlungen" %}</h2>
<ul>
{% include "fellchensammlung/list-adoption-notices.html" %}
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
</ul>
{% endblock %}

View File

@ -1,6 +1,6 @@
<div class="adoption-notices">
{% for adoption_notice in adoption_notices %}
{% include "fellchensammlung/partial-adoption-notice.html" %}
{% include "fellchensammlung/partials/partial-adoption-notice.html" %}
{% endfor %}
</div>

View File

@ -1,5 +1,5 @@
<div class="container-list-moderation-actions">
{% for moderation_action in moderation_actions %}
{% include "fellchensammlung/partial-moderation-action.html" %}
{% include "fellchensammlung/partials/partial-moderation-action.html" %}
{% endfor %}
</div>

View File

@ -1,5 +1,5 @@
<div class="container-list-rules">
{% for rule in rules %}
{% include "fellchensammlung/partial-rule.html" %}
{% include "fellchensammlung/partials/partial-rule.html" %}
{% endfor %}
</div>

View File

@ -3,5 +3,5 @@
{% block content %}
Suche...
{% include "fellchensammlung/list-adoption-notices.html" %}
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
{% endblock %}

View File

@ -18,13 +18,13 @@ def index(request):
def adoption_notice_detail(request, adoption_notice_id):
adoption_notice = AdoptionNotice.objects.get(id=adoption_notice_id)
context = {"adoption_notice": adoption_notice}
return render(request, 'fellchensammlung/detail_adoption_notice.html', context=context)
return render(request, 'fellchensammlung/details/detail_adoption_notice.html', context=context)
def animal_detail(request, animal_id):
animal = Animal.objects.get(id=animal_id)
context = {"animal": animal}
return render(request, 'fellchensammlung/detail_animal.html', context=context)
return render(request, 'fellchensammlung/details/detail_animal.html', context=context)
def search(request):
@ -42,7 +42,7 @@ def add_adoption(request):
return redirect(reverse("add-animal-to-adoption", args=[instance.pk]))
else:
form = AdoptionNoticeForm()
return render(request, 'fellchensammlung/form_add_adoption.html', {'form': form})
return render(request, 'fellchensammlung/forms/form_add_adoption.html', {'form': form})
def add_animal_to_adoption(request, adoption_notice_id):
@ -69,7 +69,7 @@ def add_animal_to_adoption(request, adoption_notice_id):
else:
form = AnimalForm()
image_form = ImageForm(request.POST, request.FILES, prefix="image_")
return render(request, 'fellchensammlung/form_add_animal_to_adoption.html',
return render(request, 'fellchensammlung/forms/form_add_animal_to_adoption.html',
{'form': form, "image_form": image_form})
@ -99,7 +99,7 @@ def report_adoption(request, adoption_notice_id):
return redirect(reverse("report-detail-success", args=[report_instance.pk], ))
else:
form = ReportForm()
return render(request, 'fellchensammlung/form-report.html', {'form': form})
return render(request, 'fellchensammlung/forms/form-report.html', {'form': form})
def report_detail(request, report_id, form_complete=False):
@ -111,7 +111,7 @@ def report_detail(request, report_id, form_complete=False):
context = {"report": report, "moderation_actions": moderation_actions, "form_complete": form_complete}
return render(request, 'fellchensammlung/detail-report.html', context)
return render(request, 'fellchensammlung/details/detail-report.html', context)
def report_detail_success(request, report_id):
@ -124,4 +124,4 @@ def report_detail_success(request, report_id):
def member_detail(request, user):
member = Member.objects.get(user=user)
context = {"member": member}
return render(request, 'fellchensammlung/detail-member.html', context=context)
return render(request, 'fellchensammlung/details/detail-member.html', context=context)