Do topbar menu 'properly', and add stripes to tables
This commit is contained in:
@@ -380,23 +380,9 @@ class NextBestNetworkTemplate extends BaseTemplate {
|
||||
if(preg_match( '/specialpages|whatlinkshere/', $key )) {
|
||||
$divideditems[] = [];
|
||||
}
|
||||
unset($item['icon']);
|
||||
$divideditems[$key] = $item;
|
||||
}
|
||||
|
||||
// Add page history link at bottom
|
||||
$views = $this->data['view_urls'];
|
||||
if( isset( $views['history'] ) ) {
|
||||
if (
|
||||
array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' )
|
||||
|| array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' )
|
||||
) {
|
||||
$divideditems['history'] = array_shift( $this->data['namespace_urls'] );
|
||||
} else {
|
||||
$divideditems['history'] = $views['history'];
|
||||
}
|
||||
}
|
||||
|
||||
return [[
|
||||
'href' => '#',
|
||||
'html' => $html,
|
||||
@@ -413,18 +399,40 @@ class NextBestNetworkTemplate extends BaseTemplate {
|
||||
if(!isset( $item['text'] ) ) {
|
||||
$item['text'] = wfMessage( isset( $item['msg'] ) ? $item['msg'] : $key )->text();
|
||||
}
|
||||
|
||||
// Remove icons
|
||||
if(isset( $item['icon'] ) ) {
|
||||
unset( $item['icon'] );
|
||||
}
|
||||
|
||||
if(preg_match( '/specialpages|whatlinkshere/', $key )) {
|
||||
$divideditems[] = [];
|
||||
}
|
||||
$divideditems[$key] = $item;
|
||||
}
|
||||
|
||||
// Special section, just for our historians
|
||||
$divideditems[] = [];
|
||||
$divideditems['recent'] = [
|
||||
'text' => wfMessage( 'recentchanges' )->plain(),
|
||||
'href' => Title::newFromText( 'Special:RecentChanges' )->getLocalURL(),
|
||||
'id' => 't-recentchanges',
|
||||
];
|
||||
return [[
|
||||
|
||||
// Add page history link at bottom
|
||||
$views = $this->data['view_urls'];
|
||||
if( isset( $views['history'] ) ) {
|
||||
if (
|
||||
array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' )
|
||||
|| array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' )
|
||||
) {
|
||||
$divideditems['history'] = array_shift( $this->data['namespace_urls'] );
|
||||
} else {
|
||||
$divideditems['history'] = $views['history'];
|
||||
}
|
||||
}
|
||||
|
||||
return [[
|
||||
'href' => '#',
|
||||
'html' => $html,
|
||||
'id' => 't-tools',
|
||||
|
||||
Reference in New Issue
Block a user