From 9fca772e19d5aa9bfd6a5d5d2000479217265ff2 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Tue, 9 Jan 2018 13:49:55 +0000 Subject: [PATCH] Add CTA for appluing and update page tempalte --- .../templates/publicpages/fund_page.html | 17 ++++++++++++++++- .../publicpages/includes/fund_apply_cta.html | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html diff --git a/opentech/publicpages/templates/publicpages/fund_page.html b/opentech/publicpages/templates/publicpages/fund_page.html index a59ea2936..c0a5492da 100644 --- a/opentech/publicpages/templates/publicpages/fund_page.html +++ b/opentech/publicpages/templates/publicpages/fund_page.html @@ -1 +1,16 @@ -{% extends "standardpages/information_page.html" %} +{% extends "base.html" %} +{% load wagtailcore_tags wagtailimages_tags navigation_tags static %} + +{% block content %} + {% include "publicpages/includes/fund_apply_cta.html" with fund_type=page.fund_type.specific %} + <div class="wrapper wrapper--flex"> + <section class="section section--main"> + <h1>{{ page.title }}</h1> + <h5>{{ page.introduction }}</h5> + + {% include_block page.body %} + </section> + </div> + {% include "publicpages/includes/fund_apply_cta.html" with fund_type=page.fund_type.specific %} + {% include "includes/relatedcontent.html" with related_pages=page.related_pages.all %} +{% endblock %} diff --git a/opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html b/opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html new file mode 100644 index 000000000..1f81aa425 --- /dev/null +++ b/opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html @@ -0,0 +1,18 @@ +{% load wagtailcore_tags i18n %} + +<div class="wrapper wrapper--flex"> + <div class="section section--apply-cta"> + {% if fund_type.deadline %} + <div class="deadline"> + {% trans "Next deadline" %}: {{ fund_type.deadline|date:"M j, Y" }} + </div> + <div class="apply-link"> + <a class="button" href="{% pageurl fund_type %}">{% trans "Apply for this fund" %}</a> + </div> + {% else %} + <div class="deadline"> + {% trans "CLOSED" %} + </div> + {% endif %} + </div> +</div> -- GitLab