diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 80f60ccca..a3b844c18 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -528,7 +528,7 @@ li.module-hover { grid-auto-rows: 2em; grid-column-gap: 1em; grid-row-gap: 1em; - grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); width: 100%; .table-header { @@ -767,7 +767,7 @@ li.module-hover { grid-auto-rows: 2em; grid-column-gap: 1em; grid-row-gap: 1em; - grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); width: 100%; .table-header { @@ -926,6 +926,23 @@ li.module-hover { display: none; } + .more-users { + align-items: center; + background: $color-volcano; + border-radius: 50%; + color: $color-white; + cursor: pointer; + display: flex; + height: 2em; + justify-content: center; + margin-right: .25em; + width: 2em; + + &:hover { + text-decoration: none; + } + } + .new-user { align-items: center; background: $color-concrete; diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index a6140144f..5fcb1e236 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -6,11 +6,11 @@ module ProjectsHelper end def user_names_with_roles(user_projects) - user_projects.map { |up| user_name_with_role(up) }.join(' ') + user_projects.map { |up| user_name_with_role(up) }.join(' ').html_safe end def user_name_with_role(user_project) - "#{user_project.user.name} - #{I18n.t("user_projects.enums.role.#{user_project.role}")}" + sanitize_input("#{user_project.user.name} - #{I18n.t("user_projects.enums.role.#{user_project.role}")}") end def construct_module_connections(my_module) diff --git a/app/views/projects/index/_project_card.html.erb b/app/views/projects/index/_project_card.html.erb index a4ca471fc..7a3e9f32c 100644 --- a/app/views/projects/index/_project_card.html.erb +++ b/app/views/projects/index/_project_card.html.erb @@ -37,16 +37,16 @@ <%= t('projects.index.card.users') %>
- <% project.user_projects[0..4].each do |user_project| %> + <% project.user_projects[0..3].each do |user_project| %> <%= image_tag(avatar_path(user_project.user, :icon_small), title: user_name_with_role(user_project)) %> <% end %> - <% more_users = project.user_projects[5..-1].to_a %> + <% more_users = project.user_projects[4..-1].to_a %> <% if more_users.any? %> - - + <%= more_users.size %> + + +<%= more_users.size %> <% end %>