Skip to content

Commit

Permalink
Adds more election resources (#1799)
Browse files Browse the repository at this point in the history
* Cross link to more resources on postcode page

- Add link to election guide
- Enable links to candidate data
- Add link to constituency data

* Adjust postcode page donate message

- Reduce length, borrow messaging from other pages
- Explicit low value donate amount

* Add content and donate message to MP page

- Add election explainer link.
- Add short donate messaging
- Move election box beneath former MP box
  • Loading branch information
ajparsons committed Jun 10, 2024
1 parent 3bda49a commit ebebde4
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
<div class="panel">
<h2>General Election 2024</h2>

<p>Find out more about your new constituency and candidates!

<form action="/postcode/">
<label style='font-size:1rem;display:inline' for='postcode'>Postcode:</label>
<input type='text' name='pc' value='' id='postcode' size=8 style="max-width:10em; display: inline; font-size:1rem;">
<input type='submit' value='Look up' class='button'>
</form>

<?php
if ($standing_down_2024) {
echo '<p>This MP is standing down from Parliament at this election.';
}
?>

</div>

<?php if ($this_page == "mp") { ?>

Expand Down Expand Up @@ -58,3 +41,51 @@
</div>

<?php } ?>

<div class="panel">
<h2>General Election 2024</h2>

<p>There is a UK general election on <strong>4th July 2024</strong>
<?php
$date = strtotime("2024-07-04");
$datediff = ceil(($date - time()) / 86400);
if ($datediff > 1) {
echo "($datediff days away)";
} elseif ($datediff > 0) {
echo '(tomorrow!)';
} elseif ($datediff > -86400) {
echo '(today!)';
}
?>.
</p>
<p>
To understand more about <a href="https://www.mysociety.org/democracy/the-2024-general-election/">how the election will work</a>, you can read <a href="https://www.mysociety.org/democracy/the-2024-general-election/">our 10-point guide</a>.
</p>

<p>Enter your postcode below to learn more about your new constituency and candidates:</p>

<form action="/postcode/">
<label style='font-size:1rem;display:inline' for='postcode'>Postcode:</label>
<input type='text' name='pc' value='' id='postcode' size=8 style="max-width:10em; display: inline; font-size:1rem;">
<input type='submit' value='Look up' class='button'>
</form>

<?php
if ($standing_down_2024) {
echo '<p>This MP is standing down from Parliament at this election.';
}
?>


<hr >
<p>We want MPs to meet the standards and expectations of the people who elected them - <strong>you</strong>!</p>
<p>Learn more about <a href="/support-us/?utm_source=theyworkforyou.com&utm_content=postcode+donate&utm_medium=link&utm_campaign=postcode&how-much=5">our current work</a>, and <a href="https://www.mysociety.org/democracy/who-funds-them/">our new project WhoFundsThem</a> - looking into MPs’ and APPGs’ financial interests.</p>
<div class="inline-donation-box">

<a href="/support-us/?utm_source=theyworkforyou.com&utm_content=postcode+donate&utm_medium=link&utm_campaign=postcode&how-much=5#donate-form" class="button" >Donate £5 to TheyWorkForYou</a>
<a href="https://www.mysociety.org/democracy/who-funds-them/" class="button">Support our WhoFundsThem campaign</a>

</div>
<p>Learn more about <a href="/support-us/#why-does-mysociety-need-donations-for-these-sites">how we'll use your donation</a> and <a href="/support-us/#i-want-to-be-a-mysociety-supporter">other ways to help</a>.</p>

</div>
25 changes: 18 additions & 7 deletions www/includes/easyparliament/templates/html/postcode/ge2024.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<p><a href='#current'>See your current <?php
if (isset($mcon) || isset($mreg)) echo 'representatives';
else echo 'MP';
?></a>
?></a></p>

<p>There is a UK general election on <strong>4th July 2024</strong>
<?php
Expand All @@ -27,14 +27,20 @@
echo '(today!)';
}
?>.
</p>
<p>
To understand more about <a href="https://www.mysociety.org/democracy/the-2024-general-election/">how the election will work</a>, you can read <a href="https://www.mysociety.org/democracy/the-2024-general-election/">our 10-point guide</a>.
</p>

