Skip to content

Commit

Permalink
Merge pull request #4795 from freelawproject/4785-tweak-title-tags
Browse files Browse the repository at this point in the history
Small Front End UI Tweaks
  • Loading branch information
mlissner authored Dec 8, 2024
2 parents 697ba64 + b00a9af commit 0af3b8d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
7 changes: 5 additions & 2 deletions cl/opinion_page/templates/opinions.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<!-- Additional head content specific to this child template -->
<link rel="stylesheet" href="{% static "css/opinions.css" %}" type="text/css"
media="screen, projection">
{% if tab == "pdf" %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
{% endblock %}


Expand Down Expand Up @@ -212,7 +215,7 @@ <h3>
</div>
</div>

<div class="case-caption jump-link" id="caption">{{ cluster|best_case_name|safe }}</div>
<h1 class="case-caption jump-link" id="caption">{{ cluster|best_case_name|safe }}</h1>
<h4 class="case-court">{{ cluster.docket.court }}</h4>
<br>
<div class="case-details">
Expand Down Expand Up @@ -310,7 +313,7 @@ <h4 class="case-court">{{ cluster.docket.court }}</h4>
{% endif %}
{% if has_downloads and "pdf" in pdf_path or cluster.filepath_pdf_harvard %}
<li role="presentation" {% if tab == "pdf" %} class="active" {% endif %}>
<a href="{% url 'view_case_pdf' cluster.pk cluster.slug %}">PDF</a>
<a rel="nofollow" href="{% url 'view_case_pdf' cluster.pk cluster.slug %}">PDF</a>
</li>
{% endif %}
</ul>
Expand Down
19 changes: 9 additions & 10 deletions cl/opinion_page/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,16 +952,15 @@ async def setup_opinion_context(
:param tab: The tab to load
:return: The opinion page context used to generate the page
"""
title = ", ".join(
[
s
for s in [
trunc(best_case_name(cluster), 100, ellipsis="..."),
await cluster.acitation_string(),
]
if s.strip()
]
)
tab_intros = {
"authorities": "Authorities for ",
"cited-by": "Citations to ",
"related-cases": "Similar cases to ",
"summaries": "Summaries of ",
"pdf": "Download PDF for ",
}
tab_intro = tab_intros.get(tab, "")
title = f"{tab_intro}{trunc(best_case_name(cluster), 100, ellipsis='...')}"
has_downloads = False
pdf_path = None
if cluster.filepath_pdf_harvard:
Expand Down

0 comments on commit 0af3b8d

Please sign in to comment.