Skip to content

Commit

Permalink
fix(citation): Remove duplicate code using the authorities list template
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Dec 7, 2023
1 parent 10142c2 commit b86f0ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
15 changes: 1 addition & 14 deletions cl/opinion_page/templates/docket_authorities.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "docket_tabs.html" %}
{% load humanize %}
{% load text_filters %}

{% block title %}Authorities for {{ title }} – CourtListener.com{% endblock %}
{% block og_title %}Authorities for {{ title }} - CourtListener.com{% endblock %}
Expand All @@ -17,19 +16,7 @@
<h3>The filings in this docket cite {{docket.authority_count|intcomma}} opinion{{docket.authority_count|pluralize}}.</h3>
<hr>
{# Westlaw's metadata organization: Checkbox, Treatment, Name + citation + summary, Date, Type, Depth #}
<ul>
{% for authority in authorities %}
<li>
{{ authority.depth }} reference{{ authority.depth|pluralize }} to
<a href="{{ authority.cited_opinion.cluster.get_absolute_url }}?{{ request.META.QUERY_STRING }}" {% if authority.blocked %}rel="nofollow" {% endif %}>
{{ authority.cited_opinion.cluster.caption|safe|v_wrapper }}
</a>
<br />
<span class="bullet-tail">{{ authority.cited_opinion.cluster.docket.court }}</span>
<span class="bullet-tail">{{ authority.cited_opinion.cluster.date_filed }}</span>
</li>
{% endfor %}
</ul>
{% include 'includes/authorities_list.html' with authorities=authorities %}
</div>
</div>
{% endblock %}
22 changes: 1 addition & 21 deletions cl/opinion_page/templates/recap_authorities.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "recap_document.html" %}
{% load humanize %}
{% load text_filters %}

{% block nav-pdf %}{% endblock %}
{% block content-pdf %}{% endblock %}
Expand All @@ -12,26 +11,7 @@
<h3>This {{authorities_context.doc_type}} cites {{ authorities_context.total_authorities_count|intcomma }} opinion{{ authorities_context.total_authorities_count|pluralize }}.</h3>
<hr>
{# Westlaw's metadata organization: Checkbox, Treatment, Name + citation + summary, Date, Type, Depth #}
<ul>
{% for authority in authorities_context.full_list_authorities %}
<li>
{{ authority.depth }} reference{{ authority.depth|pluralize }} to
<a href="{{ authority.cited_opinion.cluster.get_absolute_url }}?{{ request.META.QUERY_STRING }}"
{% if authority.blocked %}rel="nofollow"{% endif %}>
{{ authority.cited_opinion.cluster.caption|safe|v_wrapper }}
</a>
<br/>
<span class="bullet-tail">{{ authority.cited_opinion.cluster.docket.court }}</span>
<span class="bullet-tail">{{ authority.cited_opinion.cluster.date_filed }}</span>
{% if authority.cited_opinion.cluster.citation_count > 1 %}
Also cited by <a href="/?q=cites%3A({{ authority.cited_opinion.cluster.sub_opinions.all|OR_join }})"
rel="nofollow">{{ authority.cited_opinion.cluster.citation_count|add:"-1" }} other opinion{{ authority.cited_opinion.cluster.citation_count|add:"-1"|pluralize }}</a>
{% else %}
Cited by 0 other opinions
{% endif %}
</li>
{% endfor %}
</ul>
{% include 'includes/authorities_list.html' with authorities=authorities_context.full_list_authorities %}
</div>
</div>

Expand Down

0 comments on commit b86f0ae

Please sign in to comment.