Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement upload portal for missouri and mississippi court opinions #4034

Merged
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6feb525
feat(upload_portal): upload portal for mass, massappct, miss, missctapp
quevon24 May 8, 2024
4fd9059
feat(upload_portal): update judges validation
quevon24 May 8, 2024
c645012
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 8, 2024
40e6369
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 8, 2024
4f3176b
feat(upload_portal): mypy ignore auser()
quevon24 May 8, 2024
3466661
feat(upload_portal): correct portal for missouri
quevon24 May 8, 2024
9f9039c
feat(upload_portal): missouri court image
quevon24 May 8, 2024
782638f
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 8, 2024
9fdad8a
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 9, 2024
e5ff311
feat(upload_portal): missouri form
quevon24 May 9, 2024
83bf030
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 9, 2024
e3e65c8
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 9, 2024
bb13014
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 9, 2024
603c47b
feat(upload_portal): refactor code for upload portal for courts
quevon24 May 15, 2024
c518a14
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 15, 2024
46e2e24
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 15, 2024
59464af
feat(upload_portal): fix mypy warnings
quevon24 May 16, 2024
d2fb9a6
feat(upload_portal): update tests
quevon24 May 16, 2024
58bc986
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 16, 2024
8e91c73
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 17, 2024
e6f527f
feat(upload_portal): add forms and update views for missouri district…
quevon24 May 23, 2024
cc29700
Merge remote-tracking branch 'origin/3996-implement-upload-portal-for…
quevon24 May 23, 2024
0956494
feat(upload_portal): fix whitespacing for tn-court.html and court.html
quevon24 May 23, 2024
19bcfd9
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 May 30, 2024
b55617c
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 Jun 5, 2024
7109267
fix(upload_portal): remove retired judges from options
quevon24 Jun 6, 2024
6ed4d24
Merge remote-tracking branch 'origin/3996-implement-upload-portal-for…
quevon24 Jun 6, 2024
b7650dd
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 Jun 6, 2024
c2b76b2
fix(upload_portal): add seal rookery domain to CSP_IMG_SRC
quevon24 Jun 6, 2024
5838793
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 Jun 6, 2024
de8318c
fix(upload_portal): refactor forms
quevon24 Jun 12, 2024
ea09ed0
fix(upload_portal): refactor court forms
quevon24 Jun 12, 2024
c2f58f2
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 Jun 12, 2024
576c0e5
fix(upload_portal): remove seals
quevon24 Jun 12, 2024
262823a
Merge remote-tracking branch 'origin/3996-implement-upload-portal-for…
quevon24 Jun 12, 2024
cb5b06d
fix(upload_portal): judges_str field not required
quevon24 Jun 12, 2024
038ca5d
fix(upload_portal): add seal rookery to pyproject.toml
quevon24 Jun 14, 2024
16fe1ee
Merge remote-tracking branch 'refs/remotes/origin/main' into 3996-imp…
quevon24 Jun 14, 2024
c2a7779
fix(upload_portal): fix merge conflict
quevon24 Jun 14, 2024
01fd99d
Merge remote-tracking branch 'refs/remotes/origin/main' into 3996-imp…
quevon24 Jun 18, 2024
325991a
fix(upload_portal): add help text to forms
quevon24 Jun 18, 2024
41b5c08
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
quevon24 Jun 19, 2024
5eecd0d
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
flooie Jun 25, 2024
780a1dd
feat(tn_court): Whitespace cleanup
flooie Jun 25, 2024
2d7d2a1
fix(form): Update labels/placeholders
flooie Jun 25, 2024
d106702
Merge branch '3996-implement-upload-portal-for-missouri-mississippi-c…
flooie Jun 25, 2024
45a0653
fix(upload_portal): update tests for miss and mo
quevon24 Jun 25, 2024
ec1c177
fix(upload_portal): fix whitespacing
quevon24 Jun 25, 2024
f279730
fix(upload_portal): fix whitespacing
quevon24 Jun 25, 2024
3ea3af3
Merge branch 'main' into 3996-implement-upload-portal-for-missouri-mi…
flooie Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
787 changes: 556 additions & 231 deletions cl/opinion_page/forms.py

