Revert r48479 "(bug 13287) Edit links don't work as expected. Removed the edit links entirely. We already link to the pages anyway and the edit links were causing UI clutter."

Removing the links to edit the UI messages means it's necessary to dig around and guess at names to update the gadget descriptions. IMHO this is pretty terrible, and definitely a step backwards in usability.
This commit is contained in:
Brion Vibber 2009-03-17 21:49:13 +00:00
parent b8f635e5ed
commit 34bcf4f528

View file

@ -54,27 +54,29 @@ class SpecialGadgets extends SpecialPage {
foreach ( $gadgets as $section => $entries ) { foreach ( $gadgets as $section => $entries ) {
if ( $section !== false && $section !== '' ) { if ( $section !== false && $section !== '' ) {
$t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-section-$section$lang" ); $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-section-$section$lang" );
$lnk = $t ? $skin->makeLinkObj( $t, wfMsgHTML("edit") ) : htmlspecialchars($section); $lnk = $t ? $skin->makeLinkObj( $t, wfMsgHTML("edit"), 'action=edit' ) : htmlspecialchars($section);
$ttext = wfMsgExt( "gadget-section-$section", $msgOpt ); $ttext = wfMsgExt( "gadget-section-$section", $msgOpt );
if( $listOpen ) { if( $listOpen ) {
$wgOut->addHTML( '</ul>' ); $wgOut->addHTML( '</ul>' );
$listOpen = false; $listOpen = false;
} }
$wgOut->addHTML( "\n<h2>$ttext</h2>\n" ); $wgOut->addHTML( "\n<h2>$ttext &nbsp; &nbsp; [$lnk]</h2>\n" );
} }
foreach ( $entries as $gname => $code ) { foreach ( $entries as $gname => $code ) {
$t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-$gname$lang" ); $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-$gname$lang" );
if ( !$t ) continue; if ( !$t ) continue;
$lnk = $skin->makeLinkObj( $t, wfMsgHTML("edit"), 'action=edit' );
$ttext = wfMsgExt( "gadget-$gname", $msgOpt ); $ttext = wfMsgExt( "gadget-$gname", $msgOpt );
if( !$listOpen ) { if( !$listOpen ) {
$listOpen = true; $listOpen = true;
$wgOut->addHTML( '<ul>' ); $wgOut->addHTML( '<ul>' );
} }
$wgOut->addHTML( "<li>$ttext<br />" ); $wgOut->addHTML( "<li>" );
$wgOut->addHTML( "$ttext &nbsp; &nbsp; [$lnk]<br />" );
$wgOut->addHTML( wfMsgHTML( "gadgets-uses" ) . wfMsg( 'colon-separator' ) ); $wgOut->addHTML( wfMsgHTML( "gadgets-uses" ) . wfMsg( 'colon-separator' ) );