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 5 years ago
parent 51b19c4e84
commit 728c3eb1a7

@ -802,7 +802,6 @@ class TimelessTemplate extends BaseTemplate {
// Extra sorting for Extension:ProofreadPage namespace items
$tabs = [
'proofreadPagePrevLink',
// This is the order we want them in...
'proofreadPageScanLink',
'proofreadPageIndexLink',
@ -813,19 +812,8 @@ class TimelessTemplate extends BaseTemplate {
$toMove = $sortedPileOfTools['namespaces'][$tab];
unset( $sortedPileOfTools['namespaces'][$tab] );
// add a hover tooltip, mostly for the icons
$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;
}
// move to end!
$sortedPileOfTools['namespaces'][$tab] = $toMove;
}
}

Loading…
Cancel
Save