From 37aee6fc04eb027bc15984a4c0490bf99c21de49 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Mon, 3 Sep 2018 09:40:10 +0100 Subject: [PATCH] Prevent the projects from showing the open/closed message --- opentech/public/funds/models.py | 4 ++++ opentech/public/utils/templates/utils/listing_index.html | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/opentech/public/funds/models.py b/opentech/public/funds/models.py index 164e3cd03..ae9acb542 100644 --- a/opentech/public/funds/models.py +++ b/opentech/public/funds/models.py @@ -61,6 +61,8 @@ class BaseApplicationPage(BasePage): # Make sure all children use the shared template return 'public_funds/fund_page.html' + can_open = True + @property def is_open(self): return self.application_type and bool(self.application_type.specific.open_round) @@ -174,6 +176,8 @@ class LabPage(BasePage): context['rfps'] = self.get_children().live().public() return context + can_open = True + @property def is_open(self): try: diff --git a/opentech/public/utils/templates/utils/listing_index.html b/opentech/public/utils/templates/utils/listing_index.html index afc20088f..b64a97011 100644 --- a/opentech/public/utils/templates/utils/listing_index.html +++ b/opentech/public/utils/templates/utils/listing_index.html @@ -21,6 +21,7 @@ </div> {% endif %} + {% if subpage.can_open %} <p class="listing__deadline"> {% if subpage.is_open %} {% if subpage.deadline %} @@ -29,10 +30,11 @@ {% else %} Open {% endif %} - {% else %} + {% else %} Closed {% endif %} </p> + {% endif %} <h4 class="listing__title">{{ subpage.listing_title|default:subpage.title }}</h4> -- GitLab