Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Set principal class on the name inside admin->users table

Henriette Dargec1ff1232270e
diff --git a/app/components/users/row_component.rb b/app/components/users/row_component.rb
index b5a435af947..f0ce07fb7be 100644
--- a/app/components/users/row_component.rb
+++ b/app/components/users/row_component.rb
@@ -46,7 +46,7 @@ module Users
def login
icon = helpers.avatar user, size: :mini
- link = link_to h(user.login), helpers.allowed_management_user_profile_path(user)
+ link = link_to h(user.login), helpers.allowed_management_user_profile_path(user), class: "op-principal--name"
icon + link
end
diff --git a/frontend/src/app/shared/components/principal/principal-renderer.service.ts b/frontend/src/app/shared/components/principal/principal-renderer.service.ts
index 7d549530cc6..f0382aacd1e 100644
--- a/frontend/src/app/shared/components/principal/principal-renderer.service.ts
+++ b/frontend/src/app/shared/components/principal/principal-renderer.service.ts
@@ -151,6 +151,7 @@ export class PrincipalRendererService {
}
const image = new Image();
+ image.classList.add('op-principal--avatar');
image.classList.add('op-avatar');
image.classList.add(`op-avatar_${options.size}`);
image.src = url;
diff --git a/frontend/src/global_styles/content/_principal.sass b/frontend/src/global_styles/content/_principal.sass
index 46486d24af0..3eb36b5d15f 100644
--- a/frontend/src/global_styles/content/_principal.sass
+++ b/frontend/src/global_styles/content/_principal.sass
@@ -16,6 +16,7 @@
flex-grow: 1
flex-shrink: 1
min-width: 0 // See: https://css-tricks.com/flexbox-truncated-text/
+ margin-left: $spot-spacing-0_25
&_wrapped &--name
white-space: normal
@@ -28,6 +29,3 @@
@media screen and (max-width: $breakpoint-sm)
&--name
display: none
-
- .op-avatar + .op-principal--name
- margin-left: $spot-spacing-0_5