Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update summary page #1773

Merged
merged 5 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions locale/cy_GB.UTF-8/LC_MESSAGES/TheyWorkForYou.po
Original file line number Diff line number Diff line change
Expand Up @@ -1798,9 +1798,7 @@ msgstr "Derbyn diweddariadau e-bost"
msgid "That name is not unique. Please select from the following:"
msgstr " Nid yw'r enw hwnnw'n unigryw. Dewiswch o'r canlynol:"

#: www/includes/easyparliament/templates/html/mp/profile.php:21
#: www/includes/easyparliament/templates/html/mp/recent.php:11
msgid "Voting Record"
msgid "Voting Summary"
msgstr "Record bleidleisio"

#: www/includes/easyparliament/templates/html/mp/profile.php:33
Expand Down
8 changes: 1 addition & 7 deletions www/docs/mp/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
}

// Prepare data for the template
$data["pagetype"] = $pagetype;
$data['full_name'] = $MEMBER->full_name();
$data['person_id'] = $MEMBER->person_id();
$data['member_id'] = $MEMBER->member_id();
Expand Down Expand Up @@ -897,13 +898,6 @@ function person_useful_links($member) {
);
}

if ($member->house(HOUSE_TYPE_COMMONS)) {
$out[] = array(
'href' => 'http://www.edms.org.uk/mps/' . $member->person_id(),
'text' => 'Early Day Motions signed by this MP'
);
}

