From b7250a44a6750fac1894121d1b682efed3078973 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Fri, 19 Jan 2018 17:52:37 +0000 Subject: [PATCH] add a link to the projects on the fund page --- .../public_funds/blocks/related_projects.html | 4 ++-- .../public_funds/includes/project_listing.html | 10 +++++++++- .../templates/people/includes/person_listing.html | 0 3 files changed, 11 insertions(+), 3 deletions(-) rename opentech/{ => public}/people/templates/people/includes/person_listing.html (100%) 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 a1a791e99..d94e262fa 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 0ff5422e2..d66e58770 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 -- GitLab