Clean up ProofreadPage page tabs a bit

Basically, move a bunch of the logic to ProofreadPage itself, and only
do some timeless-specific reordering/styling as due to its Special
nature. Because timeless is Special.

Bug: T231250
Depends-On: Ifd8be387cef671b2aaa2a482c145bccf2e6d1543
Change-Id: I6fd7b648e459fee60569a06ffa1f0a5eb179c9ba
isekai
Isarra 6 years ago
parent 51b19c4e84
commit 728c3eb1a7

@ -802,7 +802,6 @@ class TimelessTemplate extends BaseTemplate {
// Extra sorting for Extension:ProofreadPage namespace items // Extra sorting for Extension:ProofreadPage namespace items
$tabs = [ $tabs = [
'proofreadPagePrevLink',
// This is the order we want them in... // This is the order we want them in...
'proofreadPageScanLink', 'proofreadPageScanLink',
'proofreadPageIndexLink', 'proofreadPageIndexLink',
@ -813,21 +812,10 @@ class TimelessTemplate extends BaseTemplate {
$toMove = $sortedPileOfTools['namespaces'][$tab]; $toMove = $sortedPileOfTools['namespaces'][$tab];
unset( $sortedPileOfTools['namespaces'][$tab] ); unset( $sortedPileOfTools['namespaces'][$tab] );
// add a hover tooltip, mostly for the icons // move to end!
$toMove['title'] = $toMove['text'];
if ( $tab === 'proofreadPagePrevLink' ) {
// prev at start
$sortedPileOfTools['namespaces'] = array_merge(
[ $tab => $toMove ],
$sortedPileOfTools['namespaces']
);
} else {
// move others to end
$sortedPileOfTools['namespaces'][$tab] = $toMove; $sortedPileOfTools['namespaces'][$tab] = $toMove;
} }
} }
}
return $sortedPileOfTools; return $sortedPileOfTools;
} }

Loading…
Cancel
Save