if (isset($links['journa_list_link'])) {
$out[] = array(
'href' => $links['journa_list_link'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php if ($this_page == "mp"): ?>
<div class="panel">
<h2>About your Member of Parliament</h2>
<p>
Your MP (<?= ucfirst($full_name) ?>) represents you, and all of the people who live in <?= $latest_membership['constituency'] ?>,
at the UK Parliament in Westminster.
</p>
<p>
MPs split their time between Parliament and their constituency.
In Parliament, they debate and vote on new laws, review existing laws, and question the Government.
In the constituency, their focus is on supporting local people and championing local issues.
They have a small staff team who help with casework, maintain their diaries, and monitor their inbox.
</p>
<h2>
What you can do
</h2>
<ul class="rep-actions" style="li: > list-style: default">
<li>Find out <a href="#profile">more about your MP</a>, including <a href="<?= $member_url ?>/votes">their voting summary</a> and <a href="#appearances">recent speeches</a>.</li>
<li><a href="https://www.writetothem.com/">Write to your MP</a>, or find out about your other local representatives <a href="https://www.writetothem.com">on WriteToThem.com</a>.</li>
<li>Find out more about <a href="https://www.localintelligencehub.com/area/WMC/<?= $latest_membership['constituency'] ?>"><?= $latest_membership['constituency'] ?></a> on the <a href="https://www.localintelligencehub.com/">Local Intelligence Hub</a>.</li>
</ul>
</div>
<?php endif; ?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="person-navigation">
<ul>
<li <?php if ($pagetype == ""): ?>class="active"<?php endif; ?>><a href="<?= $member_url ?>"><?= gettext('Overview') ?></a></li>
<?php if ($this_page == "mp"): ?>
<li <?php if ($pagetype == "votes"): ?>class="active"<?php endif; ?>><a href="<?= $member_url ?>/votes"><?= gettext('Voting Summary') ?></a></li>
<?php endif; ?>
<?php if (in_array($this_page, ["mp", "msp", "ms"])): ?>
<li <?php if ($pagetype == "recent"): ?>class="active"<?php endif; ?>><a href="<?= $member_url ?>/recent"><?= gettext('Recent Votes') ?></a></li>
<?php endif; ?>
</ul>
</div>
81 changes: 39 additions & 42 deletions www/includes/easyparliament/templates/html/mp/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,17 @@
<div class="full-page">
<div class="full-page__row">
<div class="full-page__unit">
<div class="person-navigation">
<ul>
<li class="active"><a href="<?= $member_url ?>"><?= gettext('Overview') ?></a></li>
<li><a href="<?= $member_url ?>/votes"><?= gettext('Voting Record') ?></a></li>
<li><a href="<?= $member_url ?>/recent"><?= gettext('Recent Votes') ?></a></li>
</ul>
</div>
<?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="#profile"><?= gettext('Profile') ?></a></li>
<?php if (count($recent_appearances['appearances'])): ?>
<li><a href="#appearances"><?= gettext('Appearances') ?></a></li>
<?php endif; ?>
<li><a href="#profile"><?= gettext('Profile') ?></a></li>
<?php if ($register_interests): ?>
<li><a href="#register"><?= gettext('Register of Interests') ?></a></li>
<?php endif; ?>
Expand Down Expand Up @@ -60,40 +54,7 @@
</div>
<?php endif; ?>

<?php if (count($recent_appearances['appearances'])): ?>
<div class="panel">
<a name="appearances"></a>
<h2><?=gettext('Recent appearances') ?></h2>

<?php if (count($recent_appearances['appearances']) > 0): ?>

<ul class="appearances">

<?php foreach ($recent_appearances['appearances'] as $recent_appearance): ?>

<li>
<h4><a href="<?= $recent_appearance['listurl'] ?>"><?= $recent_appearance['parent']['body'] ?></a> <span class="date"><?= date('j M Y', strtotime($recent_appearance['hdate'])) ?></span></h4>
<blockquote><?= $recent_appearance['extract'] ?></blockquote>
</li>

<?php endforeach; ?>

</ul>

<p><a href="<?= $recent_appearances['more_href'] ?>"><?= $recent_appearances['more_text'] ?></a></p>

<?php if (isset($recent_appearances['additional_links'])): ?>
<?= $recent_appearances['additional_links'] ?>
<?php endif; ?>

<?php else: ?>

<p><?=gettext('No recent appearances to display.') ?></p>

<?php endif; ?>

</div>
<?php endif; ?>
<?php include "_chamber_info_panel.php"; ?>

<div class="panel">
<a name="profile"></a>
Expand Down Expand Up @@ -254,6 +215,42 @@

</div>


<?php if (count($recent_appearances['appearances'])): ?>
<div class="panel">
<a name="appearances"></a>
<h2><?=gettext('Recent appearances') ?></h2>

<?php if (count($recent_appearances['appearances']) > 0): ?>

<ul class="appearances">

<?php foreach ($recent_appearances['appearances'] as $recent_appearance): ?>

<li>
<h4><a href="<?= $recent_appearance['listurl'] ?>"><?= $recent_appearance['parent']['body'] ?></a> <span class="date"><?= date('j M Y', strtotime($recent_appearance['hdate'])) ?></span></h4>
<blockquote><?= $recent_appearance['extract'] ?></blockquote>
</li>

<?php endforeach; ?>

</ul>

<p><a href="<?= $recent_appearances['more_href'] ?>"><?= $recent_appearances['more_text'] ?></a></p>

<?php if (isset($recent_appearances['additional_links'])): ?>
<?= $recent_appearances['additional_links'] ?>
<?php endif; ?>

<?php else: ?>

<p><?=gettext('No recent appearances to display.') ?></p>

<?php endif; ?>

</div>
<?php endif; ?>

<?php if ($register_interests): ?>
<div class="panel register">
<a name="register"></a>
Expand Down
10 changes: 1 addition & 9 deletions www/includes/easyparliament/templates/html/mp/recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
<div class="full-page">
<div class="full-page__row">
<div class="full-page__unit">
<div class="person-navigation">
<ul>
<li><a href="<?= $member_url ?>"><?= gettext('Overview') ?></a></li>
<li><a href="<?= $member_url ?>/votes"><?= gettext('Voting Record') ?></a></li>
<li class="active"><a href="<?= $member_url ?>/recent"><?= gettext('Recent Votes') ?></a></li>
</ul>
</div>
<?php include '_person_navigation.php'; ?>
</div>
<div class="person-panels">
<div class="primary-content__unit">
Expand All @@ -30,7 +24,6 @@
$sidebar_links = array();

if ( isset($divisions) && $divisions ) {
if ($has_voting_record) {
foreach ($divisions as $division) {
$displayed_votes = true;

Expand All @@ -48,7 +41,6 @@
include('_division_description.php');
}
echo('</div>');
}
} ?>

<?php if (!$displayed_votes) { ?>
Expand Down
8 changes: 1 addition & 7 deletions www/includes/easyparliament/templates/html/mp/votes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
<div class="full-page">
<div class="full-page__row">
<div class="full-page__unit">
<div class="person-navigation">
<ul>
<li><a href="<?= $member_url ?>">Overview</a></li>
<li class="active"><a href="<?= $member_url ?>/votes">Voting Record</a></li>
<li><a href="<?= $member_url ?>/recent">Recent Votes</a></li>
</ul>
</div>
<?php include '_person_navigation.php'; ?>
</div>
<div class="person-panels">
<div class="sidebar__unit in-page-nav">
Expand Down
Loading