Skip to content

Commit

Permalink
Abstract person navigation
Browse files Browse the repository at this point in the history
- Enable votes link for all except NIA and LA
  • Loading branch information
ajparsons committed Mar 21, 2024
1 parent 7833449 commit 6b87344
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 24 deletions.
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
1 change: 1 addition & 0 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
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>
8 changes: 1 addition & 7 deletions www/includes/easyparliament/templates/html/mp/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
<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">
Expand Down
8 changes: 1 addition & 7 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 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

0 comments on commit 6b87344

Please sign in to comment.