Last modified: 2014-02-12 23:35:49 UTC
$wgOut->addHTML( Xml::openElement( 'table', array( 'class' => 'TablePager' ) ) ); $wgOut->addHTML( '<thead>' ); $wgOut->addHTML( '<tr>' ); $wgOut->addHTML( '<th>' ); Things like that, just suck Having a table object(or something).. $table->openTable(); $table->addHeaderRow( array( 'foo', 'bar, 'baz' ) ); $table->openBody(); $table->addRow( array( 'lol', '1', '2' ) ); $table->addRow( array( 'zing', '3', '4' ) ); $table->closeBody(); $table->closeTable(); Or something, whatever, would be nicer... Maybe some part of OutputPage or something?
Ew not OutputPage, it could be used in lots of other places too. Make a TableBuilder class or something.
We've got HTMLForm. Writing a HTMLTable class makes sense.
Is this still an interesting feature? What possibilities would it bring to, say, Wikipedia editors compared with the current options of wikitext tables + basic html tables? I guess nobody is currently planning to work on this?
(In reply to comment #2) > We've got HTMLForm. Writing a HTMLTable class makes sense. Would this still be a good idea? Is this a task simple enough for a Google Code-in student? https://www.mediawiki.org/wiki/Google_Code-In
(In reply to comment #2) > We've got HTMLForm. Writing a HTMLTable class makes sense. Ugh, I'd say that not really. The class we're imagining here would probably be more akin to XmlSelect. (In reply to comment #3) > What possibilities would it bring to, > say, Wikipedia editors compared with the current options of wikitext tables + > basic html tables? None, because it's not related. This is only about nicer methods of generating tables on PHP-side. It should be simple enough for GCI, assuming that a) we want this and b) we have some use-cases.