From 6d2eaafa0c0c39fd2bfe70cc7e739ff4944776af Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 6 Sep 2024 17:56:10 +0200 Subject: [PATCH] Add link to `/admin/roles` in moderation interface when changing someone's role --- app/views/admin/users/roles/show.html.haml | 3 ++- config/locales/en.yml | 1 + config/locales/simple_form.en.yml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/admin/users/roles/show.html.haml b/app/views/admin/users/roles/show.html.haml index f26640f2a1af8f..01b3830f4eba5b 100644 --- a/app/views/admin/users/roles/show.html.haml +++ b/app/views/admin/users/roles/show.html.haml @@ -7,7 +7,8 @@ collection: UserRole.assignable, include_blank: I18n.t('admin.accounts.change_role.no_role'), label_method: :name, - wrapper: :with_block_label + wrapper: :with_block_label, + hint: safe_join([I18n.t('simple_form.hints.user.role'), ' ', link_to(I18n.t('admin.accounts.change_role.edit_roles'), admin_roles_path)]) .actions = f.button :button, diff --git a/config/locales/en.yml b/config/locales/en.yml index 267e04618b648f..b1006f5d5d9188 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -46,6 +46,7 @@ en: title: Change email for %{username} change_role: changed_msg: Role successfully changed! + edit_roles: Manage user roles label: Change role no_role: No role title: Change role for %{username} diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index fee3a6151ad419..c1fae7e83e2305 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -130,7 +130,7 @@ en: name: You can only change the casing of the letters, for example, to make it more readable user: chosen_languages: When checked, only posts in selected languages will be displayed in public timelines - role: The role controls which permissions the user has + role: The role controls which permissions the user has. user_role: color: Color to be used for the role throughout the UI, as RGB in hex format highlighted: This makes the role publicly visible