-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2099 from laws-africa/causelist
Cause lists
- Loading branch information
Showing
20 changed files
with
752 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
peachjam/migrations/0168_courtdivision_alter_coredocument_doc_type_causelist.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# Generated by Django 4.2.16 on 2024-10-16 15:08 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("peachjam", "0167_peachjamsettings_allow_social_logins"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="CourtDivision", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"name", | ||
models.CharField(max_length=255, unique=True, verbose_name="name"), | ||
), | ||
( | ||
"code", | ||
models.SlugField(max_length=255, unique=True, verbose_name="code"), | ||
), | ||
( | ||
"order", | ||
models.IntegerField(blank=True, null=True, verbose_name="order"), | ||
), | ||
], | ||
), | ||
migrations.AlterField( | ||
model_name="coredocument", | ||
name="doc_type", | ||
field=models.CharField( | ||
choices=[ | ||
("core_document", "Core Document"), | ||
("gazette", "Gazette"), | ||
("generic_document", "Generic Document"), | ||
("judgment", "Judgment"), | ||
("legal_instrument", "Legal Instrument"), | ||
("legislation", "Legislation"), | ||
("book", "Book"), | ||
("journal", "Journal"), | ||
("causelist", "Cause List"), | ||
], | ||
default="core_document", | ||
max_length=255, | ||
verbose_name="document type", | ||
), | ||
), | ||
migrations.CreateModel( | ||
name="CauseList", | ||
fields=[ | ||
( | ||
"coredocument_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="peachjam.coredocument", | ||
), | ||
), | ||
( | ||
"court", | ||
models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="causelists", | ||
to="peachjam.court", | ||
verbose_name="court", | ||
), | ||
), | ||
( | ||
"division", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="causelists", | ||
to="peachjam.courtdivision", | ||
), | ||
), | ||
( | ||
"judges", | ||
models.ManyToManyField( | ||
blank=True, to="peachjam.judge", verbose_name="judges" | ||
), | ||
), | ||
( | ||
"registry", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="causelists", | ||
to="peachjam.courtregistry", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
"base_manager_name": "objects", | ||
}, | ||
bases=("peachjam.coredocument",), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
peachjam/templates/peachjam/_causelist_court_class_month_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "peachjam/_court_months_list.html" %} | ||
{% load i18n %} | ||
{% block month_link %} | ||
<a href="{% url "causelist_court_class_month" court_class.slug year m|date:'n' %}">{{ m|date:"F" }}</a> | ||
{% endblock %} | ||
{% block month_option %} | ||
<option value="{% url "causelist_court_class_month" court_class.slug year m|date:'n' %}" | ||
{% if m|date:"F" == month %} selected{% endif %}> | ||
{{ m|date:"F" }} | ||
</option> | ||
{% endblock %} |
11 changes: 11 additions & 0 deletions
11
peachjam/templates/peachjam/_causelist_court_class_years_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "peachjam/_court_years_list.html" %} | ||
{% load i18n %} | ||
{% block year_link %} | ||
<a href="{% url "causelist_court_class_year" court_class.slug y.year %}">{{ y.year }}</a> | ||
{% endblock %} | ||
{% block year_option %} | ||
<option value="{% url "causelist_court_class_year" court_class.slug y.year %}" | ||
{% if y.year == year %} selected{% endif %}> | ||
{{ y.year }} | ||
</option> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends "peachjam/_court_list.html" %} | ||
{% load i18n %} | ||
{% block court_class_link %} | ||
<a href="{% url 'causelist_court_class' court_class.slug %}">{% trans 'All causelists' %}</a> | ||
{% endblock %} | ||
{% block court_link %} | ||
<a href="{% url 'causelist_court' court.code %}">{{ court.name }}</a> | ||
{% endblock %} |
10 changes: 10 additions & 0 deletions
10
peachjam/templates/peachjam/_causelist_court_months_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends "peachjam/_court_months_list.html" %} | ||
{% load i18n %} | ||
{% block month_link %} | ||
<a href="{% url "causelist_court_month" court.code year m|date:'n' %}">{{ m|date:"F" }}</a> | ||
{% endblock %} | ||
{% block month_option %} | ||
<option value="{% url "causelist_court_month" court.code year m|date:'n' %}" | ||
{% if m|date:"F" == month %} selected{% endif %}> | ||
</option> | ||
{% endblock %} |
11 changes: 11 additions & 0 deletions
11
peachjam/templates/peachjam/_causelist_court_registries_months_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "peachjam/_court_months_list.html" %} | ||
{% load i18n %} | ||
{% block month_link %} | ||
<a href="{% url "causelist_court_registry_month" court.code registry.code year m|date:'n' %}">{{ m|date:"F" }}</a> | ||
{% endblock %} | ||
{% block month_option %} | ||
<option value="{% url "causelist_court_registry_month" court.code registry.code year m|date:'n' %}" | ||
{% if m|date:"F" == month %} selected{% endif %}> | ||
{{ m|date:"F" }} | ||
</option> | ||
{% endblock %} |
11 changes: 11 additions & 0 deletions
11
peachjam/templates/peachjam/_causelist_court_registries_years_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "peachjam/_court_years_list.html" %} | ||
{% load i18n %} | ||
{% block year_link %} | ||
<a href="{% url "causelist_court_registry_year" court.code registry.code y.year %}">{{ y.year }}</a> | ||
{% endblock %} | ||
{% block year_option %} | ||
<option value="{% url "causelist_court_registry_year" court.code registry.code y.year %}" | ||
{% if y.year == year %} selected{% endif %}> | ||
{{ y.year }} | ||
</option> | ||
{% endblock %} |
11 changes: 11 additions & 0 deletions
11
peachjam/templates/peachjam/_causelist_court_years_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "peachjam/_court_years_list.html" %} | ||
{% load i18n %} | ||
{% block year_link %} | ||
<a href="{% url "causelist_court_year" court.code y.year %}">{{ y.year }}</a> | ||
{% endblock %} | ||
{% block year_option %} | ||
<option value="{% url "causelist_court_year" court.code y.year %}" | ||
{% if y.year == year %} selected{% endif %}> | ||
{{ y.year }} | ||
</option> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
peachjam/templates/peachjam/causelist_court_class_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends 'peachjam/causelist_court_detail.html' %} | ||
{% load i18n %} | ||
{% block year_list %} | ||
{% include "peachjam/_causelist_court_class_years_list.html" %} | ||
{% endblock %} | ||
{% block month_list %} | ||
{% include "peachjam/_causelist_court_class_month_list.html" %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% extends 'peachjam/layouts/document_list.html' %} | ||
{% load i18n %} | ||
{% block title %}{{ page_title }}{% endblock %} | ||
{% block breadcrumbs %} | ||
<div class="container"> | ||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'home_page' %}">{% trans 'Home' %}</a> | ||
</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'causelist_list' %}">{% trans 'Cause Lists' %}</a> | ||
</li> | ||
{% if court.court_class.show_listing_page %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'causelist_court_class' court.court_class.slug %}">{{ court.court_class.name }}</a> | ||
</li> | ||
{% elif court_class.show_listing_page %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'causelist_court_class' court_class.slug %}">{{ court_class.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% if court %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'causelist_court' court.code %}">{{ court.name }}</a> | ||
</li> | ||
{% endif %} | ||
</ol> | ||
</nav> | ||
</div> | ||
{% endblock %} | ||
{% block page-title %} | ||
{% if not entity_profile %}<h1 class="mt-4">{{ page_title }}</h1>{% endif %} | ||
{% endblock %} | ||
{% block page-header %} | ||
{{ block.super }} | ||
{% block court_list %} | ||
{% include 'peachjam/_registries.html' %} | ||
{% endblock %} | ||
{% block year_list %} | ||
{% include 'peachjam/_causelist_court_years_list.html' %} | ||
{% endblock %} | ||
{% block month_list %} | ||
{% include 'peachjam/_causelist_court_months_list.html' %} | ||
{% endblock %} | ||
{% endblock %} |
8 changes: 8 additions & 0 deletions
8
peachjam/templates/peachjam/causelist_court_registry_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends 'peachjam/causelist_court_detail.html' %} | ||
{% load i18n %} | ||
{% block year_list %} | ||
{% include "peachjam/_causelist_court_registries_years_list.html" %} | ||
{% endblock %} | ||
{% block month_list %} | ||
{% include "peachjam/_causelist_court_registries_months_list.html" %} | ||
{% endblock %} |
Oops, something went wrong.