http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96023
Revision: 96023
Author: jeroendedauw
Date: 2011-09-01 18:26:30 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
added table sort
Modified Paths:
--------------
trunk/extensions/Survey/specials/SpecialSurveys.php
Modified: trunk/extensions/Survey/specials/SpecialSurveys.php
===================================================================
--- trunk/extensions/Survey/specials/SpecialSurveys.php 2011-09-01 18:17:18 UTC
(rev 96022)
+++ trunk/extensions/Survey/specials/SpecialSurveys.php 2011-09-01 18:26:30 UTC
(rev 96023)
@@ -122,18 +122,20 @@
$out->addHTML( Xml::openElement(
'table',
- array( 'class' => 'wikitable', 'style' => 'width:400px'
)
+ array( 'class' => 'wikitable sortable', 'style' =>
'width:400px' )
) );
$out->addHTML(
- '<tr>' .
+ '<thead><tr>' .
Html::element( 'th', array(), wfMsg(
'surveys-special-name' ) ) .
Html::element( 'th', array(), wfMsg(
'surveys-special-status' ) ) .
- Html::element( 'th', array(), wfMsg(
'surveys-special-edit' ) ) .
- Html::element( 'th', array(), wfMsg(
'surveys-special-delete' ) ) .
- '</tr>'
+ Html::element( 'th', array( 'class' =>
'unsortable' ), wfMsg( 'surveys-special-edit' ) ) .
+ Html::element( 'th', array( 'class' =>
'unsortable' ), wfMsg( 'surveys-special-delete' ) ) .
+ '</tr></thead>'
);
+ $out->addHTML( '<tbody>' );
+
foreach ( $surveys as $survey ) {
$out->addHTML(
'<tr>' .
@@ -172,6 +174,7 @@
);
}
+ $out->addHTML( '</tbody>' );
$out->addHTML( '</table>' );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs