diff --git a/wcivf/apps/people/templates/people/includes/_person_edit_details_card.html b/wcivf/apps/people/templates/people/includes/_person_edit_details_card.html new file mode 100644 index 000000000..af72dd1bb --- /dev/null +++ b/wcivf/apps/people/templates/people/includes/_person_edit_details_card.html @@ -0,0 +1,42 @@ +{% load humanize %} + +{% if object.current_or_future_candidacies %} +
+
+

That's all we know! Will you help us find more about this candidate?

+

Our volunteers have been working hard to add information on as many + candidates as possible, but they need help. +

+ + {% if object.should_show_email_cta %} +

Thousands of voters will rely on this site. + {% else %} +

+ {% endif %} + If you can add information that should be on this page + + {% if object.cta_example_details %} + - such as {{ object.name }}'s + {{ object.cta_example_details|join:", " }} - + {% endif %} + please use our crowdsourcing website to add it.

+ + Add or edit details » + + {% if object.should_show_email_cta %} +

You can also email {{ object.name }} directly to ask them to add information to this page. +

+ Ask the + candidate for more information » +

+ {% endif %} + +

Upload your leaflets

+

If you've received election leaflets from {{ object.name }}, please take a photo + of them and upload them to ElectionLeaflets.org

+

Add leaflets +

+
+
+{% endif %} diff --git a/wcivf/apps/people/templates/people/includes/_person_hustings_card.html b/wcivf/apps/people/templates/people/includes/_person_hustings_card.html new file mode 100644 index 000000000..326a0cb46 --- /dev/null +++ b/wcivf/apps/people/templates/people/includes/_person_hustings_card.html @@ -0,0 +1,14 @@ +{% load humanize %} + +{% if object.postelection.husting_set.exists and object.current_or_future_candidacies %} +
+
+

Local hustings

+

You can meet candidates and question them at local hustings. Here are hustings where {{ object.name }} may + be + appearing. +

+ {% include "elections/includes/_hustings_list.html" with hustings=object.postelection.husting_set.all %} +
+
+{% endif %} diff --git a/wcivf/apps/people/templates/people/includes/_person_policy_card.html b/wcivf/apps/people/templates/people/includes/_person_policy_card.html new file mode 100644 index 000000000..d40b09d76 --- /dev/null +++ b/wcivf/apps/people/templates/people/includes/_person_policy_card.html @@ -0,0 +1,104 @@ +{% load humanize %} +{% load markdown_deux_tags %} + +{% if object.statement_to_voters or object.manifestos or object.leaflet_set.exists or object.twfy_id %} +
+
+

+ {{ object.name }}'s policies +

+ + {% if object.statement_to_voters %} +

Statement to voters

+ {% if object.long_statement %} + + {% else %} +
{{ object.statement_to_voters|linebreaks }}
+ {% endif %} +

This statement was added by {{ object.name }}, their team, or by a Democracy Club volunteer, + based on + information published by the candidate elsewhere.

+ {% endif %} + + + {% if object.manifestos %} + {% with object.personpost.party as party %} + + {% if party.emblem %} + {{ party.name}} emblem + {{ party.name}} emblem + {{ party.name}} emblem + {% endif %} +

Party manifesto

+

Party manifesto

+

Party manifesto

+

+ {{ object.name }} {{ object.personpost.election.in_past|yesno:"was,is" }} the {{ party.party_name }} + candidate. + Find out more about their policies in the {{ party.party_name }} manifesto. +

+ + {% endwith %} + {% endif %} + + + {% if object.leaflet_set.exists %} +

+ Recent leaflets from {{ object.name }} +

+ {% for leaflet in object.leaflet_set.latest_four %} + {% if leaflet.thumb_url %} + } + Thumbnail of leaflet from {{ object.name }} + + {% endif %} +

+ Uploaded {{ leaflet.date_uploaded_to_electionleaflets|naturalday:"j M Y" }}
+ See leaflet +

+ {% endfor %} +

+ More leaflets from {{ + object.name }} + Upload a leaflet +

+ {% endif %} + + + {% if object.pledges.exists %} +

Candidate pledges

+

Hope Not Hate, a London-based charity, canvassed local residents and community organisations to establish + the + following questions to the candidates in this ward. +

+ {% for pledge in object.pledges.all %} +

{{ pledge.question }}

+
{{ pledge.answer|markdown }}
+ {% endfor %} + {% endif %} + + + {% if object.twfy_id %} +

Record in office

+

See this candidate's record on + TheyWorkForYou - + their speeches, voting history and more. +

+ {% endif %} +
+
+{% endif %} 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 new file mode 100644 index 000000000..c2d9d5e0b --- /dev/null +++ b/wcivf/apps/people/templates/people/includes/_person_previous_elections_card.html @@ -0,0 +1,34 @@ +{% load humanize %} + +{% if object.past_not_current_candidacies %} +
+
+ + + + + + + + + + {% for person_post in object.past_not_current_candidacies %} + {{ person_post.post_election.short_cancelled_message_html }} + {{ person_post.post_election.short_cancelled_message_html }} + {{ person_post.post_election.short_cancelled_message_html }} + + + + {% if person_post.elected %} + + {% else %} + + {% endif %} + + {% endfor %} +
+

Previous Elections

