Adds Collaborators panel on DMP Overview.
This commit is contained in:
parent
c8600b315e
commit
61a7f0b809
|
@ -81,7 +81,7 @@
|
||||||
<div class="col-12 d-flex flex-row flex-wrap ml-3">
|
<div class="col-12 d-flex flex-row flex-wrap ml-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<mat-icon matTooltip="{{'DMP-OVERVIEW.TOOLTIP.LEVEL-OF-ACCESS' | translate}}" class="gray-icon pt-2">settings</mat-icon>
|
<mat-icon matTooltip="{{'DMP-OVERVIEW.TOOLTIP.LEVEL-OF-ACCESS' | translate}}" class="gray-icon pt-2">settings</mat-icon>
|
||||||
<p class="mt-2 ml-1 mr-3 p-1">{{ roleDisplay(dmp.users) }}</p>
|
<p class="mt-2 ml-1 mr-3 p-1">{{ roleDisplayFromList(dmp.users) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="datasets-counter" *ngIf="!isPublishedDMP(dmp)">
|
<div class="datasets-counter" *ngIf="!isPublishedDMP(dmp)">
|
||||||
|
@ -110,6 +110,11 @@
|
||||||
<p class="mt-2 ml-1 p-1">{{ dmp.researchers.length }}</p>
|
<p class="mt-2 ml-1 p-1">{{ dmp.researchers.length }}</p>
|
||||||
<p class="mt-2 mr-3 p-1">{{ 'DMP-EDITOR.FIELDS.RESEARCHERS' | translate }}</p>
|
<p class="mt-2 mr-3 p-1">{{ 'DMP-EDITOR.FIELDS.RESEARCHERS' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-flex" *ngIf="!isPublicView">
|
||||||
|
<mat-icon matTooltip="{{'DMP-OVERVIEW.COLLABORATORS' | translate}}" class="gray-icon pt-2">person</mat-icon>
|
||||||
|
<p class="mt-2 ml-1 p-1">{{ dmp.users.length }}</p>
|
||||||
|
<p class="mt-2 mr-3 p-1">{{ 'DMP-EDITOR.FIELDS.COLLABORATORS' | translate }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -157,6 +162,12 @@
|
||||||
<div matTooltip="{{ researcher.name }}" class="avatar">{{ researcher.name }}</div>
|
<div matTooltip="{{ researcher.name }}" class="avatar">{{ researcher.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="collaborators">
|
||||||
|
<h6 class="collaborators-title">{{'DMP-OVERVIEW.COLLABORATORS' | translate}}</h6>
|
||||||
|
<div *ngFor="let user of dmp.users">
|
||||||
|
<div matTooltip="{{ roleDisplay(user) }}" class="avatar">{{ user.name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -66,6 +66,25 @@
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collaborators {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border: 2px solid #f2f2f2;
|
||||||
|
margin-right: 2em;
|
||||||
|
margin-top: 2em;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collaborators-title {
|
||||||
|
width: 135px;
|
||||||
|
color: #089dbb;
|
||||||
|
background-color: white;
|
||||||
|
padding: 0px 10px;
|
||||||
|
margin-top: -16px;
|
||||||
|
cursor: default;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
.container-header {
|
.container-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { UserInfoListingModel } from '@app/core/model/user/user-info-listing';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { DmpFinalizeDialogComponent, DmpFinalizeDialogInput, DmpFinalizeDialogOutput } from '@app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
import { DmpFinalizeDialogComponent, DmpFinalizeDialogInput, DmpFinalizeDialogOutput } from '@app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||||
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
@ -219,7 +219,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
roleDisplay(value: UserInfoListingModel[]) {
|
roleDisplayFromList(value: UserInfoListingModel[]) {
|
||||||
const principal: Principal = this.authentication.current();
|
const principal: Principal = this.authentication.current();
|
||||||
let role: number;
|
let role: number;
|
||||||
if (principal) {
|
if (principal) {
|
||||||
|
@ -229,13 +229,19 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (role === 0) {
|
if (role === Role.Owner) {
|
||||||
|
return this.translate.instant('DMP-LISTING.OWNER');
|
||||||
|
} else if (role === Role.Member) {
|
||||||
|
return this.translate.instant('DMP-LISTING.MEMBER');
|
||||||
|
} else {
|
||||||
return this.translate.instant('DMP-LISTING.OWNER');
|
return this.translate.instant('DMP-LISTING.OWNER');
|
||||||
}
|
}
|
||||||
else if (role === 1) {
|
}
|
||||||
|
|
||||||
|
roleDisplay(value: UserInfoListingModel) {
|
||||||
|
if (value.role === Role.Member) {
|
||||||
return this.translate.instant('DMP-LISTING.MEMBER');
|
return this.translate.instant('DMP-LISTING.MEMBER');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return this.translate.instant('DMP-LISTING.OWNER');
|
return this.translate.instant('DMP-LISTING.OWNER');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,6 +489,7 @@
|
||||||
},
|
},
|
||||||
"DMP-OVERVIEW": {
|
"DMP-OVERVIEW": {
|
||||||
"RESEARCHERS": "Researchers",
|
"RESEARCHERS": "Researchers",
|
||||||
|
"COLLABORATORS": "Collaborators",
|
||||||
"TOOLTIP": {
|
"TOOLTIP": {
|
||||||
"LEVEL-OF-ACCESS": "Level of Access",
|
"LEVEL-OF-ACCESS": "Level of Access",
|
||||||
"INVOLVED-DATASETS": "Involved Dataset Descriptions",
|
"INVOLVED-DATASETS": "Involved Dataset Descriptions",
|
||||||
|
@ -662,7 +663,8 @@
|
||||||
"GRANT": "Grant",
|
"GRANT": "Grant",
|
||||||
"FUNDER": "Funder",
|
"FUNDER": "Funder",
|
||||||
"STATUS": "DMP Status",
|
"STATUS": "DMP Status",
|
||||||
"EXTERNAL-SOURCE-HINT": "List of values provided by external source(s)"
|
"EXTERNAL-SOURCE-HINT": "List of values provided by external source(s)",
|
||||||
|
"COLLABORATORS": "Collaborators"
|
||||||
},
|
},
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"GO-TO-GRANT": "Go To DMP Grant",
|
"GO-TO-GRANT": "Go To DMP Grant",
|
||||||
|
|
Loading…
Reference in New Issue