From ea2fd2cade44ea8c38d818021d1414cfc0dea76a Mon Sep 17 00:00:00 2001 From: IanM Date: Wed, 2 Oct 2024 09:53:12 +0100 Subject: [PATCH] Revert "feat: provide an 'actions' dropdown for extensions to add their additional buttons" This reverts commit 772852b3b3a83ef768c3c05b576adec565b8a419. --- .../js/src/admin/components/UserListPage.tsx | 36 +++++-------------- framework/core/locale/core.yml | 4 +-- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/framework/core/js/src/admin/components/UserListPage.tsx b/framework/core/js/src/admin/components/UserListPage.tsx index 425b568956..aa06afbfc1 100644 --- a/framework/core/js/src/admin/components/UserListPage.tsx +++ b/framework/core/js/src/admin/components/UserListPage.tsx @@ -18,7 +18,6 @@ import extractText from '../../common/utils/extractText'; import AdminPage from './AdminPage'; import { debounce } from '../../common/utils/throttleDebounce'; import CreateUserModal from './CreateUserModal'; -import Dropdown from '../../common/components/Dropdown'; type ColumnData = { /** @@ -426,18 +425,17 @@ export default class UserListPage extends AdminPage { ); columns.add( - 'userActions', + 'editUser', { - name: app.translator.trans('core.admin.users.grid.columns.user_actions.title'), + name: app.translator.trans('core.admin.users.grid.columns.edit_user.title'), content: (user: User) => ( - app.modal.show(EditUserModal, { user })} > - {this.userActionItems(user).toArray()} - + {app.translator.trans('core.admin.users.grid.columns.edit_user.button')} + ), }, -90 @@ -455,24 +453,6 @@ export default class UserListPage extends AdminPage { }; } - userActionItems(user: User): ItemList { - const items = new ItemList(); - - items.add( - 'editUser', - - ); - - return items; - } - /** * Asynchronously fetch the next set of users to be rendered. * diff --git a/framework/core/locale/core.yml b/framework/core/locale/core.yml index 8e2184cc6f..24eeb31645 100644 --- a/framework/core/locale/core.yml +++ b/framework/core/locale/core.yml @@ -271,6 +271,7 @@ core: edit_user: button: => core.ref.edit + title: => core.ref.edit_user tooltip: Edit {username} email: @@ -285,9 +286,6 @@ core: join_time: title: Joined - user_actions: - title: Actions - user_id: title: ID