From 207705fced3fc226e2334faeceea6616fae9dc77 Mon Sep 17 00:00:00 2001 From: suecarmol Date: Tue, 28 Jun 2022 18:07:21 -0500 Subject: [PATCH] User menu overflow: add change block and unblock Added the "Change block" and "Unblock user" to the array of possible menu entries for the overflow menu. These buttons will only appear when a user is already blocked. Bug: T308570 Change-Id: I987083cfeb20a0c691d3fc631a9c844647fec9bf Depends-On: If60a1194d63fff2b7b5ae1565be25a3b7b44fdf1 --- i18n/en.json | 2 ++ i18n/qqq.json | 2 ++ includes/Menu/PageActions/UserNamespaceOverflowBuilder.php | 3 +++ skin.json | 1 + 4 files changed, 8 insertions(+) diff --git a/i18n/en.json b/i18n/en.json index cce313097..d05a03ae2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -48,10 +48,12 @@ "minerva-page-actions-info": "Page information", "minerva-page-actions-permalink": "Permanent link", "minerva-page-actions-backlinks": "What links here", + "minerva-page-actions-change-block": "Change block", "minerva-page-actions-cite": "Cite page", "minerva-page-actions-move": "Move", "minerva-page-actions-delete": "Delete", "minerva-page-actions-protect": "Protect", + "minerva-page-actions-unblock": "Unblock user", "minerva-page-actions-unprotect": "Unprotect", "minerva-page-actions-user-groups": "User groups", "minerva-page-actions-block": "Block user", diff --git a/i18n/qqq.json b/i18n/qqq.json index 23838cf0b..29009df48 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -62,10 +62,12 @@ "minerva-page-actions-info": "In the secondary page menu, the page information button label", "minerva-page-actions-permalink": "In the secondary page menu, the permanent link button label\n\nSee also:\n* {{msg-mw|permalink}}", "minerva-page-actions-backlinks": "In the secondary page menu, the 'what links here' incoming links button label\n\nSee also:\n* {{msg-mw|whatlinkshere}}", + "minerva-page-actions-change-block": "In the secondary page menu, the change block button label", "minerva-page-actions-cite": "In the secondary page menu, the cite this page button label\n\nSee also:\n* {{msg-mw|citethispage-link}}", "minerva-page-actions-move": "In the secondary page menu, the move this page button label\n\nSee also:\n* {{msg-mw|move}}\n{{identical|Move}}", "minerva-page-actions-delete": "In the secondary page menu, the delete this page button label\n\nSee also:\n* {{msg-mw|delete}}\n{{identical|Delete}}", "minerva-page-actions-protect": "In the secondary page menu, the protect this page button label\n\nSee also:\n* {{msg-mw|protect}}", + "minerva-page-actions-unblock": "In the secondary page menu, the unblock button label", "minerva-page-actions-unprotect": "In the secondary page menu, the unprotect this page button label\n\nSee also:\n* {{msg-mw|unprotect}}", "minerva-page-actions-user-groups": "In the secondary page menu for user pages, the user groups button label", "minerva-page-actions-block": "In the secondary page menu for user pages, the block button label", diff --git a/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php b/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php index 41410d929..52db51be2 100644 --- a/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php +++ b/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php @@ -96,6 +96,8 @@ class UserNamespaceOverflowBuilder implements IOverflowBuilder { $possibleEntries = array_filter( [ $this->buildFromToolbox( 'user-groups', 'userGroup', 'userrights', $toolbox ), $this->buildFromToolbox( 'block', 'block', 'blockip', $toolbox ), + $this->buildFromToolbox( 'change-block', 'block', 'changeblockip', $toolbox ), + $this->buildFromToolbox( 'unblock', 'unBlock', 'unblockip', $toolbox ), $this->buildFromToolbox( 'logs', 'listBullet', 'log', $toolbox ), $this->buildFromToolbox( 'info', 'infoFilled', 'info', $toolbox ), $this->buildFromToolbox( 'permalink', 'link', 'permalink', $toolbox ), @@ -111,6 +113,7 @@ class UserNamespaceOverflowBuilder implements IOverflowBuilder { foreach ( $possibleEntries as $menuEntry ) { $group->insertEntry( $menuEntry ); } + return $group; } diff --git a/skin.json b/skin.json index d84c15902..a2a338625 100644 --- a/skin.json +++ b/skin.json @@ -334,6 +334,7 @@ "listBullet", "logoWikidata", "quotes", + "unBlock", "unLock", "userAvatarOutline", "userTalk",