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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Show user as link in a notification row and increase some spacings
Henriette Darge431fd8210a0e
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex f3f426fedc8..c90cb53172a 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -575,6 +575,9 @@ en:unread: 'Unread'all: 'All'center:+ and_more_users:+ one: 'and 1 other'+ other: 'and %{count} others'mark_all_read: 'Mark all as read'mark_as_read: 'Mark as read'text_update_date: "%{date} by"diff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.htmlindex 214f2a8beba..c01c766be33 100644--- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html+++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html@@ -91,10 +91,19 @@[title]="fixedTime"[textContent]="relativeTime$ | async"></div>- <op-principal-list- class="op-ian-item--actors"- [principals]="actors"- ></op-principal-list>+ <div>+ <op-principal+ class="op-ian-item--actors"+ [principal]="actors[0]"+ [hide-name]="false"+ [hide-avatar]="true"+ ></op-principal>+ <span+ *ngIf="actors.length > 1"+ >+ {{ text_for_additional_authors(actors.length - 1) }}+ </span>+ </div></div></ng-container>diff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.sass b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.sassindex 57fb314fb22..dd8329f51f8 100644--- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.sass+++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.sass@@ -49,6 +49,7 @@ $subject-font-size: 14pxgrid-template-columns: auto 1frgrid-column-gap: 5pxalign-items: center+ color: var(--gray-dark)&--work-package-subject@include text-shortener@@ -83,12 +84,12 @@ $subject-font-size: 14px&--date@include text-shortener- color: var(--gray-dark)max-width: 100%line-height: 16px&--statusgrid-area: status+ margin-right: 5px&--buttonsgrid-area: buttonsdiff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.tsindex b129a81e232..42018ae3570 100644--- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts+++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts@@ -72,6 +72,9 @@ export class InAppNotificationEntryComponent implements OnInit {project?:{ href:string, title:string, showUrl:string };text = {+ and_other_singular: this.I18n.t('js.notifications.center.and_more_users.one'),+ and_other_plural: (count:number):string => this.I18n.t('js.notifications.center.and_more_users.other',+ { count }),loading: this.I18n.t('js.ajax.loading'),placeholder: this.I18n.t('js.placeholders.default'),updated_by_at: (age:string):string => this.I18n.t('js.notifications.center.text_update_date',@@ -155,6 +158,16 @@ export class InAppNotificationEntryComponent implements OnInit {this.storeService.markAsRead(notifications.map((el) => el.id));}+ text_for_additional_authors(number:number):string {+ let hint:string;+ if (number === 1) {+ hint = this.text.and_other_singular;+ } else {+ hint = this.text.and_other_plural(number);+ }+ return hint;+ }+private buildActors() {const actors = this.aggregatedNotificationsdiff --git a/frontend/src/app/features/in-app-notifications/entry/status/in-app-notification-status.component.sass b/frontend/src/app/features/in-app-notifications/entry/status/in-app-notification-status.component.sassindex 6f63ca8c74d..8bce855074f 100644--- a/frontend/src/app/features/in-app-notifications/entry/status/in-app-notification-status.component.sass+++ b/frontend/src/app/features/in-app-notifications/entry/status/in-app-notification-status.component.sass@@ -3,12 +3,15 @@.op-ian-wp-status@include text-shortener(false)margin-bottom: 0- padding: 0 5px+ padding: 1px 8pxborder: noneborder-radius: 2pxcolor: whitemax-width: 100%font-size: 12px+ display: inline-block+ min-height: 16px+ line-height: 16px&--textmargin: 0 5px