Fix missing tooltip and hover effect for access modal role selection [SCI-8122] (#5140)

This commit is contained in:
ajugo 2023-03-14 18:41:32 +01:00 committed by GitHub
parent 3c18e42d5e
commit 0fe3f5f38f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -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 {

View file

@ -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

View file

@ -29,7 +29,7 @@
<ul class="dropdown-menu dropdown-menu-right user-assignment-dropdown" aria-labelledby="userAccess_<%= user.id %>">
<% user_roles_collection(assignable, with_inherit: with_inherit).each do |role| %>
<li>
<a href="#" data-turbolinks="false" class="user-role-selector" data-role-id="<%= role[1] %>">
<a href="#" data-turbolinks="false" class="user-role-selector" title="<%= role[2] %>" data-role-id="<%= role[1] %>">
<%= role[0] %>
</a>
</li>