<p>For this election, you will be in the
<strong><?= $ballot->post_name ?></strong>
constituency.
You can see statistics and information for your new constituency at the
<a href="https://www.localintelligencehub.com/area/WMC23/<?= rawurlencode($ballot->post_name) ?>">Local Intelligence Hub</a>.

<h3>Candidates</h3>
<p>

The people standing in your constituency
<?php
if (!$ballot->candidates_verified) { echo '(not yet finalised or verified)'; }
Expand All @@ -43,28 +49,33 @@
<ul>
<?php foreach ($ballot->candidates as $candidate) {
echo '<li>';
#echo '<a href="' . $candidate->person->absolute_url . '">';
echo '<a href="' . $candidate->person->absolute_url . '">';
echo $candidate->person->name;
#echo '</a>';
echo '</a>';
echo ' (' . $candidate->party->party_name . ')'; # photo_url
echo '</li>';
}
?>
</ul>

<p>
<a href="https://democracyclub.org.uk/"><img width=150 align="right" src="https://static.democracyclub.org.uk/static/dc_theme/images/logo-with-text.png" alt="Democracy Club"></a>
For more information visit <a href="<?= $ballot->wcivf_url ?>">WhoCanIVoteFor</a>.
This data has been provided by <a href="https://democracyclub.org.uk/">Democracy Club</a>, thanks to them.

For more information visit <a href="<?= $ballot->wcivf_url ?>">WhoCanIVoteFor</a>.
Thanks to <a href="https://democracyclub.org.uk/">Democracy Club</a> for providing this data.
</p>
<h3>New constituencies</h3>
<p>Many constituency boundaries have changed for this election.
Here's a map of your new constituency (pink) with your
existing constituency in grey:
existing constituency in grey:</p>

<div id="map" style="max-width: 400px; margin-bottom: 2em;">
<div id="leaflet" style=" position: relative; width: 100%; height: 0; padding-top: 100%;">
</div>
</div>

<p>
Get <a href="https://www.mysociety.org/2023/09/12/navigating-the-new-constituencies/">more datasets</a> about the new constituencies.
</p>
<script>
var map = new L.Map("leaflet");
map.attributionControl.setPrefix('');
Expand Down
18 changes: 5 additions & 13 deletions www/includes/easyparliament/templates/html/postcode/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,12 @@ function member_image_box(string $person_id, string $person_url, string $person_
<?php } ?>
</ul>

<h3><?= gettext('Donate') ?></h3>
<p>
For the election mySociety are busy helping people to understand what their
election candidates stand for with <a href="https://www.theyworkforyou.com/">TheyWorkForYou</a>; supporting people to have
informed conversations with candidates around climate using <a href="https://www.localintelligencehub.com/">Local Intelligence
Hub</a>; and ensuring all our democracy services are ready to go on day one of a
new government.

<p><a href="/support-us/?utm_source=theyworkforyou.com&amp;utm_content=postcode+donate&amp;utm_medium=link&amp;utm_campaign=postcode" class="button">Donate</a>

<p>Whoever is elected, they need to understand the importance of
transparency and accountability — and we’ll be making sure that happens.

<h3>We can make politics better together</h3>

<p>We want MPs to meet the standards and expectations of the people who elected them - <strong>you</strong>!</p>
<p>Learn about <a href="/support-us/?utm_source=theyworkforyou.com&utm_content=postcode+donate&utm_medium=link&utm_campaign=postcode&how-much=5">our current work</a>, and <a href="https://www.mysociety.org/democracy/who-funds-them/">our new project WhoFundsThem</a> - looking into MPs’ and APPGs’ financial interests.</p>
<a href="/support-us/?utm_source=theyworkforyou.com&utm_content=postcode+donate&utm_medium=link&utm_campaign=postcode&how-much=5#donate-form" class="button" style="width:100%">Donate £5 to TheyWorkForYou</a>
<a href="https://www.mysociety.org/democracy/who-funds-them/" class="button" style="width:100%">Support our WhoFundsThem campaign</a>
</div>
</div>
</div>
Expand Down

0 comments on commit ebebde4

Please sign in to comment.