From 6d46cc3e8b0d85abb1bed39e47d4614f14cd9e70 Mon Sep 17 00:00:00 2001 From: ss108 Date: Sat, 28 Oct 2023 14:09:09 -0700 Subject: [PATCH] show authorities on recap doc page, but without view all url --- cl/opinion_page/templates/includes/authorities_section.html | 2 ++ cl/opinion_page/views.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cl/opinion_page/templates/includes/authorities_section.html b/cl/opinion_page/templates/includes/authorities_section.html index 77560e0c99..09e5ce918a 100644 --- a/cl/opinion_page/templates/includes/authorities_section.html +++ b/cl/opinion_page/templates/includes/authorities_section.html @@ -21,11 +21,13 @@

Authorities ({{ authorities_context.total_authorities_count|intcomma } {% endfor %} + {% if authorities_context.view_all_authorities_url|length > 0 %}

View All Authorities

+ {% endif %} {% endif %} \ No newline at end of file diff --git a/cl/opinion_page/views.py b/cl/opinion_page/views.py index 779dca32c9..d6d55a68a5 100644 --- a/cl/opinion_page/views.py +++ b/cl/opinion_page/views.py @@ -626,7 +626,7 @@ def view_opinion(request: HttpRequest, pk: int, _: str) -> HttpResponse: "private": cluster.blocked, "citing_clusters": citing_clusters, "citing_cluster_count": citing_cluster_count, - "authorities_section_context": authorities_context, + "authorities_context": authorities_context, "top_parenthetical_groups": parenthetical_groups, "summaries_count": cluster.parentheticals.count(), "sub_opinion_ids": sub_opinion_ids, @@ -667,7 +667,7 @@ def view_summaries(request: HttpRequest, pk: int, slug: str) -> HttpResponse: ) -def view_authorities(request: HttpRequest, pk: int, slug: str) -> HttpResponse: +def view_authorities(request: HttpRequest, pk: int, slug: str, doc_type=0) -> HttpResponse: cluster = get_object_or_404(OpinionCluster, pk=pk) return TemplateResponse(