Skip to content

Commit

Permalink
Common footer across MP subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Jun 5, 2024
1 parent ab21c1b commit 3bda49a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<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><?= gettext('This data was produced by TheyWorkForYou from a variety of sources.') ?></p>

<p><?= gettext('For an explanation of the vote descriptions please see our page about <a href="/voting-information">voting information on TheyWorkForYou</a>.') ?></p>

<?php if(isset($data['photo_attribution_text'])) { ?>
Expand All @@ -13,4 +15,16 @@
<?php } ?>
</p>
<?php } ?>
<?php if(!$image || !$image['exists']) { ?>
<p>
We&rsquo;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('@', '&#64;', CONTACTEMAIL) ?>">please email it to us</a>.
Please do not email us about copyrighted photos
elsewhere on the internet; we can&rsquo;t use them.
</p>
<?php }; ?>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
</div>

<?php }
include('_vote_footer.php'); ?>
include('_profile_footer.php'); ?>

</div>
</div>
Expand Down
30 changes: 1 addition & 29 deletions www/includes/easyparliament/templates/html/mp/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,35 +248,7 @@
</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&amp;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&rsquo;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('@', '&#64;', CONTACTEMAIL) ?>">please email it to us</a>.
Please do not email us about copyrighted photos
elsewhere on the internet; we can&rsquo;t use them.
</p>
<?php } ?>
</div>
<?php include('_profile_footer.php'); ?>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/includes/easyparliament/templates/html/mp/recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
<?php }
include('_covid19_panel.php');
include('_vote_footer.php'); ?>
include('_profile_footer.php'); ?>
</div>

<div class="sidebar__unit in-page-nav">
Expand Down
30 changes: 1 addition & 29 deletions www/includes/easyparliament/templates/html/mp/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,7 @@
</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&amp;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&rsquo;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('@', '&#64;', CONTACTEMAIL) ?>">please email it to us</a>.
Please do not email us about copyrighted photos
elsewhere on the internet; we can&rsquo;t use them.
</p>
<?php } ?>
</div>
<?php include('_profile_footer.php'); ?>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/includes/easyparliament/templates/html/mp/votes.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<?php endif; ?>
<?php include('_covid19_panel.php'); ?>

<?php include('_vote_footer.php'); ?>
<?php include('_profile_footer.php'); ?>
</div>
</div>
</div>
Expand Down

0 comments on commit 3bda49a

Please sign in to comment.