From 8e767db00f9cc7ff9d6e44a176cccd70ba21152a Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Fri, 31 Aug 2018 20:59:25 +0100
Subject: [PATCH] Add open/closed state to funds and labs in the listing

---
 .../utils/templates/utils/listing_index.html       | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/opentech/public/utils/templates/utils/listing_index.html b/opentech/public/utils/templates/utils/listing_index.html
index 241139062..afc20088f 100644
--- a/opentech/public/utils/templates/utils/listing_index.html
+++ b/opentech/public/utils/templates/utils/listing_index.html
@@ -21,12 +21,18 @@
                         </div>
                     {% endif %}
 
-                    {% if subpage.deadline %}
                         <p class="listing__deadline">
-                            <svg class="icon icon--calendar icon--small"><use xlink:href="#calendar"></use></svg>
-                            <span>Next deadline: {{ subpage.deadline|date:"M j, Y" }}</span>
+                            {% if subpage.is_open %}
+                                {% if subpage.deadline %}
+                                    <svg class="icon icon--calendar icon--small"><use xlink:href="#calendar"></use></svg>
+                                    <span>Next deadline: {{ subpage.deadline|date:"M j, Y" }}</span>
+                                {% else %}
+                                    Open
+                                {% endif %}
+                             {% else %}
+                                Closed
+                            {% endif %}
                         </p>
-                    {% endif %}
 
                     <h4 class="listing__title">{{ subpage.listing_title|default:subpage.title }}</h4>
 
-- 
GitLab