diff --git a/opentech/public/funds/templates/public_funds/blocks/related_projects.html b/opentech/public/funds/templates/public_funds/blocks/related_projects.html index a1a791e991778058d2f07ecebd60687b2ad1444d..d94e262fad8d41c494cc7f9f1d351beae9dfd800 100644 --- a/opentech/public/funds/templates/public_funds/blocks/related_projects.html +++ b/opentech/public/funds/templates/public_funds/blocks/related_projects.html @@ -1,3 +1,3 @@ -{% for project in page.projects %} - {% include "public_funds/includes/project_listing.html" with project=project %} +{% for funding in page.projectfunding_set.all %} + {% include "public_funds/includes/project_listing.html" with project=funding.page %} {% endfor %} diff --git a/opentech/public/funds/templates/public_funds/includes/project_listing.html b/opentech/public/funds/templates/public_funds/includes/project_listing.html index 0ff5422e2a71c5442863900d835cfbc15ba70eae..d66e58770c2d5656930e5e0931f75709eb424812 100644 --- a/opentech/public/funds/templates/public_funds/includes/project_listing.html +++ b/opentech/public/funds/templates/public_funds/includes/project_listing.html @@ -1 +1,9 @@ -<p>A PROJECT</p> +{% load wagtailcore_tags wagtailimages_tags %} +<article class="project"> + {% image project.icon %} + <h2><a href="{% pageurl project %}">{{ project.title }}</a></h2> + + {% if project.listing_summary or project.introduction %} + <p>{{ project.listing_summary|default:project.introduction }}</p> + {% endif %} +</article> diff --git a/opentech/people/templates/people/includes/person_listing.html b/opentech/public/people/templates/people/includes/person_listing.html similarity index 100% rename from opentech/people/templates/people/includes/person_listing.html rename to opentech/public/people/templates/people/includes/person_listing.html