Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php |
— | — | @@ -95,6 +95,7 @@ |
96 | 96 | } |
97 | 97 | table.person { |
98 | 98 | margin-bottom: 1em; |
| 99 | + border: none; |
99 | 100 | } |
100 | 101 | table.person td.name { |
101 | 102 | font-weight: bold; |
— | — | @@ -168,22 +169,54 @@ |
169 | 170 | $congressTable = ''; |
170 | 171 | |
171 | 172 | if ( $myRepresentative ) { |
172 | | - $congressTable .= '<table class="person" border="0" cellspacing="0" cellpadding="0" style="border:none;">'; |
173 | | - $congressTable .= '<tr><td class="name">'.$myRepresentative[0]['name'].'</td></tr>'; |
174 | | - $congressTable .= '<tr><td>'.wfMsg( 'congresslookup-phone', $myRepresentative[0]['phone'] ).'</td></tr>'; |
175 | | - $congressTable .= '<tr><td>'.wfMsg( 'congresslookup-fax', $myRepresentative[0]['fax'] ).'</td></tr>'; |
176 | | - $congressTable .= '<tr><td><a href="'.$myRepresentative[0]['contactform'].'" target="_blank">'; |
177 | | - $congressTable .= wfMsg( 'congresslookup-contact-form' ).'</a></td></tr>'; |
178 | | - $congressTable .= '</table>'; |
| 173 | + $congressTable .= Html::openElement( 'table', array ( |
| 174 | + 'class' => 'person', 'cellpadding' => 0, 'cellspacing' => 0, 'border' => 0 |
| 175 | + ) ); |
| 176 | + $congressTable .= Html::openElement( 'tr' ); |
| 177 | + $congressTable .= Html::element( 'td', array ( 'class' => 'name' ), $myRepresentative[0]['name'] ); |
| 178 | + $congressTable .= Html::openElement( 'tr' ); |
| 179 | + $congressTable .= Html::closeElement( 'tr' ); |
| 180 | + $congressTable .= Html::element( 'td', array(), wfMsg( 'congresslookup-phone', $myRepresentative[0]['phone'] ) ); |
| 181 | + $congressTable .= Html::openElement( 'tr' ); |
| 182 | + $congressTable .= Html::closeElement( 'tr' ); |
| 183 | + $congressTable .= Html::element( 'td', array(), wfMsg( 'congresslookup-fax', $myRepresentative[0]['fax'] ) ); |
| 184 | + $congressTable .= Html::openElement( 'tr' ); |
| 185 | + $congressTable .= Html::closeElement( 'tr' ); |
| 186 | + $congressTable .= Html::openElement( 'td' ); |
| 187 | + $congressTable .= Html::element( 'a', array ( |
| 188 | + 'href' => $myRepresentative[0]['contactform'], |
| 189 | + 'target' => '_blank', |
| 190 | + ), |
| 191 | + wfMsg( 'congresslookup-contact-form' ) |
| 192 | + ); |
| 193 | + $congressTable .= Html::closeElement( 'td' ); |
| 194 | + $congressTable .= Html::closeElement( 'tr' ); |
| 195 | + $congressTable .= Html::closeElement( 'table' ); |
179 | 196 | } |
180 | 197 | foreach ( $mySenators as $senator ) { |
181 | | - $congressTable .= '<table class="person" border="0" cellspacing="0" cellpadding="0" style="border:none;">'; |
182 | | - $congressTable .= '<tr><td class="name">'.$senator['name'].'</td></tr>'; |
183 | | - $congressTable .= '<tr><td>'.wfMsg( 'congresslookup-phone', $senator['phone'] ).'</td></tr>'; |
184 | | - $congressTable .= '<tr><td>'.wfMsg( 'congresslookup-fax', $senator['fax'] ).'</td></tr>'; |
185 | | - $congressTable .= '<tr><td><a href="'.$senator['contactform'].'" target="_blank">'; |
186 | | - $congressTable .= wfMsg( 'congresslookup-contact-form' ).'</a></td></tr>'; |
187 | | - $congressTable .= '</table>'; |
| 198 | + $congressTable .= Html::openElement( 'table', array ( |
| 199 | + 'class' => 'person', 'cellpadding' => 0, 'cellspacing' => 0, 'border' => 0 |
| 200 | + ) ); |
| 201 | + $congressTable .= Html::openElement( 'tr' ); |
| 202 | + $congressTable .= Html::element( 'td', array ( 'class' => 'name' ), $senator['name'] ); |
| 203 | + $congressTable .= Html::openElement( 'tr' ); |
| 204 | + $congressTable .= Html::closeElement( 'tr' ); |
| 205 | + $congressTable .= Html::element( 'td', array(), wfMsg( 'congresslookup-phone', $senator['phone'] ) ); |
| 206 | + $congressTable .= Html::openElement( 'tr' ); |
| 207 | + $congressTable .= Html::closeElement( 'tr' ); |
| 208 | + $congressTable .= Html::element( 'td', array(), wfMsg( 'congresslookup-fax', $senator['fax'] ) ); |
| 209 | + $congressTable .= Html::openElement( 'tr' ); |
| 210 | + $congressTable .= Html::closeElement( 'tr' ); |
| 211 | + $congressTable .= Html::openElement( 'td' ); |
| 212 | + $congressTable .= Html::element( 'a', array ( |
| 213 | + 'href' => $senator['contactform'], |
| 214 | + 'target' => '_blank', |
| 215 | + ), |
| 216 | + wfMsg( 'congresslookup-contact-form' ) |
| 217 | + ); |
| 218 | + $congressTable .= Html::closeElement( 'td' ); |
| 219 | + $congressTable .= Html::closeElement( 'tr' ); |
| 220 | + $congressTable .= Html::closeElement( 'table' ); |
188 | 221 | } |
189 | 222 | |
190 | 223 | return $congressTable; |