feat: Add child orgs to org detail page

This commit is contained in:
2025-07-20 16:29:56 +02:00
parent fa8612ad1a
commit f37d74a7d1
2 changed files with 12 additions and 0 deletions

View File

@@ -233,6 +233,9 @@ class RescueOrganization(models.Model):
self.exclude_from_check = True
self.save()
def child_organizations(self):
return RescueOrganization.objects.filter(parent_org=self)
# Admins can perform all actions and have the highest trust associated with them
# Moderators can make moderation decisions regarding the deletion of content

View File

@@ -63,6 +63,15 @@
</div>
</div>
{% if org.child_organizations %}
<div class="block">
<h2 class="title is-2">{% translate 'Unterorganisationen' %}</h2>
{% with rescue_organizations=org.child_organizations %}
{% include "fellchensammlung/lists/list-animal-shelters.html" %}
{% endwith %}
</div>
{% endif %}
<h2 class="title is-2">{% translate 'Vermittlungen der Organisation' %}</h2>
<div class="container-cards">