+
DateElectionPartyResults
{{ person_post.election.election_date|date:"Y" }}{{ person_post.post.label }}: {{ person_post.election }}{{ person_post.party.party_name }}{{ person_post.votes_cast|intcomma }} votes (elected){{ person_post.votes_cast|intcomma }} votes
+
+
+{% endif %} diff --git a/wcivf/apps/people/templates/people/person_detail.html b/wcivf/apps/people/templates/people/person_detail.html index 4543a996f..f68a7769e 100644 --- a/wcivf/apps/people/templates/people/person_detail.html +++ b/wcivf/apps/people/templates/people/person_detail.html @@ -10,213 +10,22 @@ {% block og_image %}{% if object.photo_url %}{{ object.photo_url }}{% endif %}{% endblock og_image %} {% block content %} -
-
{% include "people/includes/_person_intro_card.html" %} - - {% if object.statement_to_voters or object.manifestos or object.leaflet_set.exists or object.twfy_id %} -
-
-

- {{ object.name }}'s policies -

+ {% include "people/includes/_person_policy_card.html" %} - - {% if object.statement_to_voters %} -

Statement to voters

- {% if object.long_statement %} -
    -
    {{ object.statement_intro }}
    -
    - Full statement -
    {{ object.statement_remainder|linebreaksbr }}
    -
    -
- {% else %} -
{{ object.statement_to_voters|linebreaks }}
- {% endif %} -

This statement was added by {{ object.name }}, their team, or by a Democracy Club volunteer, - based on - information published by the candidate elsewhere.

- {% endif %} - - - {% if object.manifestos %} - {% with object.personpost.party as party %} - - {% if party.emblem %} - {{ party.name}} emblem - {{ party.name}} emblem - {{ party.name}} emblem - {% endif %} -

Party manifesto

-

Party manifesto

-

Party manifesto

-

- {{ object.name }} {{ object.personpost.election.in_past|yesno:"was,is" }} the {{ party.party_name }} - candidate. - Find out more about their policies in the {{ party.party_name }} manifesto. -

-
    - {% for manifesto in object.manifestos %} - {% include "parties/single_manifesto.html" %} - {% endfor %} -
- {% endwith %} - {% endif %} - - - {% if object.leaflet_set.exists %} -

- Recent leaflets from {{ object.name }} -

- {% for leaflet in object.leaflet_set.latest_four %} - {% if leaflet.thumb_url %} - } - Thumbnail of leaflet from {{ object.name }} - - {% endif %} -

- Uploaded {{ leaflet.date_uploaded_to_electionleaflets|naturalday:"j M Y" }}
- See leaflet -

- {% endfor %} -

- More leaflets from {{ - object.name }} - Upload a leaflet -

- {% endif %} - - - {% if object.pledges.exists %} -

Candidate pledges

-

Hope Not Hate, a London-based charity, canvassed local residents and community organisations to establish - the - following questions to the candidates in this ward. -

- {% for pledge in object.pledges.all %} -

{{ pledge.question }}

-
{{ pledge.answer|markdown }}
- {% endfor %} - {% endif %} - - - {% if object.twfy_id %} -

Record in office

-

See this candidate's record on - TheyWorkForYou - - their speeches, voting history and more. -

- {% endif %} -
-
- {% endif %} - - {% include "people/includes/_person_about_card.html" %} - {% include "people/includes/_person_contact_card.html" %} - - {% if object.past_not_current_candidacies %} -
-
- - - - - - - - - - {% for person_post in object.past_not_current_candidacies %} - {{ person_post.post_election.short_cancelled_message_html }} - {{ person_post.post_election.short_cancelled_message_html }} - {{ person_post.post_election.short_cancelled_message_html }} - - - - {% if person_post.elected %} - - {% else %} - - {% endif %} - - {% endfor %} -
-

Previous Elections

-
DateElectionPartyResults
{{ person_post.election.election_date|date:"Y" }}{{ person_post.post.label }}: {{ person_post.election }}{{ person_post.party.party_name }}{{ person_post.votes_cast|intcomma }} votes (elected){{ person_post.votes_cast|intcomma }} votes
-
-
- {% endif %} + {% include "people/includes/_person_previous_elections_card.html" %} - - {% if object.current_or_future_candidacies %} -
-
-

That's all we know! Will you help us find more about this candidate?

-

Our volunteers have been working hard to add information on as many - candidates as possible, but they need help. -

- - {% if object.should_show_email_cta %} -

Thousands of voters will rely on this site. - {% else %} -

- {% endif %} - If you can add information that should be on this page - - {% if object.cta_example_details %} - - such as {{ object.name }}'s - {{ object.cta_example_details|join:", " }} - - {% endif %} - please use our crowdsourcing website to add it.

- - Add or edit details » - - {% if object.should_show_email_cta %} -

You can also email {{ object.name }} directly to ask them to add information to this page. -

- Ask the - candidate for more information » -

- {% endif %} - -

Upload your leaflets

-

If you've received election leaflets from {{ object.name }}, please take a photo - of them and upload them to ElectionLeaflets.org

-

Add leaflets -

-
-
- {% endif %} - - - {% if object.postelection.husting_set.exists and object.current_or_future_candidacies %} -
-
-

Local hustings

-

You can meet candidates and question them at local hustings. Here are hustings where {{ object.name }} may - be - appearing. -

- {% include "elections/includes/_hustings_list.html" with hustings=object.postelection.husting_set.all %} -
-
- {% endif %} + {% include "people/includes/_person_edit_details_card.html" %} + {% include "people/includes/_person_hustings_card.html" %} {% if referer_postcode %}
@@ -232,11 +41,9 @@

Local hustings

{#{% include "feedback/feedback_form.html" %}#} -
- {% endblock content %}