From b2be30076773cb21c1975eb76aa4ac20ac38975a Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Fri, 16 Feb 2018 11:37:27 +0000
Subject: [PATCH] Update the listing to only show funds/labs with open rounds

---
 .../apply_home/includes/apply_listing.html    | 36 ++++++++++---------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/opentech/apply/home/templates/apply_home/includes/apply_listing.html b/opentech/apply/home/templates/apply_home/includes/apply_listing.html
index 1b459f7a6..2313bbda3 100644
--- a/opentech/apply/home/templates/apply_home/includes/apply_listing.html
+++ b/opentech/apply/home/templates/apply_home/includes/apply_listing.html
@@ -1,24 +1,26 @@
 {% load wagtailcore_tags %}
 
 {% with details=page.specific.detail.specific %}
-<div class="listing">
-    <h4 class="listing__title">
-        {# details may be None, so be more verbose in the handling of the title #}
-        {% if page.title %}
-            {{ page.title }}
-        {% else %}
-            {{ details.listing_title|default:details.title }}
-        {% endif %}
-    </h4>
+{% if page.specific.open_round %}
+    <div class="listing">
+        <h4 class="listing__title">
+            {# details may be None, so be more verbose in the handling of the title #}
+            {% if page.title %}
+                {{ page.title }}
+            {% else %}
+                {{ details.listing_title|default:details.title }}
+            {% endif %}
+        </h4>
 
-    {% if details.listing_summary or details.introduction %}
-        <h6 class="listing__teaser">{{ details.listing_summary|default:details.introduction|truncatechars_html:155 }}</h6>
-    {% endif %}
+        {% if details.listing_summary or details.introduction %}
+            <h6 class="listing__teaser">{{ details.listing_summary|default:details.introduction|truncatechars_html:155 }}</h6>
+        {% endif %}
 
-    {% if details %}
-        <a href="{% pageurl details %}">More info...</a>
-    {% endif %}
+        {% if details %}
+            <a href="{% pageurl details %}">More info...</a>
+        {% endif %}
 
-    <a class="" href="{% pageurl page %}">Apply</a>
-</div>
+        <a class="" href="{% pageurl page %}">Apply</a>
+    </div>
+{% endif %}
 {% endwith %}
-- 
GitLab