refactor: Restructure templates
This commit is contained in:
parent
8b06a2045d
commit
701997e2e9
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Rules</h1>
|
<h1>Rules</h1>
|
||||||
{% include "fellchensammlung/list-rules.html" %}
|
{% include "fellchensammlung/lists/list-rules.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -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 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.
|
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 %}
|
{% endif %}
|
||||||
{% include "fellchensammlung/partial-report.html" %}
|
{% include "fellchensammlung/partials/partial-report.html" %}
|
||||||
<h2>Moderationsverlauf</h2>
|
<h2>Moderationsverlauf</h2>
|
||||||
{% if report.get_moderation_actions %}
|
{% if report.get_moderation_actions %}
|
||||||
{% include "fellchensammlung/list-moderation-action.html" %}
|
{% include "fellchensammlung/lists/list-moderation-action.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
Bisher wurden keine Maßnahmen vorgenommen
|
Bisher wurden keine Maßnahmen vorgenommen
|
||||||
{% endif %}
|
{% endif %}
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div class="animals">
|
<div class="animals">
|
||||||
{% for animal in adoption_notice.animals %}
|
{% for animal in adoption_notice.animals %}
|
||||||
{% include "fellchensammlung/partial-animal-card.html" %}
|
{% include "fellchensammlung/partials/partial-animal-card.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -3,5 +3,5 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "fellchensammlung/detail-animal-partial.html" %}
|
{% include "fellchensammlung/details/detail-animal-partial.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -7,6 +7,6 @@
|
|||||||
href="https://hyteck.de">moanos</a></em>!</p>
|
href="https://hyteck.de">moanos</a></em>!</p>
|
||||||
<h2>{% translate "Aktuelle Vermittlungen" %}</h2>
|
<h2>{% translate "Aktuelle Vermittlungen" %}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% include "fellchensammlung/list-adoption-notices.html" %}
|
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,6 +1,6 @@
|
|||||||
<div class="adoption-notices">
|
<div class="adoption-notices">
|
||||||
{% for adoption_notice in adoption_notices %}
|
{% for adoption_notice in adoption_notices %}
|
||||||
{% include "fellchensammlung/partial-adoption-notice.html" %}
|
{% include "fellchensammlung/partials/partial-adoption-notice.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
<div class="container-list-moderation-actions">
|
<div class="container-list-moderation-actions">
|
||||||
{% for moderation_action in moderation_actions %}
|
{% for moderation_action in moderation_actions %}
|
||||||
{% include "fellchensammlung/partial-moderation-action.html" %}
|
{% include "fellchensammlung/partials/partial-moderation-action.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
@ -1,5 +1,5 @@
|
|||||||
<div class="container-list-rules">
|
<div class="container-list-rules">
|
||||||
{% for rule in rules %}
|
{% for rule in rules %}
|
||||||
{% include "fellchensammlung/partial-rule.html" %}
|
{% include "fellchensammlung/partials/partial-rule.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
Suche...
|
Suche...
|
||||||
{% include "fellchensammlung/list-adoption-notices.html" %}
|
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -18,13 +18,13 @@ def index(request):
|
|||||||
def adoption_notice_detail(request, adoption_notice_id):
|
def adoption_notice_detail(request, adoption_notice_id):
|
||||||
adoption_notice = AdoptionNotice.objects.get(id=adoption_notice_id)
|
adoption_notice = AdoptionNotice.objects.get(id=adoption_notice_id)
|
||||||
context = {"adoption_notice": adoption_notice}
|
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):
|
def animal_detail(request, animal_id):
|
||||||
animal = Animal.objects.get(id=animal_id)
|
animal = Animal.objects.get(id=animal_id)
|
||||||
context = {"animal": animal}
|
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):
|
def search(request):
|
||||||
@ -42,7 +42,7 @@ def add_adoption(request):
|
|||||||
return redirect(reverse("add-animal-to-adoption", args=[instance.pk]))
|
return redirect(reverse("add-animal-to-adoption", args=[instance.pk]))
|
||||||
else:
|
else:
|
||||||
form = AdoptionNoticeForm()
|
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):
|
def add_animal_to_adoption(request, adoption_notice_id):
|
||||||
@ -69,7 +69,7 @@ def add_animal_to_adoption(request, adoption_notice_id):
|
|||||||
else:
|
else:
|
||||||
form = AnimalForm()
|
form = AnimalForm()
|
||||||
image_form = ImageForm(request.POST, request.FILES, prefix="image_")
|
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})
|
{'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], ))
|
return redirect(reverse("report-detail-success", args=[report_instance.pk], ))
|
||||||
else:
|
else:
|
||||||
form = ReportForm()
|
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):
|
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}
|
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):
|
def report_detail_success(request, report_id):
|
||||||
@ -124,4 +124,4 @@ def report_detail_success(request, report_id):
|
|||||||
def member_detail(request, user):
|
def member_detail(request, user):
|
||||||
member = Member.objects.get(user=user)
|
member = Member.objects.get(user=user)
|
||||||
context = {"member": member}
|
context = {"member": member}
|
||||||
return render(request, 'fellchensammlung/detail-member.html', context=context)
|
return render(request, 'fellchensammlung/details/detail-member.html', context=context)
|
Loading…
Reference in New Issue
Block a user