- {% trans "This candidate has been deselected by their party, but will remain on the ballot paper." %}
+ {% trans "This candidate has been deselected by their party, but their original party description will remain on the ballot paper." %}
{% trans "Learn more" %}.
{% endif %}
diff --git a/wcivf/apps/people/templates/people/includes/_person_intro_card.html b/wcivf/apps/people/templates/people/includes/_person_intro_card.html
index c5fc5497a..386e3ba78 100644
--- a/wcivf/apps/people/templates/people/includes/_person_intro_card.html
+++ b/wcivf/apps/people/templates/people/includes/_person_intro_card.html
@@ -37,7 +37,7 @@
- {% trans "This candidate has been deselected by their party, but will remain on the ballot paper." %}
+ {% trans "This candidate has been deselected by their party, but their original party description will remain on the ballot paper." %}
{% trans "Learn more" %}.
{% endif %}
diff --git a/wcivf/apps/people/tests/test_person_views.py b/wcivf/apps/people/tests/test_person_views.py
index 23be57d45..54e908b1b 100644
--- a/wcivf/apps/people/tests/test_person_views.py
+++ b/wcivf/apps/people/tests/test_person_views.py
@@ -681,7 +681,7 @@ def test_deselected(self):
response = self.client.get(self.person_url, follow=True)
self.assertContains(
response,
- "This candidate has been deselected by their party, but will remain on the ballot paper.",
+ "This candidate has been deselected by their party, but their original party description will remain on the ballot paper.",
)
self.assertContains(response, "www.candidate-party-page.co.uk")
@@ -690,7 +690,7 @@ def test_deselected(self):
)
self.assertContains(
response,
- "This candidate has been deselected by their party, but will remain on the ballot paper.",
+ "This candidate has been deselected by their party, but their original party description will remain on the ballot paper.",
)
self.assertContains(response, "www.candidate-party-page.co.uk")
From 21822ead6e6a9cac3e65d93d15a23362ba1e3fff Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Thu, 2 May 2024 16:57:10 +0100
Subject: [PATCH 07/12] No results data for STV or SV
---
locale/en/LC_MESSAGES/django.po | 8 +-
wcivf/apps/people/models.py | 5 +-
.../_person_previous_elections_card.html | 8 +-
wcivf/apps/people/tests/test_person_views.py | 125 +++++++++++++++---
4 files changed, 123 insertions(+), 23 deletions(-)
diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po
index c62f1e860..0251bf30d 100644
--- a/locale/en/LC_MESSAGES/django.po
+++ b/locale/en/LC_MESSAGES/django.po
@@ -1715,15 +1715,15 @@ msgstr ""
msgid "Position"
msgstr ""
-#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:43
+#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:30
msgid "We do not collect voting data for Supplementary Vote elections."
msgstr ""
-#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:45
-msgid "We do not collect voting data for Single Transferable Vote election"
+#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:32
+msgid "We do not collect voting data for Single Transferable Vote elections."
msgstr ""
-#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:47
+#: wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html:48
msgid "Position not available"
msgstr ""
diff --git a/wcivf/apps/people/models.py b/wcivf/apps/people/models.py
index 8940f093d..fdccc5c96 100644
--- a/wcivf/apps/people/models.py
+++ b/wcivf/apps/people/models.py
@@ -138,9 +138,10 @@ def get_results_rank(self):
].votes_cast
):
return f"Joint {ordinal(candidate.rank)} / {candidate_count} candidates"
-
+ if candidate_count > 1:
+ return f"{ordinal(candidate.rank)} / {candidate_count} candidates"
return (
- f"{ordinal(candidate.rank)} / {candidate_count} candidates"
+ f"{ordinal(candidate.rank)} / {candidate_count} candidate"
)
return None
diff --git a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html
index 966a5f26c..803e8b615 100644
--- a/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html
+++ b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html
@@ -26,7 +26,13 @@
{{ person_post.party_name }} |
- {{ person_post.get_results_text }}
+ {% if person_post.election.voting_system.slug == "sv" %}
+ {% trans "We do not collect voting data for Supplementary Vote elections." %}
+ {% elif person_post.election.voting_system.slug == "STV" %}
+ {% trans "We do not collect voting data for Single Transferable Vote elections." %}
+ {% else %}
+ {{ person_post.get_results_text }}
+ {% endif %}
|
{% if object.previous_party_count %}
diff --git a/wcivf/apps/people/tests/test_person_views.py b/wcivf/apps/people/tests/test_person_views.py
index 54e908b1b..5dfd6cb4e 100644
--- a/wcivf/apps/people/tests/test_person_views.py
+++ b/wcivf/apps/people/tests/test_person_views.py
@@ -4,9 +4,9 @@
from django.test import TestCase
from django.test.utils import override_settings
from django.utils.html import strip_tags
+from elections.models import VotingSystem
from elections.tests.factories import (
ElectionFactory,
- ElectionFactoryLazySlug,
ElectionWithPostFactory,
PostElectionFactory,
PostFactory,
@@ -319,6 +319,114 @@ def test_no_previous_party_affiliations(self):
"has declared their affiliation with the following parties in the past 12 months",
)
+ def test_previous_elections_card(self):
+ """Test that the postcode search results have a
+ table of previous elections. In that table, the
+ election name, date and slug should be displayed
+ as well as vote count, position and party for each
+ ballot for the candidate
+ """
+ past_election = ElectionFactory(
+ name="Welsh Assembly Election",
+ current=False,
+ election_date="2021-05-01",
+ slug="local.welsh.assembly.2021-05-01",
+ )
+ past_post_election = PostElectionFactory(
+ election=past_election,
+ post=PostFactory(label="Welsh Assembly", territory="WLS"),
+ ballot_paper_id="local.welsh.assembly.2021-05-01",
+ voting_system=VotingSystem(slug="FPTP"),
+ )
+ party = PartyFactory(
+ party_name="Conservative and Unionist Party",
+ party_id="party:52",
+ )
+ PersonPostFactory(
+ person=self.person,
+ post_election=past_post_election,
+ election=past_election,
+ party=party,
+ votes_cast=1000,
+ )
+ response = self.client.get(self.person_url, follow=True)
+ self.assertTemplateUsed(
+ "people/includes/_person_previous_elections_card.html"
+ )
+ self.assertContains(response, "2021")
+ self.assertContains(response, "Welsh Assembly: Welsh Assembly Election")
+ self.assertContains(response, "1,000 votes (not elected)")
+ self.assertContains(response, """1st / 1 candidate""")
+
+ def test_previous_elections_card_for_STV(self):
+ """Test that the postcode search results have a
+ table of previous elections with the text:
+ 'We do not collect voting data for
+ Single Transferable Vote election.'"""
+ past_election = ElectionFactory(
+ name="Welsh Assembly Election",
+ current=False,
+ election_date="2021-05-01",
+ slug="local.welsh.assembly.2021-05-01",
+ voting_system=VotingSystem(slug="STV"),
+ )
+
+ past_post_election = PostElectionFactory(
+ election=past_election,
+ post=PostFactory(label="Welsh Assembly", territory="WLS"),
+ ballot_paper_id="local.welsh.assembly.2021-05-01",
+ )
+ party = PartyFactory(party_name="Liberal Democrat", party_id="foo")
+ PersonPostFactory(
+ person=self.person,
+ post_election=past_post_election,
+ election=past_election,
+ party=party,
+ )
+ response = self.client.get(self.person_url, follow=True)
+ self.assertTemplateUsed(
+ "people/includes/_person_previous_elections_card.html"
+ )
+ self.assertContains(
+ response,
+ """We do not collect voting data for Single Transferable Vote elections.""",
+ html=True,
+ )
+
+ def test_previous_elections_card_for_sv(self):
+ """Test that the postcode search results have a
+ table of previous elections with the text:
+ "We do not collect voting data for Supplementary Vote elections."
+ """
+ past_election = ElectionFactory(
+ name="Welsh Assembly Election",
+ current=False,
+ election_date="2021-05-01",
+ slug="local.welsh.assembly.2021-05-01",
+ voting_system=VotingSystem(slug="sv"),
+ )
+ past_post_election = PostElectionFactory(
+ election=past_election,
+ post=PostFactory(label="Welsh Assembly", territory="WLS"),
+ ballot_paper_id="local.welsh.assembly.2021-05-01",
+ )
+ party = PartyFactory(party_name="Liberal Democrat", party_id="foo")
+ PersonPostFactory(
+ person=self.person,
+ post_election=past_post_election,
+ election=past_election,
+ party=party,
+ )
+ response = self.client.get(self.person_url, follow=True)
+ self.assertTemplateUsed(
+ "people/includes/_person_previous_elections_card.html"
+ )
+ self.assertContains(
+ response,
+ """We do not collect voting data for Supplementary Vote elections.""",
+ html=True,
+ )
+
def test_previous_party_affiliations_in_past_elections_table(self):
"""This is a test for current previous party affiliations in the
previous elections table"""
@@ -362,21 +470,6 @@ def test_previous_party_affiliations_in_past_elections_table(self):
)
self.assertContains(response, "Conservative, Labour", html=True)
- def test_previous_elections(self):
- past_election = ElectionFactoryLazySlug(
- election_date="2019-05-02", current=False
- )
- party = PartyFactory(party_name="Liberal Democrat", party_id="foo")
- PersonPostFactory(
- person=self.person,
- post_election__election=past_election,
- election=past_election,
- party=party,
- votes_cast=1000,
- )
- response = self.client.get(self.person_url, follow=True)
- self.assertContains(response, f"{self.person.name}'s elections")
-
def test_no_statement_to_voters(self):
PersonPostWithPartyFactory(
person=self.person, election=ElectionFactory()
From ad3575812e747e91920f008f2f75569bff268181 Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Thu, 2 May 2024 18:03:07 +0100
Subject: [PATCH 08/12] Keep details open by default
---
wcivf/apps/elections/templates/elections/ams.html | 6 ++++--
.../templates/elections/includes/_registration_details.html | 2 +-
.../elections/templates/elections/includes/_voter_id.html | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/wcivf/apps/elections/templates/elections/ams.html b/wcivf/apps/elections/templates/elections/ams.html
index 25e5b4865..c77b15f9e 100644
--- a/wcivf/apps/elections/templates/elections/ams.html
+++ b/wcivf/apps/elections/templates/elections/ams.html
@@ -30,7 +30,8 @@ The Additional Member System
want them elected, and voters get no choice over this order
(this is known as a 'closed list').
-
+
+
Seat allocation
The overall number of constituency seats that a party wins will have
an effect on how many regional representatives it is allocated.
@@ -49,6 +50,8 @@ Seat allocation
after the above formula has been applied.
+
+
Example election
In the 2016 West Scotland region, the result for the major parties was
@@ -171,7 +174,6 @@
15,091.
-
{% endblock content %}
diff --git a/wcivf/apps/elections/templates/elections/includes/_registration_details.html b/wcivf/apps/elections/templates/elections/includes/_registration_details.html
index 65db904ca..d14d798c8 100644
--- a/wcivf/apps/elections/templates/elections/includes/_registration_details.html
+++ b/wcivf/apps/elections/templates/elections/includes/_registration_details.html
@@ -3,7 +3,7 @@
{% load humanize %}
-
+
diff --git a/wcivf/apps/elections/templates/elections/includes/_voter_id.html b/wcivf/apps/elections/templates/elections/includes/_voter_id.html
index 62f53cbb1..340dfb37e 100644
--- a/wcivf/apps/elections/templates/elections/includes/_voter_id.html
+++ b/wcivf/apps/elections/templates/elections/includes/_voter_id.html
@@ -4,7 +4,7 @@
{% load i18n %}
-
+
️
From 6ae917d64e17445b715a7db10f2df5773b3dad3f Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Thu, 2 May 2024 18:33:31 +0100
Subject: [PATCH 09/12] Clean up formatting on voting system pages
- Add page titles
- Fix breadcrumbs
- Separate sections with more spacing
---
.../elections/templates/elections/ams.html | 8 +-
.../elections/templates/elections/ams_cy.html | 199 ++++++++++--------
.../elections/templates/elections/fptp.html | 8 +-
.../templates/elections/fptp_cy.html | 14 +-
.../elections/templates/elections/stv.html | 7 +
.../elections/templates/elections/stv_cy.html | 8 +-
.../elections/templates/elections/sv.html | 8 +-
.../elections/templates/elections/sv_cy.html | 15 +-
8 files changed, 170 insertions(+), 97 deletions(-)
diff --git a/wcivf/apps/elections/templates/elections/ams.html b/wcivf/apps/elections/templates/elections/ams.html
index c77b15f9e..9dbc90358 100644
--- a/wcivf/apps/elections/templates/elections/ams.html
+++ b/wcivf/apps/elections/templates/elections/ams.html
@@ -2,10 +2,16 @@
{% load markdown_filter %}
{% load humanize %}
{% load i18n %}
+{% block page_title %}The Additional Member System{% endblock page_title %}
+{% block og_title_content %}The Additional Member System{% endblock og_title_content %}
+{% block og_description_content %}
+ The Additional Member System{% endblock og_description_content %}
+{% block twitter_title_content %}The Additional Member System{% endblock twitter_title_content %}
+{% block twitter_description_content %}The Additional Member System{% endblock twitter_description_content %}
{% block content %}
- {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="The Additional Member System" %}
diff --git a/wcivf/apps/elections/templates/elections/ams_cy.html b/wcivf/apps/elections/templates/elections/ams_cy.html
index cb8612962..32d3e79a8 100755
--- a/wcivf/apps/elections/templates/elections/ams_cy.html
+++ b/wcivf/apps/elections/templates/elections/ams_cy.html
@@ -1,4 +1,16 @@
-{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+{% extends "base.html" %}
+{% load markdown_filter %}
+{% load humanize %}
+{% load i18n %}
+
+{% block page_title %}Y System Aelodau Ychwanegol{% endblock page_title %}
+{% block og_title_content %}Y System Aelodau Ychwanegol{% endblock og_title_content %}
+{% block og_description_content %}Y System Aelodau Ychwanegol{% endblock og_description_content %}
+{% block twitter_title_content %}Y System Aelodau Ychwanegol{% endblock twitter_title_content %}
+{% block twitter_description_content %}Y System Aelodau Ychwanegol{% endblock twitter_description_content %}
+
+{% block content %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Y System Aelodau Ychwanegol" %}
@@ -12,7 +24,8 @@ Y System Aelodau Ychwanegol
Er enghraifft, bydd pleidleisiwr yn Paisley yn yr Alban yn derbyn papur pleidleisio sy'n rhestru'r holl ymgeiswyr sydd am gynrychioli Paisley yn Senedd yr Alban. Byddan nhw hefyd yn cael papur pleidleisio sy'n rhestru'r pleidiau a/neu ymgeiswyr annibynnol sy'n sefyll am y saith sedd ar gyfer Gorllewin yr Alban. Mae'r ymgeiswyr ar y papur pleidleisio rhanbarthol yn cael eu rhestru yn y drefn y mae eu pleidiau gwleidyddol am iddyn nhw gael eu hethol, ac nid yw pleidleiswyr yn cael unrhyw ddewis dros y drefn hon (gelwir hyn yn 'restr gaeedig').
-
+
+
Dyrannu seddau
Bydd nifer cyffredinol y seddi etholaethol y mae plaid yn eu hennill yn cael effaith ar faint o gynrychiolwyr rhanbarthol a ddyrennir i’r blaid honno.
Bwriad hyn yw dod â nifer y seddi a enillir gan blaid yn nes at y ganran o’r bleidlais gyffredinol a dderbyniwyd ganddyn nhw yn y rhanbarth.
@@ -24,100 +37,104 @@ Dyrannu seddau
Dyrennir seddi ar ôl rowndiau cyfrif. Y pleidiau sydd â’r nifer uchaf o bleidleisiau ar ôl cymhwyso’r fformiwla uchod sy’n ennill y seddau rhanbarthol.
+
+
Enghraifft o etholiad
Yn rhanbarth Gorllewin yr Alban 2016, roedd canlyniadau’r prif bleidiau oedd fel a ganlyn (gyda chyfanswm y cwota pleidleisio ar gyfer rowndiau dilynol mewn cromfachau):
-
-
-
-
- Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016
-
-
-
-
- Plaid |
- Seddi etholaethol a enillwyd (cyfanswm o 10) |
- Pleidleisiau a enillwyd |
- Cwota rownd gyntaf |
- Cwota'r ail rownd |
- Cwota'r drydedd rownd |
- Cwota'r bedwaredd rownd |
- Cwota'r bumed rownd |
- Cwota'r chweched rownd |
- Cwota'r seithfed rownd |
- Seddi Rhanbarthol a Enillwyd |
-
-
- SNP |
- 8 |
- 135,827 |
- 15,091 |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- 0 |
-
-
- Llafur |
- 1 |
- 72,544 |
- 36,272 (etholwyd) |
- 24,181 |
- 18,136 |
- Dim newid (etholwyd) |
- Dim newid |
- Dim newid (etholwyd) |
- Dim newi |
- 3 |
-
-
- Ceidwadwyr |
- 1 |
- 71,528 |
- 35,764 |
- Dim newid (etholwyd) |
- 23,842 (etholwyd) |
- 17,882 |
- Dim newid (etholwyd) |
- 3,576 |
- Dim newid |
- 3 |
-
-
- Y Blaid Werdd |
- 0 |
- 17,218 |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid (etholwyd) |
- 1 |
-
-
- Dem. Rhydd. |
- 0 |
- 12,097 |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- Dim newid |
- 0 |
-
+
+
+
+
+
+ Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016
+
+
+
+
+ Plaid |
+ Seddi etholaethol a enillwyd (cyfanswm o 10) |
+ Pleidleisiau a enillwyd |
+ Cwota rownd gyntaf |
+ Cwota'r ail rownd |
+ Cwota'r drydedd rownd |
+ Cwota'r bedwaredd rownd |
+ Cwota'r bumed rownd |
+ Cwota'r chweched rownd |
+ Cwota'r seithfed rownd |
+ Seddi Rhanbarthol a Enillwyd |
+
+
+ SNP |
+ 8 |
+ 135,827 |
+ 15,091 |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ 0 |
+
+
+ Llafur |
+ 1 |
+ 72,544 |
+ 36,272 (etholwyd) |
+ 24,181 |
+ 18,136 |
+ Dim newid (etholwyd) |
+ Dim newid |
+ Dim newid (etholwyd) |
+ Dim newi |
+ 3 |
+
+
+ Ceidwadwyr |
+ 1 |
+ 71,528 |
+ 35,764 |
+ Dim newid (etholwyd) |
+ 23,842 (etholwyd) |
+ 17,882 |
+ Dim newid (etholwyd) |
+ 3,576 |
+ Dim newid |
+ 3 |
+
+
+ Y Blaid Werdd |
+ 0 |
+ 17,218 |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid (etholwyd) |
+ 1 |
+
+
+ Dem. Rhydd. |
+ 0 |
+ 12,097 |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ Dim newid |
+ 0 |
+
-
-
-
+
+
+
+
Er mai'r SNP enillodd y nifer fwyaf o bleidleisiau, gan eu bod wedi ennill wyth allan o'r deg sedd etholaethol, roedd eu cwota o 15,092, yn is na bron pob un o'r pleidiau eraill.
O ganlyniad, ni chawson nhw unrhyw seddi rhanbarthol.
diff --git a/wcivf/apps/elections/templates/elections/fptp.html b/wcivf/apps/elections/templates/elections/fptp.html
index 476bd3a39..7db22ee9b 100644
--- a/wcivf/apps/elections/templates/elections/fptp.html
+++ b/wcivf/apps/elections/templates/elections/fptp.html
@@ -3,9 +3,15 @@
{% load humanize %}
{% load i18n %}
+{% block page_title %}First-past-the-post (FPTP){% endblock page_title %}
+{% block og_title_content %}YFirst-past-the-post (FPTP){% endblock og_title_content %}
+{% block og_description_content %}YFirst-past-the-post (FPTP){% endblock og_description_content %}
+{% block twitter_title_content %}YFirst-past-the-post (FPTP){% endblock twitter_title_content %}
+{% block twitter_description_content %}YFirst-past-the-post (FPTP){% endblock twitter_description_content %}
+
{% block content %}
- {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="First-past-the-post (FPTP)"%}
diff --git a/wcivf/apps/elections/templates/elections/fptp_cy.html b/wcivf/apps/elections/templates/elections/fptp_cy.html
index caba4c341..fd4722550 100755
--- a/wcivf/apps/elections/templates/elections/fptp_cy.html
+++ b/wcivf/apps/elections/templates/elections/fptp_cy.html
@@ -1,4 +1,16 @@
-{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+{% extends "base.html" %}
+{% load markdown_filter %}
+{% load humanize %}
+{% load i18n %}
+
+{% block page_title %}Cyntaf i'r felin (FPTP){% endblock page_title %}
+{% block og_title_content %}Cyntaf i'r felin (FPTP){% endblock og_title_content %}
+{% block og_description_content %}Cyntaf i'r felin (FPTP){% endblock og_description_content %}
+{% block twitter_title_content %}Cyntaf i'r felin (FPTP){% endblock twitter_title_content %}
+{% block twitter_description_content %}Cyntaf i'r felin (FPTP){% endblock twitter_description_content %}
+
+{% block content %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Cyntaf i'r felin (FPTP)"%}
diff --git a/wcivf/apps/elections/templates/elections/stv.html b/wcivf/apps/elections/templates/elections/stv.html
index 45669cab9..1f6b0148d 100644
--- a/wcivf/apps/elections/templates/elections/stv.html
+++ b/wcivf/apps/elections/templates/elections/stv.html
@@ -3,6 +3,13 @@
{% load humanize %}
{% load i18n %}
+{% block page_title %}Single Transferable Vote (STV){% endblock page_title %}
+{% block og_title_content %}Single Transferable Vote (STV){% endblock og_title_content %}
+{% block og_description_content %}Single Transferable Vote (STV){% endblock og_description_content %}
+{% block twitter_title_content %}Single Transferable Vote (STV){% endblock twitter_title_content %}
+{% block twitter_description_content %}Single Transferable Vote (STV){% endblock twitter_description_content %}
+
+
{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" %}
diff --git a/wcivf/apps/elections/templates/elections/stv_cy.html b/wcivf/apps/elections/templates/elections/stv_cy.html
index d45e3d2df..bdb8aa922 100644
--- a/wcivf/apps/elections/templates/elections/stv_cy.html
+++ b/wcivf/apps/elections/templates/elections/stv_cy.html
@@ -3,8 +3,14 @@
{% load humanize %}
{% load i18n %}
+{% block page_title %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock page_title %}
+{% block og_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_title_content %}
+{% block og_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_description_content %}
+{% block twitter_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_title_content %}
+{% block twitter_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_description_content %}
+
{% block content %}
- {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Sengl Drosglwyddadwy (PSD)"%}
diff --git a/wcivf/apps/elections/templates/elections/sv.html b/wcivf/apps/elections/templates/elections/sv.html
index 148c33f0a..687afcade 100644
--- a/wcivf/apps/elections/templates/elections/sv.html
+++ b/wcivf/apps/elections/templates/elections/sv.html
@@ -3,9 +3,15 @@
{% load humanize %}
{% load i18n %}
+{% block page_title %}Supplementary Vote{% endblock page_title %}
+{% block og_title_content %}Supplementary Vote{% endblock og_title_content %}
+{% block og_description_content %}Supplementary Vote{% endblock og_description_content %}
+{% block twitter_title_content %}Supplementary Vote{% endblock twitter_title_content %}
+{% block twitter_description_content %}Supplementary Vote{% endblock twitter_description_content %}
+
{% block content %}
- {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Supplementary Vote" %}
diff --git a/wcivf/apps/elections/templates/elections/sv_cy.html b/wcivf/apps/elections/templates/elections/sv_cy.html
index a9c670527..beb1cdccc 100755
--- a/wcivf/apps/elections/templates/elections/sv_cy.html
+++ b/wcivf/apps/elections/templates/elections/sv_cy.html
@@ -1,4 +1,17 @@
-{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
+{% extends "base.html" %}
+{% load markdown_filter %}
+{% load humanize %}
+{% load i18n %}
+
+{% block page_title %}Pleidlais Atodol{% endblock page_title %}
+{% block og_title_content %}Pleidlais Atodol{% endblock og_title_content %}
+{% block og_description_content %}Pleidlais Atodol{% endblock og_description_content %}
+{% block twitter_title_content %}Pleidlais Atodol{% endblock twitter_title_content %}
+{% block twitter_description_content %}Pleidlais Atodol{% endblock twitter_description_content %}
+
+
+{% block content %}
+ {% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Atodol" %}
From 44ad2f0bc7ea7f8c73dafe47912280db5b354af8 Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Thu, 2 May 2024 20:00:07 +0100
Subject: [PATCH 10/12] Update EC link to learn about elections
---
locale/cy/LC_MESSAGES/django.po | 10 +++-------
locale/en/LC_MESSAGES/django.po | 4 ++--
.../templates/elections/includes/_how-to-vote.html | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po
index 9dfbfc8d2..747bb9ac2 100644
--- a/locale/cy/LC_MESSAGES/django.po
+++ b/locale/cy/LC_MESSAGES/django.po
@@ -1021,18 +1021,14 @@ msgstr ""
#: wcivf/apps/elections/templates/elections/includes/inline_elections_nav_list.html:7
#, fuzzy
-#| msgid ""
-#| "For more information, visit The Electoral Commission's website"
-#| "a> or ask an official at your polling station."
msgid ""
"Learn more about elections in the UK on the Electoral "
+"electoralcommission.org.uk/i-am-a/voter/\">on the Electoral "
"Commission website."
msgstr ""
"Am fwy o wybodaeth, ewch i Wefan y Comisiwn Etholiadol neu gofynnwch i swyddog yn "
-"eich gorsaf bleidleisio."
+"am-a/voter/\">Wefan y Comisiwn Etholiadol neu "
+"gofynnwch i swyddog yn eich gorsaf bleidleisio."
#: wcivf/apps/elections/templates/elections/includes/inline_elections_nav_list.html:11
msgid "Select your address"
diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po
index 0251bf30d..162efc8e6 100644
--- a/locale/en/LC_MESSAGES/django.po
+++ b/locale/en/LC_MESSAGES/django.po
@@ -315,8 +315,8 @@ msgstr ""
#: wcivf/apps/elections/templates/elections/includes/_how-to-vote.html:84
msgid ""
"For more information, visit The Electoral Commission's website or ask an official at "
-"your polling station."
+"i-am-a/voter/\">The Electoral Commission's website or "
+"ask an official at your polling station."
msgstr ""
#: wcivf/apps/elections/templates/elections/includes/_people_list_with_lists.html:15
diff --git a/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html b/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html
index 5cf273187..803f622a6 100644
--- a/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html
+++ b/wcivf/apps/elections/templates/elections/includes/_how-to-vote.html
@@ -81,7 +81,7 @@
{% endif %}
{% blocktrans trimmed %}Read the instructions at the top of your ballot paper carefully.{% endblocktrans %}
- {% blocktrans trimmed %}For more information, visit The Electoral Commission's website or ask an official at your polling station.{% endblocktrans %}
+ {% blocktrans trimmed %}For more information, visit The Electoral Commission's website or ask an official at your polling station.{% endblocktrans %}
From d262cd35d914b93390a7616f2c369c1073c57101 Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Wed, 8 May 2024 14:53:06 +0100
Subject: [PATCH 11/12] Customise Dummy PostElection
---
wcivf/apps/elections/dummy_models.py | 21 ++++++++++---
wcivf/apps/elections/views/postcode_view.py | 33 +++++++++++++++++++--
2 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/wcivf/apps/elections/dummy_models.py b/wcivf/apps/elections/dummy_models.py
index bb2d056d6..4bf83b778 100644
--- a/wcivf/apps/elections/dummy_models.py
+++ b/wcivf/apps/elections/dummy_models.py
@@ -1,21 +1,32 @@
from datetime import date
from random import randint
-from elections.models import Election, Post, PostElection
+from elections.models import Election, Post, PostElection, VotingSystem
from people.dummy_models import DummyCandidacy, DummyPerson
class DummyPostElection(PostElection):
party_ballot_count = 5
display_as_party_list = False
+ locked = True
+ voting_system_id = "FPTP"
+ ballot_paper_id = "local.faketown.made-up-ward.2024-07-04"
+ cancelled = False
+ show_polling_card = True
+ contested = True
+ requires_voter_id = "EA-2022"
election = Election(
name="Llantalbot local election",
- election_date=date(2022, 5, 5),
+ election_date=date(2024, 7, 4),
any_non_by_elections=True,
- slug="local.faketown.2022-05-05",
+ slug="local.faketown.2024-07-04",
+ voting_system=VotingSystem(slug="FPTP"),
+ current=True,
)
+
post = Post(label="Made-Up-Ward")
+ post.territory = "ENG"
pk = randint(1, 100000)
class Meta:
@@ -23,7 +34,7 @@ class Meta:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- self.ballot_paper_id = "local.faketown.made-up-ward.2022-05-05"
+ self.ballot_paper_id = "local.faketown.made-up-ward.2024-07-04"
self.election.get_absolute_url = self.election_get_absolute_url
def election_get_absolute_url(self):
@@ -37,6 +48,8 @@ def people(self):
),
election=self.election,
party_name="Yellow Party",
+ deselected=True,
+ deselected_source="www.google.com",
),
DummyCandidacy(
person=DummyPerson(
diff --git a/wcivf/apps/elections/views/postcode_view.py b/wcivf/apps/elections/views/postcode_view.py
index bf7fc1650..13286da01 100644
--- a/wcivf/apps/elections/views/postcode_view.py
+++ b/wcivf/apps/elections/views/postcode_view.py
@@ -319,6 +319,7 @@ def get(self, request, *args, **kwargs):
class DummyPostcodeView(PostcodeView):
postcode = None
+ uprn = None
def get(self, request, *args, **kwargs):
kwargs["postcode"] = self.postcode
@@ -329,12 +330,40 @@ def get_context_data(self, **kwargs):
context = kwargs
self.postcode = clean_postcode(kwargs["postcode"])
context["postcode"] = self.postcode
+ self.uprn = self.kwargs.get("uprn")
+ context["uprn"] = self.uprn
+
context["postelections"] = self.get_ballot_dict()
context["show_polling_card"] = True
- context["polling_station"] = {}
+ context["polling_station"] = self.get_polling_station()
+ context["requires_voter_id"] = "EA-2022"
context["num_ballots"] = 1
-
return context
def get_ballot_dict(self):
return [DummyPostElection()]
+
+ def get_polling_station(self):
+ return {
+ "polling_station_known": True,
+ "custom_finder": False,
+ "report_problem_url": "http://wheredoivote.co.uk/report_problem/?source=testing&source_url=testing",
+ "station": {
+ "id": "w06000015.QK",
+ "type": "Feature",
+ "geometry": {
+ "type": "Point",
+ "coordinates": [-3.119229, 51.510885],
+ },
+ "properties": {
+ "address": "1 Made Up Street\nMade Up Town\nMade Up County",
+ "postcode": "MA1 1AA",
+ },
+ },
+ "geometry": {
+ "coordinates": [-0.127758, 51.507351],
+ },
+ "properties": {
+ "address": "1 Made Up Street\nMade Up Town\nMade Up County",
+ },
+ }
From d2d38231ca4fdf0c86c8de3b8b58d60f12f65944 Mon Sep 17 00:00:00 2001
From: Virginia Dooley
Date: Tue, 21 May 2024 13:02:48 +0100
Subject: [PATCH 12/12] Remove duplicate translations
---
locale/cy/LC_MESSAGES/django.po | 33 ---------------------------------
locale/en/LC_MESSAGES/django.po | 5 -----
2 files changed, 38 deletions(-)
diff --git a/locale/cy/LC_MESSAGES/django.po b/locale/cy/LC_MESSAGES/django.po
index 747bb9ac2..06bc1fb53 100644
--- a/locale/cy/LC_MESSAGES/django.po
+++ b/locale/cy/LC_MESSAGES/django.po
@@ -2589,14 +2589,6 @@ msgstr ""
"Rydym yn casglu canlyniadau wrth iddynt gael eu cyhoeddi. Gwiriwch yn ôl yn "
"nes ymlaen."
-#: wcivf/templates/base.html:103
-msgid "All Parties"
-msgstr "Pob plaid"
-
-#: wcivf/templates/base.html:104
-msgid "Standing as a candidate?"
-msgstr "Sefyll fel ymgeisydd?"
-
#: wcivf/templates/base.html:105
#, python-format
msgid "About %(SITE_TITLE)s"
@@ -2637,31 +2629,6 @@ msgstr "Pob plaid"
msgid "Standing as a candidate?"
msgstr "Sefyll fel ymgeisydd?"
-#: wcivf/templates/base.html:105
-#, python-format
-msgid "About %(SITE_TITLE)s"
-msgstr "Ynglŷn %(SITE_TITLE)s"
-
-#: wcivf/templates/base.html:106
-msgid "Privacy"
-msgstr "Preifatrwydd"
-
-#: wcivf/templates/base.html:107
-msgid "Source code"
-msgstr "Cod ffynhonnell"
-
-#: wcivf/templates/base.html:108
-msgid "About Democracy Club"
-msgstr "Ynglŷn â'r Clwb Democratiaeth"
-
-#: wcivf/templates/base.html:109
-msgid "Contact Us"
-msgstr "Cysylltwch â Ni"
-
-#: wcivf/templates/base.html:112
-msgid "GitHub"
-msgstr "GitHub"
-
#: wcivf/templates/home.html:5 wcivf/templates/home.html:6
msgid "Who Can I Vote For?"
msgstr "Pwy alla i bleidleisio ar gyfer?"
diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po
index 162efc8e6..a26a5863d 100644
--- a/locale/en/LC_MESSAGES/django.po
+++ b/locale/en/LC_MESSAGES/django.po
@@ -2182,11 +2182,6 @@ msgstr ""
msgid "GitHub"
msgstr ""
-#: wcivf/templates/base.html:113
-msgid ""
-"Browse the list of people and parties standing in the next general election"
-msgstr ""
-
#: wcivf/templates/home.html:5 wcivf/templates/home.html:6
msgid "Who Can I Vote For?"
msgstr ""
|