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

activity uses user-link component

ulferts86ddfe82ca44
diff --git a/frontend/src/app/components/wp-activity/user/user-activity.component.html b/frontend/src/app/components/wp-activity/user/user-activity.component.html
index d176803966c..37585e755af 100644
--- a/frontend/src/app/components/wp-activity/user/user-activity.component.html
+++ b/frontend/src/app/components/wp-activity/user/user-activity.component.html
@@ -8,13 +8,9 @@
data-class-list="avatar">
</user-avatar>
- <span class="user" *ngIf="userPath">
- <a [attr.href]="userPath"
- [attr.aria-label]="userLabel"
- [textContent]="userName">
- </a>
+ <span class="user">
+ <user-link [user]="user"></user-link>
</span>
- <span class="user" *ngIf="!userPath">{{ userName }}</span>
<span class="date">
{{ isInitial ? text.label_created_on : text.label_updated_on }}
<op-date-time [dateTimeValue]="activity.createdAt"></op-date-time>
diff --git a/frontend/src/app/components/wp-activity/user/user-activity.component.ts b/frontend/src/app/components/wp-activity/user/user-activity.component.ts
index 1d4fc7bd431..3171808c275 100644
--- a/frontend/src/app/components/wp-activity/user/user-activity.component.ts
+++ b/frontend/src/app/components/wp-activity/user/user-activity.component.ts
@@ -65,9 +65,8 @@ export class UserActivityComponent extends WorkPackageCommentFieldHandler implem
public userCanQuote = false;
public userId:string | number;
+ public user:UserResource;
public userName:string;
- public userPath:string | null;
- public userLabel:string;
public userAvatar:string;
public details:any[] = [];
public isComment:boolean;
@@ -125,13 +124,10 @@ export class UserActivityComponent extends WorkPackageCommentFieldHandler implem
this.userCacheService
.require(this.activity.user.idFromLink)
.then((user:UserResource) => {
+ this.user = user;
this.userId = user.id!;
this.userName = user.name;
this.userAvatar = user.avatar;
- if (user.showUser) {
- this.userPath = user.showUser.href;
- }
- this.userLabel = this.I18n.t('js.label_author', {user: this.userName});
this.cdRef.detectChanges();
});
}