From 0fe3f5f38f1acfcfbfe478a44e10e92d9ebec109 Mon Sep 17 00:00:00 2001 From: ajugo Date: Tue, 14 Mar 2023 18:41:32 +0100 Subject: [PATCH] Fix missing tooltip and hover effect for access modal role selection [SCI-8122] (#5140) --- app/assets/stylesheets/access_permissions/access_modal.scss | 4 ++-- app/helpers/user_roles_helper.rb | 6 +++++- .../access_permissions/partials/_member_field.html.erb | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/access_permissions/access_modal.scss b/app/assets/stylesheets/access_permissions/access_modal.scss index 057277f4c..fcd16a038 100644 --- a/app/assets/stylesheets/access_permissions/access_modal.scss +++ b/app/assets/stylesheets/access_permissions/access_modal.scss @@ -1,10 +1,10 @@ #user_assignments_modal { .btn-role-select { - padding: 0; + padding: 0 0 0 16px; &:hover { - background-color: $color-white; + background-color: $color-concrete; } &:focus { diff --git a/app/helpers/user_roles_helper.rb b/app/helpers/user_roles_helper.rb index 1a491c882..17bf224dd 100644 --- a/app/helpers/user_roles_helper.rb +++ b/app/helpers/user_roles_helper.rb @@ -6,7 +6,11 @@ module UserRolesHelper permissions = permission_group.constants.map { |const| permission_group.const_get(const) } roles = user_roles_subset_by_permissions(permissions).order(id: :asc).pluck(:name, :id) - roles = [[t('access_permissions.reset'), 'reset']] + roles if with_inherit + if with_inherit + roles = [[t('access_permissions.reset'), 'reset', + t("access_permissions.partials.#{object.class.name.underscore}_member_field.reset_description")]] + + roles + end roles end diff --git a/app/views/access_permissions/partials/_member_field.html.erb b/app/views/access_permissions/partials/_member_field.html.erb index 656cfa96f..d78808c3e 100644 --- a/app/views/access_permissions/partials/_member_field.html.erb +++ b/app/views/access_permissions/partials/_member_field.html.erb @@ -29,7 +29,7 @@