mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Add move, delete, and protect options on mobile AMC user page
Turns out user page is using UserNamespaceOverflowBuilder instead of DefaultOverflowBuilder. This change is added move, delete, and protect entries to UserNamespaceOverflowBuilder::getGroup, so those options would appear in overflow menu on user page. Bug: T283549 Change-Id: I8a22b57aaa195773ae9e82bd1e01f323a2c0e6e1
This commit is contained in:
parent
215364be3a
commit
00b06825c8
|
@ -90,12 +90,22 @@ class UserNamespaceOverflowBuilder implements IOverflowBuilder {
|
|||
) );
|
||||
}
|
||||
|
||||
$permissionChangeAction = array_key_exists( 'unprotect', $actions ) ?
|
||||
$this->buildFromToolbox( 'unprotect', 'unLock', 'unprotect', $actions ) :
|
||||
$this->buildFromToolbox( 'protect', 'lock', 'protect', $actions );
|
||||
|
||||
$possibleEntries = array_filter( [
|
||||
$this->buildFromToolbox( 'user-groups', 'userGroup', 'userrights', $toolbox ),
|
||||
$this->buildFromToolbox( 'logs', 'listBullet', 'log', $toolbox ),
|
||||
$this->buildFromToolbox( 'info', 'infoFilled', 'info', $toolbox ),
|
||||
$this->buildFromToolbox( 'permalink', 'link', 'permalink', $toolbox ),
|
||||
$this->buildFromToolbox( 'backlinks', 'articleRedirect', 'whatlinkshere', $toolbox )
|
||||
$this->buildFromToolbox( 'backlinks', 'articleRedirect', 'whatlinkshere', $toolbox ),
|
||||
$this->permissions->isAllowed( IMinervaPagePermissions::MOVE ) ?
|
||||
$this->buildFromToolbox( 'move', 'move', 'move', $actions ) : null,
|
||||
$this->permissions->isAllowed( IMinervaPagePermissions::DELETE ) ?
|
||||
$this->buildFromToolbox( 'delete', 'trash', 'delete', $actions ) : null,
|
||||
$this->permissions->isAllowed( IMinervaPagePermissions::PROTECT ) ?
|
||||
$permissionChangeAction : null
|
||||
] );
|
||||
|
||||
foreach ( $possibleEntries as $menuEntry ) {
|
||||
|
|
Loading…
Reference in a new issue