From 3611f95fe54d008c0297588173d912929d943fd5 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Tue, 25 Jun 2024 14:10:49 +0100 Subject: [PATCH] Fix party conditional I've also fixed an error with the conditional in the templates that was causing two regional manifestos to appear in some cases. This also adds the missing Welsh Conservative manifesto. --- .../templates/parties/regional_manifesto.html | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/wcivf/apps/parties/templates/parties/regional_manifesto.html b/wcivf/apps/parties/templates/parties/regional_manifesto.html index 36c65d010..e141a26da 100644 --- a/wcivf/apps/parties/templates/parties/regional_manifesto.html +++ b/wcivf/apps/parties/templates/parties/regional_manifesto.html @@ -1,44 +1,43 @@ {% load i18n %} -{% if party_name == "Labour Party" or "Labour and Co-operative Party" %} +{% if object.featured_candidacy.party_name == "Labour Party" or object.featured_candidacy.party_name == "Labour and Co-operative Party" %} {% if object.featured_candidacy.post_election.post.nice_territory == "Scotland" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Scotland. {% endblocktrans %}
  • {% endif %} - {% if object.featured_candidacy.post_election.post.nice_territory == "Wales" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Wales. {% endblocktrans %}
  • {% endif %} {% endif %} -{% if party_name == "Conservative and Unionist Party" or "Conservative Party" %} +{% if object.featured_candidacy.party_name == "Conservative and Unionist Party" or object.featured_candidacy.party_name == "Conservative Party" %} {% if object.featured_candidacy.post_election.post.nice_territory == "Scotland" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Scotland. {% endblocktrans %}
  • {% endif %} - {% comment %} {% if object.featured_candidacy.post_election.post.nice_territory == "Wales" %} + {% if object.featured_candidacy.post_election.post.nice_territory == "Wales" %}
  • {% blocktrans trimmed with party_name=party_name %} - The {{ party_name }} have also released a manifesto for Wales. + The {{ party_name }} have also released a manifesto for Wales. {% endblocktrans %}
  • - {% endif %} {% endcomment %} + {% endif %} {% endif %} {% if object.featured_candidacy.party_name == "Liberal Democrats" %} {% if object.featured_candidacy.post_election.post.nice_territory == "Scotland" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Scotland. {% endblocktrans %}
  • @@ -46,7 +45,7 @@ {% if object.featured_candidacy.post_election.post.nice_territory == "Wales" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Wales. {% endblocktrans %}
  • @@ -55,7 +54,7 @@ {% if object.featured_candidacy.party_name == "Green Party" %} {% if object.featured_candidacy.post_election.post.nice_territory == "Wales" %}
  • - {% blocktrans trimmed with party_name=party_name %} + {% blocktrans trimmed with party_name=object.featured_candidacy.party_name %} The {{ party_name }} have also released a manifesto for Wales. {% endblocktrans %}