Large diffs are not rendered by default.

Binary file removed cl/opinion_page/static/img/me-court.jpg
Binary file not shown.
Binary file added cl/opinion_page/static/img/tennworkcompcl.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 75 additions & 36 deletions cl/opinion_page/templates/court.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load auth %}
{% load static %}
{% load waffle_tags %}

{% block title %}
Decisions for {{ court }} – CourtListener.com
Expand All @@ -25,59 +26,79 @@
{% endblock %}

{% block content %}
<div id="court_homepage" class="col-xs-12">
<div id="court_homepage" class="col-md-12">
<div class="row">
<div class="col-xs-4">
<img src="{% static 'img/' %}{{ pk }}-court.jpg" class="img-responsive" width="460" height="206" >
<div class="col-md-1">
</div>
<div class="col-xs-8">
<div class="col-md-2">
<img src="{{ court_seal }}" class="img-responsive" width="128" height="128">
</div>
<div class="col-md-8">
<h1>Decisions of the {{ court }}
</h1>
<div class="lead gray">
<p>The Supreme Judicial Court of Maine has partnered with the non-profit organization, Free Law Project, to host its court decisions on CourtListener.com. Free Law Project is proud to support this partnership and makes the decisions available online as they are released by the court.</p>
</div>
{% if pk == "me" %}
<div class="lead gray">
<p>The Supreme Judicial Court of Maine has partnered with the
non-profit organization, Free Law Project, to host its court
decisions on CourtListener.com. Free Law Project is proud to
support this partnership and makes the decisions available
online as they are released by the court.</p>
</div>
{% endif %}
</div>
<div class="col-md-1">
</div>
</div>

<div class="row" id="main-query-box">
<form action="/?" method="get" id="court-search-form" class="form-inline" role="form">
<form action="/?" method="get" id="court-search-form" class="form-inline"
role="form">
<div id="search-container" class="text-center">
<div class="input-group">
<input class="form-control input-lg"
value=""
name="q"
id="id_q"
autocomplete="off"
type="text">
value=""
name="q"
id="id_q"
autocomplete="off"
type="text">
<div class="hidden">
<label for="id_{{ pk }}">
<input id="id_{{ pk }}" name="court_{{ pk }}" checked="checked" type="checkbox">
<input id="id_{{ pk }}" name="court_{{ pk }}"
checked="checked" type="checkbox">
</label>
</div>

<span class="input-group-btn">
<button type="submit"
class="btn btn-primary btn-lg"
name="search"
id="search-button"><i class="fa fa-search"></i>&nbsp;Search
</button>
</span>
<button type="submit"
class="btn btn-primary btn-lg"
name="search"
id="search-button"><i class="fa fa-search"></i>&nbsp;Search
</button>
</span>
</div>
<div class="clearfix"></div>
</div>
</form>
</div>
<div class="row v-offset-above-6">
<div class="col-xs-8">
<h3>Recent Decisions of the&nbsp;{{ court }} <i class="gray fa fa-file-text-o"></i></h3>
<div class="row">
<div class="col-md-8">
<h3>Recent Decisions of the&nbsp;{{ court }} <i
class="gray fa fa-file-text-o"></i></h3>
{% if request.user|in_group:"uploaders_{{ pk }}" %}
<p><a href="{% url "court_publish_page" pk=pk %}"
class="btn btn-default">Upload New {{ court }} Decision</a></p>
class="btn btn-default"><i
class="fa fa-upload"></i>&nbsp;Upload New {{ court }}
Decision</a></p>
{% endif %}
{% if results.paginator.count > 0 %}
{% include "includes/search_result.html" with results=results type_override=SEARCH_TYPES.OPINION simple=True %}
{% flag "o-es-active" %}
{% include "includes/search_result.html" with results=results type_override=SEARCH_TYPES.OPINION simple=True %}
{% else %}
{% include "includes/search_result_solr.html" with results=results type_override=SEARCH_TYPES.OPINION simple=True %}
{% endflag %}

