Skip to content

Commit

Permalink
adds regional courts to au page
Browse files Browse the repository at this point in the history
  • Loading branch information
actlikewill committed Aug 30, 2024
1 parent 3062f66 commit 8c0f373
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion africanlii/templates/africanlii/au_detail_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,20 @@ <h3 class="mb-4" id="au-institutions">{% trans 'African Union Institutions' %}</
</section>
<section class="container">
<div class="row">
<div class="col-sm-12"></div>
<div class="col-md-6 col-lg-4 mb-3">
{% for court_class in court_classes %}
{% if court_class.courts.all %}
<h3>{{ court_class.name }}</h3>
<ul class="list-unstyled">
{% for court in court_class.courts.all %}
<li>
<a href="{% url 'court' court.code %}">{{ court.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
</div>
</section>
<section class="container">
Expand Down
2 changes: 2 additions & 0 deletions africanlii/views/au.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
RatificationCountry,
RegionalEconomicCommunity,
)
from peachjam.models import CourtClass
from peachjam.views import AuthorDetailView, CoreDocument, PlaceDetailView


Expand All @@ -28,6 +29,7 @@ def get_context_data(self, **kwargs):
context["au_institutions"] = AfricanUnionInstitution.objects.prefetch_related(
"author"
)
context["court_classes"] = CourtClass.objects.prefetch_related("courts")
context["liis"] = LIIS
return context

Expand Down

0 comments on commit 8c0f373

Please sign in to comment.