diff --git a/opentech/public/funds/models.py b/opentech/public/funds/models.py index 164e3cd03c9b3c0a3702d803e4b6d794b2518b29..ae9acb542881e9d31b26bbeba734fe00ecb0067d 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 afc20088f9408743d4c6761383e701993ef4d5d2..b64a97011ce01506e664bd73e426c29b31ab4954 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>