<p class="left">
<a href="/?court_{{ pk }}=on&order_by=dateFiled+desc"
<a href="/?court_{{ pk }}=on&order_by=dateFiled+desc&court={{ pk }}"
class="btn btn-default btn-lg v-offset-above-2"
rel="nofollow"
>See More Recent Opinions</a>
Expand All @@ -86,16 +107,34 @@ <h3>Recent Decisions of the&nbsp;{{ court }} <i class="gray fa fa-file-text-o"><
<p>No cases yet.</p>
{% endif %}
</div>
<div class="col-xs-4">
<h3>About the Court</h3>
<p>The Supreme Judicial Court of Maine is the highest court in the state of Maine. It is made up of a chief justice and six associate justices who are appointed by the governor and confirmed by the Maine Senate. The court has general appellate jurisdiction and is responsible for interpreting the state's laws and constitution. It also has the power to issue advisory opinions on matters of law to the governor and the state's legislature.</p>
<hr>
<h3>Neutral Citations</h3>
<p>Supreme Judicial Court of Maine court uses neutral citations to cite its opinions.</p>
<p>Citations to the {{ court }} take the form:</p>
<pre>[YEAR] ME [#]</pre>
<p>In this cases, the format begins with the year, then an abbreviation for the court (ME), and finishes with a serial number indicating the decision number.</p>
</div>
{% if pk == "me" %}
<div class="col-md-4">
<h3>About the Court</h3>
<p>The Supreme Judicial Court of Maine is the highest court in the
state
of Maine. It is made up of a chief justice and six associate
justices who are appointed by the governor and confirmed by the
Maine Senate. The court has general appellate jurisdiction and
is
responsible for interpreting the state's laws and constitution.
It
also has the power to issue advisory opinions on matters of law
to
the governor and the state's legislature.</p>
<hr>
<h3>Neutral Citations</h3>
<p>Supreme Judicial Court of Maine court uses neutral citations to
cite
its opinions.</p>
<p>Citations to the {{ court }} take the form:</p>
<pre>[YEAR] ME [#]</pre>
<p>In this cases, the format begins with the year, then an
abbreviation
for the court (ME), and finishes with a serial number indicating
the
decision number.</p>
</div>
flooie marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
</div>
</div>

Expand Down
218 changes: 112 additions & 106 deletions cl/opinion_page/templates/publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,128 +2,134 @@
{% load static %}

{% block title %}
Decisions for {{ form.initial.court }} – CourtListener.com
Decisions for {{ form.initial.court }} – CourtListener.com
{% endblock %}
{% block og_title %}
Decisions for {{ form.initial.court }} – CourtListener.com
Decisions for {{ form.initial.court }} – CourtListener.com
{% endblock %}
{% block description %}
Search and read decisions from the {{ form.initial.court }}
Search and read decisions from the {{ form.initial.court }}
{% endblock %}
{% block og_description %}
Search and read decisions from the {{ form.initial.court }}
Search and read decisions from the {{ form.initial.court }}
{% endblock %}

{% block navbar-o %}active{% endblock %}
{% block sidebar %}{% endblock %}

{% block head %}
{% if DEBUG %}
<link rel="stylesheet"
href="{% static "css/bootstrap-datepicker3.css" %}"/>
{% else %}
<link rel="stylesheet"
href="{% static "css/bootstrap-datepicker3.min.css" %}"/>
{% endif %}
{% if DEBUG %}
<link rel="stylesheet"
href="{% static "css/bootstrap-datepicker3.css" %}"/>
{% else %}
<link rel="stylesheet"
href="{% static "css/bootstrap-datepicker3.min.css" %}"/>
{% endif %}
{% endblock %}

{% block footer-scripts %}
{% include "includes/date_picker.html" %}
<script src="{% static "js/jquery.bootstrap-growl.js" %}"></script>
{% include "includes/date_picker.html" %}
<script src="{% static "js/jquery.bootstrap-growl.js" %}"></script>
{% endblock %}

{% block content %}
<div id="court_publish" class="col-xs-12">
<div class="row">
<div class="col-xs-1"></div>
<div class="col-xs-2">
{% if form.initial.court.id == "me" %}
<img src="https://seals.free.law/v2/128/me.png" class="img-responsive" height=128 width="128" />
{% elif form.initial.court.id == "tennworkcompcl" %}
<img src="{% static "img/tn-court.jpg" %}" class="img-responsive" width="359" height="359" >
{% elif form.initial.court.id == "tennworkcompapp" %}
<img src="{% static "img/tn-court.jpg" %}" class="img-responsive" width="359" height="359" >
{% endif %}

</div>
<div class="col-xs-8">
<h1>
{{ form.initial.court }} Upload Portal
</h1>
<div class="lead gray">
<p>Upload court decisions using the form below.</p>
</div>
</div>
<div class="col-xs-1"></div>
</div>

<div class="row">
<div class="col-xs-12">

{% if form.errors %}
{% for field in form %}
{% for error in field.errors %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
{% endfor %}
{% for error in form.non_field_errors %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
{% endif %}

<hr><br>

<form method="post" action=""
enctype="multipart/form-data"
class="form-horizontal">
{% csrf_token %}

{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}

{% for field in form.visible_fields %}

{% if "Cite" not in field.label %}

<div class="form-group">
<label for="{{ field.name }}" class="col-sm-2 control-label">{{ field.label }}</label>
<div class="col-sm-9">
{{ field }}
</div>
</div>

{% else %}

{% if "Cite Year" in field.label %}
<div class="form-group">
<label for="{{ field.name }}" class="col-sm-2 control-label">Neutral Citation</label>
{% endif %}

<div class="col-sm-3">
{{ field }}
</div>

{% if "Cite Page" in field.label %}
</div>
{% endif %}

{% endif %}

{% endfor %}

<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Upload</button>
</div>
</div>
</form>

</div>
</div>
</div>
<div id="court_publish" class="col-xs-12">
<div class="row">
<div class="col-xs-1"></div>
<div class="col-xs-2">
<img src="{{ court_image }}" class="img-responsive"
width="128" height="128">
</div>
<div class="col-xs-8">
<h1>
{{ form.initial.court }} Upload Portal
</h1>
<div class="lead gray">
<p>Upload court decisions using the form below.</p>
</div>
</div>
<div class="col-xs-1"></div>
</div>

<div class="row">
<div class="col-xs-12">

{% if form.errors %}
{% for field in form %}
{% for error in field.errors %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
{% endfor %}
{% for error in form.non_field_errors %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
{% endif %}

<hr>
<br>

<form method="post" action=""
enctype="multipart/form-data"
class="form-horizontal">
{% csrf_token %}

{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}

{% for field in form.visible_fields %}

{% if "Cite" not in field.label %}

<div class="form-group">
<label for="{{ field.name }}"
class="col-sm-2 control-label">
{{ field.label }}{% if field.field.required %}
*{% endif %}</label>
<div class="col-sm-9">
{{ field }}
{% if field.help_text %}
<small class="form-text text-muted">{{ field.help_text }}</small>
{% endif %}
</div>
</div>

{% else %}

{% if "Cite Year" in field.label %}
<div class="form-group">
<label for="{{ field.name }}"
class="col-sm-2 control-label">Neutral
Citation</label>
{% endif %}

<div class="col-sm-3">
{{ field }}
</div>

{% if "Cite Page" in field.label %}
</div>
{% endif %}

{% endif %}

{% endfor %}

<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default"><i
class="fa fa-upload"></i>&nbsp;Upload
</button>

</div>
</div>
</form>

</div>
</div>
</div>
{% endblock %}
Loading
Loading