r96023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96022‎ | r96023 | r96024 >
Date:18:26, 1 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added table sort
Modified paths:
  • /trunk/extensions/Survey/specials/SpecialSurveys.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/specials/SpecialSurveys.php
@@ -122,18 +122,20 @@
123123
124124 $out->addHTML( Xml::openElement(
125125 'table',
126 - array( 'class' => 'wikitable', 'style' => 'width:400px' )
 126+ array( 'class' => 'wikitable sortable', 'style' => 'width:400px' )
127127 ) );
128128
129129 $out->addHTML(
130 - '<tr>' .
 130+ '<thead><tr>' .
131131 Html::element( 'th', array(), wfMsg( 'surveys-special-name' ) ) .
132132 Html::element( 'th', array(), wfMsg( 'surveys-special-status' ) ) .
133 - Html::element( 'th', array(), wfMsg( 'surveys-special-edit' ) ) .
134 - Html::element( 'th', array(), wfMsg( 'surveys-special-delete' ) ) .
135 - '</tr>'
 133+ Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-edit' ) ) .
 134+ Html::element( 'th', array( 'class' => 'unsortable' ), wfMsg( 'surveys-special-delete' ) ) .
 135+ '</tr></thead>'
136136 );
137137
 138+ $out->addHTML( '<tbody>' );
 139+
138140 foreach ( $surveys as $survey ) {
139141 $out->addHTML(
140142 '<tr>' .
@@ -172,6 +174,7 @@
173175 );
174176 }
175177
 178+ $out->addHTML( '</tbody>' );
176179 $out->addHTML( '</table>' );
177180 }
178181

Status & tagging log