Skip to content

Commit

Permalink
Merge branch 'main' into 4845-pray-and-pay-revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo authored Feb 28, 2025
2 parents 091b12c + 00c8929 commit 6126a21
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion cl/api/templates/rest-docs-v2.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends "base.html" %}
{% load static %}


{% block title %}REST API, v2 – CourtListener.com{% endblock %}
{% block description %}
The first REST API for federal and state case law and still the best.
Expand Down
2 changes: 0 additions & 2 deletions cl/api/templates/rest-docs-vlatest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ <h1 id="about">REST API &ndash; v4.1</h1>

<p class="lead">APIs for developers and researchers that need granular legal data.
</p>
<p class="alert alert-warning">A new version of the API is now live! Please read <a href="{% url "migration_guide" %}">our migration guide</a> to update. The <a href="{% url "rest_docs" version="v3" %}">old version of the documentation</a> is maintained for migration purposes only.
</p>
<p>After more than a decade of development, these APIs are powerful. Our <a href="{% url "case_law_api_help" %}">case law API</a> was the first. Our <a href="{% url "pacer_api_help" %}">PACER</a> and <a href="{% url "oral_argument_api_help" %}">oral argument</a> APIs are the biggest. Our <a href="{% url "webhooks_getting_started" %}">webhooks</a> push data to you. Our <a href="{% url "citation_lookup_api" %}">citation lookup tool</a> can fight hallucinations in AI tools.
</p>
<p>Let's get started. To see and browse all the API URLs, click the button below:
Expand Down
8 changes: 6 additions & 2 deletions cl/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ async def court_index(request: HttpRequest) -> HttpResponse:


async def rest_docs(request, version=None):
"""Show the correct version of the rest docs"""
"""Show the correct version of the rest docs.
Latest version is shown when not specified in args.
"""
court_count = await Court.objects.acount()
context = {"court_count": court_count, "private": False}
latest = version is None
context = {"court_count": court_count, "private": not latest}
return TemplateResponse(
request,
[f"rest-docs-{version}.html", "rest-docs-vlatest.html"],
Expand Down
2 changes: 1 addition & 1 deletion cl/opinion_page/templates/docket_tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</p>
{% endif %}
<h1 class="bottom inline" data-type="search.Docket" data-id="{{ docket.pk }}">
{{ docket|best_case_name|safe|v_wrapper }}
<span class="select-all">{{ docket|best_case_name|safe|v_wrapper }}</span>
{% if docket.docket_number %}
(<span class="select-all">{{ docket.docket_number }}</span>)
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion cl/opinion_page/templates/opinion.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h3>
{% block content %}
<article class="col-sm-9">
{% with opinion_count=cluster.sub_opinions.all.count %}
<h2 class="inline">{{ caption|safe|v_wrapper }}</h2>
<h2 class="inline select-all">{{ caption|safe|v_wrapper }}</h2>
{% include "includes/notes_modal.html" %}

<h3>{{ cluster.docket.court }}</h3>
Expand Down
6 changes: 3 additions & 3 deletions cl/opinion_page/templates/opinions.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ <h3>
</div>
</div>

<h1 class="case-caption jump-link" id="caption">{{ cluster|best_case_name|safe }}</h1>
<h1 class="case-caption jump-link select-all" id="caption">{{ cluster|best_case_name|safe }}</h1>
<h4 class="case-court">{{ cluster.docket.court }}</h4>
<br>
<div class="case-details">
<ul class="list-unstyled">
<li><strong>Citations:</strong> {{ cluster.citation_string|default:"None known" }}</li>
<li><strong>Citations:</strong> <span class="select-all">{{ cluster.citation_string|default:"None known" }}</span></li>
{% if cluster.case_name_full != cluster|best_case_name %}
<li><strong>Full Case Name:</strong>
{{ cluster.case_name_full }}
<span class="select-all">{{ cluster.case_name_full }}</span>
</li>
{% endif %}

Expand Down

0 comments on commit 6126a21

Please sign in to comment.