-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seperate out register of interests from overview page
- Create new register subpage - Update top bar navigation
- Loading branch information
Showing
5 changed files
with
102 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
www/includes/easyparliament/templates/html/mp/register.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
include_once INCLUDESPATH . "easyparliament/templates/html/mp/header.php"; | ||
?> | ||
|
||
<div class="full-page"> | ||
<div class="full-page__row"> | ||
<div class="full-page__unit"> | ||
<?php include '_person_navigation.php'; ?> | ||
</div> | ||
<div class="person-panels"> | ||
<div class="sidebar__unit in-page-nav"> | ||
<div> | ||
<h3 class="browse-content"><?= gettext('Browse content') ?></h3> | ||
<ul> | ||
<li><a href="https://www.mysociety.org/2024/01/17/improving-the-register-of-mps-interests/">Download a spreadsheet</a></li> | ||
<?php include '_featured_content.php'; ?> | ||
<?php include '_donation.php'; ?> | ||
</div> | ||
</div> | ||
|
||
<div class="primary-content__unit"> | ||
|
||
<?php if ($party == 'Sinn Féin' && in_array(HOUSE_TYPE_COMMONS, $houses)): ?> | ||
<div class="panel"> | ||
<p>Sinn Féin MPs do not take their seats in Parliament.</p> | ||
</div> | ||
<?php elseif (isset($is_new_mp) && $is_new_mp && count($recent_appearances['appearances']) == 0): ?> | ||
<div class="panel panel--secondary"> | ||
<h3><?= $full_name ?> is a recently elected MP – elected on <?= format_date($entry_date, LONGDATEFORMAT) ?></h3> | ||
|
||
<p>When <?= $full_name ?> starts to speak in debates and vote on bills, that information will appear on this page.</p> | ||
|
||
<?php if ($has_email_alerts) { ?> | ||
<a href="<?= WEBPATH ?>alert/?pid=<?= $person_id ?>#" onclick="trackLinkClick(this, 'alert_click', 'Search', 'Person'); return false;">Sign up for email alerts to be the first to know when that happens.</a> | ||
<?php } ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if ($register_interests): ?> | ||
<div class="panel register"> | ||
<a name="register"></a> | ||
<h2>Register of Members’ Interests</h2> | ||
<p><b>New</b>: <a href="https://www.mysociety.org/2024/01/17/improving-the-register-of-mps-interests/">Download a spreadsheet of all Members Interests.</a></p> | ||
|
||
<p> | ||
<a href="<?= WEBPATH ?>regmem/?p=<?= $person_id ?>">View the history of this MP’s entries in the Register</a> | ||
</p> | ||
<?php if ($register_interests['date']): ?> | ||
<p>Last updated: <?= $register_interests['date'] ?>.</p> | ||
<?php endif; ?> | ||
|
||
<?= $register_interests['data'] ?> | ||
|
||
|
||
<p> | ||
<a class="moreinfo-link" href="https://www.publications.parliament.uk/pa/cm/cmregmem/100927/introduction.htm">More about the register</a> | ||
</p> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<div class="panel panel--secondary"> | ||
<p><?= gettext('Note for journalists and researchers: The data on this page may be used freely, on condition that TheyWorkForYou.com is cited as the source.') ?></p> | ||
|
||
<p><?php print gettext('This data was produced by TheyWorkForYou from a variety of sources.') . ' '; | ||
printf(gettext('Voting information from <a href="%s">Public Whip</a>.'), "https://www.publicwhip.org.uk/mp.php?id=uk.org.publicwhip/member/ $member_id&showall=yes"); ?></p> | ||
|
||
<?php if($image && $image['exists']) { | ||
if(isset($data['photo_attribution_text'])) { ?> | ||
<p> | ||
<?php if(isset($data['photo_attribution_link'])) { ?> | ||
<?= gettext('Profile photo:') ?> | ||
<a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a> | ||
<?php } else { ?> | ||
<?= gettext('Profile photo:') ?> <?= $data['photo_attribution_text'] ?> | ||
<?php } ?> | ||
</p> | ||
<?php } | ||
} else { ?> | ||
<p> | ||
We’re missing a photo of <?= $full_name ?>. | ||
If you have a photo <em>that you can release under | ||
a Creative Commons Attribution-ShareAlike license</em> | ||
or can locate a <em>copyright free</em> photo, | ||
<a href="mailto:<?= str_replace('@', '@', CONTACTEMAIL) ?>">please email it to us</a>. | ||
Please do not email us about copyrighted photos | ||
elsewhere on the internet; we can’t use them. | ||
</p> | ||
<?php } ?> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> |