@@ -116,19 +116,19 @@ discard block |
||
| 116 | 116 | <?php } ?> |
| 117 | 117 | |
| 118 | 118 | <?php |
| 119 | - if( |
|
| 120 | - $members || |
|
| 119 | + if( |
|
| 120 | + $members || |
|
| 121 | 121 | (isset($constituencies) && count($constituencies) > 0) || |
| 122 | 122 | ($alertsearch) |
| 123 | - ) { |
|
| 124 | - /* We need to disambiguate the user's instructions */ |
|
| 125 | - $member_options = false; |
|
| 126 | - ?> |
|
| 123 | + ) { |
|
| 124 | + /* We need to disambiguate the user's instructions */ |
|
| 125 | + $member_options = false; |
|
| 126 | + ?> |
|
| 127 | 127 | <div class="alert-section alert-section--disambiguation"> |
| 128 | 128 | <div class="alert-section__primary"> |
| 129 | 129 | |
| 130 | 130 | <?php if ($members) { |
| 131 | - $member_options = true; ?> |
|
| 131 | + $member_options = true; ?> |
|
| 132 | 132 | <h3><?= sprintf(gettext('Sign up for alerts when people matching <i>%s</i> speaks'), _htmlspecialchars($alertsearch)) ?></h3> |
| 133 | 133 | <ul> |
| 134 | 134 | <?php |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | <input type="hidden" name="email" value="<?= _htmlspecialchars($email) ?>"> |
| 141 | 141 | <input type="hidden" name="pid" value="<?= $row['person_id'] ?>"> |
| 142 | 142 | <?php |
| 143 | - $name = member_full_name($row['house'], $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']); |
|
| 143 | + $name = member_full_name($row['house'], $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']); |
|
| 144 | 144 | if ($row['constituency']) { |
| 145 | 145 | $name .= ' (' . gettext($row['constituency']) . ')'; |
| 146 | 146 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | <?php } ?> |
| 155 | 155 | |
| 156 | 156 | <?php if (isset($constituencies) && count($constituencies) > 0) { |
| 157 | - $member_options = true; ?> |
|
| 157 | + $member_options = true; ?> |
|
| 158 | 158 | <h3><?= sprintf(gettext('Sign up for alerts when MPs for constituencies matching <i>%s</i> speaks'), _htmlspecialchars($alertsearch)) ?></h3> |
| 159 | 159 | <ul> |
| 160 | 160 | <?php foreach ($constituencies as $constituency => $member) { ?> |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | <?php } ?> |
| 173 | 173 | |
| 174 | 174 | <?php if ($alertsearch) { |
| 175 | - if ($member_options) { ?> |
|
| 175 | + if ($member_options) { ?> |
|
| 176 | 176 | <h3><?= gettext('Sign up for alerts for topics') ?></h3> |
| 177 | 177 | <?php } else { ?> |
| 178 | 178 | <h3><?= gettext('Great! Can you just confirm what you mean?') ?></h3> |
@@ -202,8 +202,8 @@ discard block |
||
| 202 | 202 | want? You will only get an alert if all of these |
| 203 | 203 | are mentioned in the same debate.') ?> |
| 204 | 204 | <?php if (isset($member_alertsearch)) { |
| 205 | - printf(gettext('Did you mean to get alerts for when your representative mentions something instead? If so maybe you want to subscribe to…')); |
|
| 206 | - } ?> |
|
| 205 | + printf(gettext('Did you mean to get alerts for when your representative mentions something instead? If so maybe you want to subscribe to…')); |
|
| 206 | + } ?> |
|
| 207 | 207 | </em> |
| 208 | 208 | <?php } ?> |
| 209 | 209 | </li> |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | <h3> |
| 288 | 288 | <?php |
| 289 | 289 | $name = $pid_member->full_name(); |
| 290 | - if ($pid_member->constituency()) { |
|
| 291 | - $name .= ' (' . _htmlspecialchars($pid_member->constituency()) . ')'; |
|
| 292 | - } ?> |
|
| 290 | + if ($pid_member->constituency()) { |
|
| 291 | + $name .= ' (' . _htmlspecialchars($pid_member->constituency()) . ')'; |
|
| 292 | + } ?> |
|
| 293 | 293 | <?= sprintf(gettext('Sign up for an alert when %s speaks.'), $name) ?> |
| 294 | 294 | </h3> |
| 295 | 295 | <?php } elseif ($keyword) { ?> |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | <?php } ?> |
| 117 | 117 | |
| 118 | 118 | <?php |
| 119 | - if( |
|
| 119 | + if ( |
|
| 120 | 120 | $members || |
| 121 | 121 | (isset($constituencies) && count($constituencies) > 0) || |
| 122 | 122 | ($alertsearch) |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | </div> |
| 83 | 83 | |
| 84 | 84 | <?php } else { |
| 85 | - $pc_form = ($type == 'mlas' || $type == 'msps' || $type == 'mss'); |
|
| 86 | - ?> |
|
| 85 | + $pc_form = ($type == 'mlas' || $type == 'msps' || $type == 'mss'); |
|
| 86 | + ?> |
|
| 87 | 87 | |
| 88 | 88 | <form action="/<?= $pc_form ? 'postcode' : 'search' ?>/"> |
| 89 | 89 | <div class="search-page__section search-page__section--search"> |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | <div class="search-page__section search-page__section--results"> |
| 109 | 109 | <?php |
| 110 | - if (isset($former)) { |
|
| 111 | - if ($type == 'mps') { |
|
| 112 | - # No reps. Election period! |
|
| 113 | - ?> |
|
| 110 | + if (isset($former)) { |
|
| 111 | + if ($type == 'mps') { |
|
| 112 | + # No reps. Election period! |
|
| 113 | + ?> |
|
| 114 | 114 | <div class="search-page__section__primary"> |
| 115 | 115 | During the period from the dissolution of Parliament to the general election, there are no Members of Parliament. |
| 116 | 116 | <a href="/mps/?date=<?=$dissolution[1] ?>">View list of MPs as it was when Parliament was dissolved</a> |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | </div> |
| 133 | 133 | <?php |
| 134 | 134 | } |
| 135 | - } else { ?> |
|
| 135 | + } else { ?> |
|
| 136 | 136 | |
| 137 | 137 | <div class="search-page__section__primary"> |
| 138 | 138 | <h2><?= sprintf(gettext('All %s'), $rep_plural) ?></h2> |
@@ -201,18 +201,18 @@ discard block |
||
| 201 | 201 | $a_to_z_key = 'given_name'; |
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | - $initial_link = ''; |
|
| 205 | - foreach ($data as $person) { |
|
| 206 | - if ($order != 'party') { |
|
| 207 | - $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1); |
|
| 208 | - if ($initial != $current_initial) { |
|
| 209 | - $current_initial = $initial; |
|
| 210 | - $initial_link = "name=\"$initial\" "; |
|
| 211 | - } else { |
|
| 212 | - $initial_link = ""; |
|
| 213 | - } |
|
| 214 | - } |
|
| 215 | - ?> |
|
| 204 | + $initial_link = ''; |
|
| 205 | + foreach ($data as $person) { |
|
| 206 | + if ($order != 'party') { |
|
| 207 | + $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1); |
|
| 208 | + if ($initial != $current_initial) { |
|
| 209 | + $current_initial = $initial; |
|
| 210 | + $initial_link = "name=\"$initial\" "; |
|
| 211 | + } else { |
|
| 212 | + $initial_link = ""; |
|
| 213 | + } |
|
| 214 | + } |
|
| 215 | + ?> |
|
| 216 | 216 | <a <?= $initial_link ?>href="/mp/<?= $person['url'] ?>" class="people-list__person"> |
| 217 | 217 | <noscript class="loading-lazy"> |
| 218 | 218 | <img class="people-list__person__image" src="<?= $person['image'] ?>" loading="lazy" alt=""> |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | if (($this_page != 'commentreport' && |
| 110 | - $this_page != 'addcomment' && |
|
| 110 | + $this_page != 'addcomment' && |
|
| 111 | 111 | $this_page != 'admin_commentreport') |
| 112 | 112 | && $THEUSER->is_able_to('reportcomment') |
| 113 | 113 | && !$comment['modflagged'] |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | if (!$comment['visible']) { |
| 85 | 85 | $reporthtml = ''; |
| 86 | 86 | } elseif (($this_page != 'commentreport' && |
| 87 | - $this_page != 'addcomment' && |
|
| 87 | + $this_page != 'addcomment' && |
|
| 88 | 88 | $this_page != 'admin_commentreport') |
| 89 | 89 | && $THEUSER->is_able_to('reportcomment') |
| 90 | 90 | && $THEUSER->user_id() != $comment['user_id'] |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | </h2> |
| 27 | 27 | |
| 28 | 28 | <?php if (isset($data['mp_data'])) { |
| 29 | - include('_your_mp.php'); |
|
| 30 | - } ?> |
|
| 29 | + include('_your_mp.php'); |
|
| 30 | + } ?> |
|
| 31 | 31 | |
| 32 | 32 | <div class="debate-speech__division__details"> |
| 33 | 33 | <p> |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | <?php } else { ?> |
| 39 | 39 | <?php if ($mp_vote['with_majority']) { ?> |
| 40 | 40 | <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>agreed</b> and'; |
| 41 | - include('_vote_description.php'); ?> |
|
| 41 | + include('_vote_description.php'); ?> |
|
| 42 | 42 | <?php } else { ?> |
| 43 | 43 | <?php $vote_prefix = 'A majority of ' . $division['members']['plural'] . ' <b>disagreed</b> and'; |
| 44 | - include('_vote_description.php'); ?> |
|
| 44 | + include('_vote_description.php'); ?> |
|
| 45 | 45 | <?php } ?> |
| 46 | 46 | <?php } ?> |
| 47 | 47 | </p> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | <?php if (count($tellers) > 0) { ?> |
| 30 | 30 | <h4><?= gettext('Tellers') ?></h4> |
| 31 | 31 | <ul class="division-names"> |
| 32 | - <?php foreach($tellers as $teller) { |
|
| 32 | + <?php foreach ($tellers as $teller) { |
|
| 33 | 33 | print_voter($teller); |
| 34 | 34 | } ?> |
| 35 | 35 | </p> |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <p> |
| 2 | 2 | <a href="#for"><?= sprintf(gettext('%s for'), $division['for']) ?></a>, |
| 3 | 3 | <a href="#against"><?= sprintf(gettext('%s against'), $division['against']) ?></a><?php |
| 4 | - if ($division['both'] > 0) { ?>, |
|
| 4 | + if ($division['both'] > 0) { ?>, |
|
| 5 | 5 | <a href="#both"><?= sprintf(gettext('%s abstained'), $division['both']) ?></a><?php |
| 6 | - } |
|
| 6 | + } |
|
| 7 | 7 | if ($division['absent'] > 0) { ?>, |
| 8 | 8 | <a href="#absent"><?= sprintf(gettext('%s absent'), $division['absent']) ?></a><?php |
| 9 | 9 | } ?>. |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | ], |
| 20 | 20 | ]; |
| 21 | 21 | |
| 22 | -$sections_with_votes = array_filter(array_keys($vote_sets), function ($s) use ($division) { |
|
| 22 | +$sections_with_votes = array_filter(array_keys($vote_sets), function($s) use ($division) { |
|
| 23 | 23 | return count($division[$s]); |
| 24 | 24 | }); |
| 25 | 25 | $sections_with_votes = array_values($sections_with_votes); |
@@ -11,29 +11,29 @@ |
||
| 11 | 11 | <a href="<?= $data['mp_data']['mp_url'] ?>" class="your-mp__content"> |
| 12 | 12 | <?php if (isset($mp_vote)) { ?> |
| 13 | 13 | <span class="your-mp__vote your-mp__vote--<?= $mp_vote['vote'] ?>"><?php |
| 14 | - switch ($mp_vote['vote']) { |
|
| 15 | - case 'aye': |
|
| 14 | + switch ($mp_vote['vote']) { |
|
| 15 | + case 'aye': |
|
| 16 | 16 | echo 'Aye'; |
| 17 | - break; |
|
| 18 | - case 'no': |
|
| 17 | + break; |
|
| 18 | + case 'no': |
|
| 19 | 19 | echo 'No'; |
| 20 | - break; |
|
| 21 | - case 'absent': |
|
| 20 | + break; |
|
| 21 | + case 'absent': |
|
| 22 | 22 | echo 'Absent'; |
| 23 | - break; |
|
| 24 | - case 'both': |
|
| 23 | + break; |
|
| 24 | + case 'both': |
|
| 25 | 25 | echo 'Abstain'; |
| 26 | - break; |
|
| 27 | - case 'tellaye': |
|
| 26 | + break; |
|
| 27 | + case 'tellaye': |
|
| 28 | 28 | echo 'Aye (Teller)'; |
| 29 | - break; |
|
| 30 | - case 'tellno': |
|
| 29 | + break; |
|
| 30 | + case 'tellno': |
|
| 31 | 31 | echo 'No (Teller)'; |
| 32 | - break; |
|
| 33 | - default: |
|
| 32 | + break; |
|
| 33 | + default: |
|
| 34 | 34 | echo 'N/A'; |
| 35 | - } |
|
| 36 | - ?></span> |
|
| 35 | + } |
|
| 36 | + ?></span> |
|
| 37 | 37 | <?php } elseif (isset($before_mp) || isset($after_mp)) { ?> |
| 38 | 38 | <span class="your-mp__vote">N/A</span> |
| 39 | 39 | <?php } ?> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <div class="debate-speech__division__your-mp"> |
| 2 | - <?php if (!isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?> |
|
| 2 | + <?php if (!isset($main_vote_mp) || !$main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?> |
|
| 3 | 3 | <div class="your-mp__header"> |
| 4 | 4 | <h3>How your <?= $division['members']['singular'] ?> voted</h3> |
| 5 | 5 | <p> |
@@ -1,5 +1,6 @@ |
||
| 1 | 1 | <div class="debate-speech__division__your-mp"> |
| 2 | - <?php if (!isset($main_vote_mp) || ! $main_vote_mp) { /* $main_vote_mp is true if an MP has been requested via the URL */ ?> |
|
| 2 | + <?php if (!isset($main_vote_mp) || ! $main_vote_mp) { |
|
| 3 | +/* $main_vote_mp is true if an MP has been requested via the URL */ ?> |
|
| 3 | 4 | <div class="your-mp__header"> |
| 4 | 5 | <h3>How your <?= $division['members']['singular'] ?> voted</h3> |
| 5 | 6 | <p> |