From 242e65a34629e1e0d1cdf642f4dff183c1545ed1 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 2 Oct 2024 18:14:11 +0100 Subject: [PATCH] WIP access session props form from Right of Reply page --- .../templates/crowdsourcer/authority_section_list.html | 3 +++ crowdsourcer/views/rightofreply.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/crowdsourcer/templates/crowdsourcer/authority_section_list.html b/crowdsourcer/templates/crowdsourcer/authority_section_list.html index edbe88b6..4905bfd6 100644 --- a/crowdsourcer/templates/crowdsourcer/authority_section_list.html +++ b/crowdsourcer/templates/crowdsourcer/authority_section_list.html @@ -8,6 +8,9 @@

Sign in

Sign in {% else %}

Sections

+ {% if has_properties %} + Props! + {% endif %} diff --git a/crowdsourcer/views/rightofreply.py b/crowdsourcer/views/rightofreply.py index a1d29203..beabb6ae 100644 --- a/crowdsourcer/views/rightofreply.py +++ b/crowdsourcer/views/rightofreply.py @@ -14,6 +14,7 @@ Response, ResponseType, Section, + SessionProperties, ) from crowdsourcer.views.base import BaseQuestionView @@ -127,6 +128,9 @@ def get_context_data(self, **kwargs): section.complete = 0 context["ror_user"] = True + context["has_properties"] = SessionProperties.objects.filter( + marking_session=self.request.current_session, stage=response_type + ).exists() return context