r70447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70446‎ | r70447 | r70448 >
Date:01:58, 4 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
HTML/CSS clean-up in CetralNotice
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)
  • /trunk/extensions/CentralNotice/centralnotice.css (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/centralnotice.css
@@ -18,6 +18,9 @@
1919 #preferences fieldset.prefsection h2 {
2020 border:none;
2121 }
 22+#preferences div.cn-pager {
 23+ margin:1em 0;
 24+}
2225 #preferences div.cn-error {
2326 color:#AA0000;
2427 margin:1em;
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -152,9 +152,9 @@
153153 );
154154 }
155155 $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-manage-templates' ) );
156 - $htmlOut .= $pager->getNavigationBar() .
157 - $pager->getBody() .
158 - $pager->getNavigationBar();
 156+ $htmlOut .= Xml::tags( 'div', array( 'class' => 'cn-pager' ), $pager->getNavigationBar() );
 157+ $htmlOut .= $pager->getBody();
 158+ $htmlOut .= Xml::tags( 'div', array( 'class' => 'cn-pager' ), $pager->getNavigationBar() );
159159
160160 if ( $this->editable ) {
161161 $htmlOut .= Xml::closeElement( 'form' );
@@ -333,17 +333,17 @@
334334 );
335335 $htmlOut .= Xml::closeElement( 'tr' );
336336 }
 337+ $htmlOut .= Xml::closeElement( 'table' );
 338+
337339 if ( $this->editable ) {
338340 $htmlOut .= Xml::hidden( 'wpUserLanguage', $wpUserLang );
339 - $htmlOut .= Xml::openElement( 'tr' );
340 - $htmlOut .= Xml::tags( 'td', array( 'colspan' => 4 ),
341 - Xml::submitButton( wfMsg( 'centralnotice-modify' ), array( 'name' => 'update' ) )
 341+ $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 342+ $htmlOut .= Xml::tags( 'div',
 343+ array( 'class' => 'cn-buttons' ),
 344+ Xml::submitButton( wfMsg( 'centralnotice-modify' ), array( 'name' => 'update' ) )
342345 );
343 - $htmlOut .= Xml::closeElement( 'tr' );
344346 }
345 -
346 - $htmlOut .= Xml::closeElement( 'table' );
347 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 347+
348348 $htmlOut .= Xml::closeElement( 'fieldset' );
349349
350350 if ( $this->editable ) {
@@ -395,13 +395,14 @@
396396 $htmlOut .= Xml::tags( 'tr', null,
397397 Xml::tags( 'td', null, Xml::textarea( 'templateBody', $body, 60, 20, $readonly ) )
398398 );
 399+ $htmlOut .= Xml::closeElement( 'table' );
399400 if ( $this->editable ) {
400 - $htmlOut .= Xml::tags( 'tr', null,
401 - Xml::tags( 'td', null, Xml::submitButton( wfMsg( 'centralnotice-modify' ) ) )
 401+ $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 402+ $htmlOut .= Xml::tags( 'div',
 403+ array( 'class' => 'cn-buttons' ),
 404+ Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
402405 );
403406 }
404 - $htmlOut .= Xml::closeElement( 'table' );
405 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
406407 $htmlOut .= Xml::closeElement( 'fieldset' );
407408 if ( $this->editable ) {
408409 $htmlOut .= Xml::closeElement( 'form' );
@@ -767,15 +768,14 @@
768769 function getEndBody() {
769770 global $wgUser;
770771 $htmlOut = '';
 772+ $htmlOut .= Xml::closeElement( 'table' );
771773 if ( $this->editable ) {
772 - $htmlOut .= Xml::tags( 'tr', null,
773 - Xml::tags( 'td', array( 'colspan' => 3 ),
774 - Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
775 - )
 774+ $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
 775+ $htmlOut .= Xml::tags( 'div',
 776+ array( 'class' => 'cn-buttons' ),
 777+ Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
776778 );
777779 }
778 - $htmlOut .= Xml::closeElement( 'table' );
779 - $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() );
780780 return $htmlOut;
781781 }
782782 }

Status & tagging log