argos/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html

208 lines
12 KiB
HTML
Raw Normal View History

<div class="main-content dmp-overview pl-5 pr-5">
2020-06-30 17:33:01 +02:00
<div class="container-fluid pl-0 pr-0">
2020-06-29 09:53:56 +02:00
<div *ngIf="dmp">
2020-07-01 17:32:22 +02:00
<a class="row mb-2 pl-1" (click)="goBack()" role="button">
<mat-icon class="back-icon pointer">chevron_left</mat-icon>
2023-12-04 18:37:52 +01:00
<p class="label-txt pointer">{{'DMP-OVERVIEW.ACTIONS.BACK' | translate}}</p>
2020-06-30 17:33:01 +02:00
</a>
2020-06-29 09:53:56 +02:00
<div class="row">
2020-07-01 17:32:22 +02:00
<div class="col-md-8 col-lg-8 pl-4">
2020-06-29 09:53:56 +02:00
<div class="row">
2023-12-04 18:37:52 +01:00
<span class="dmp-logo">{{ 'DMP-OVERVIEW.TITLE' | translate }}</span>
2020-07-03 15:58:13 +02:00
<p class="dmp-label ml-3 mb-0">{{ dmp.label }}</p>
2020-06-29 09:53:56 +02:00
</div>
2020-06-30 17:33:01 +02:00
<div class="row d-flex align-items-center mt-3 mb-4 label-txt">
2023-12-04 16:56:12 +01:00
<div *ngIf="isUserDmpRelated()" class="d-flex">
<p class="ml-0 mb-0 label2-txt">
2023-12-04 16:56:12 +01:00
{{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(dmp?.dmpUsers)) }}
2020-06-29 09:53:56 +02:00
</div>
2023-12-04 18:37:52 +01:00
<span *ngIf="isUserDmpRelated() && (isPublishedDmp() || lockStatus)" class="ml-2 mr-2">.</span>
<div *ngIf="isPublishedDmp()" class="d-flex flex-row">
<mat-icon class="status-icon">public</mat-icon>
{{'DMP-OVERVIEW.PUBLIC' | translate}}
2020-06-30 17:33:01 +02:00
</div>
2023-12-04 18:37:52 +01:00
<span *ngIf="isPublishedDmp() && lockStatus" class="ml-2 mr-2">.</span>
<div *ngIf="lockStatus" class="d-flex flex-row">
<mat-icon class="status-icon">lock_outline</mat-icon>
2020-07-06 17:42:54 +02:00
{{'DMP-OVERVIEW.LOCKED' | translate}}
2020-06-30 17:33:01 +02:00
</div>
2024-03-20 17:06:05 +01:00
<mat-form-field appearance="outline" subscriptSizing="dynamic" class="dense-3 versions-select ml-3 mr-3">
2023-12-04 18:37:52 +01:00
<mat-select placeholder="{{'DMP-OVERVIEW.VERSION' | translate}} {{dmp.version}}" [(ngModel)]="version" (ngModelChange)="versionChanged(version.id)">
<mat-option *ngFor="let version of pastVersions" [value]="version">
{{'DMP-OVERVIEW.VERSION' | translate}} {{version.version}}</mat-option>
2020-07-09 13:28:55 +02:00
</mat-select>
2020-07-10 09:32:11 +02:00
</mat-form-field>
2023-12-04 18:37:52 +01:00
<div class="d-flex mr-4">{{'DMP-OVERVIEW.EDITED' | translate}} :
{{dmp.updatedAt | dateTimeCultureFormatter: "d MMMM y"}}
2020-06-30 17:33:01 +02:00
</div>
<div class="d-flex mr-4">
2024-03-11 08:47:03 +01:00
<div *ngIf="dmp.status== dmpStatusEnum.Finalized" class="d-flex flex-row uppercase">
2020-06-30 17:33:01 +02:00
<mat-icon class="status-icon">check</mat-icon>
2023-12-04 18:37:52 +01:00
{{'DMP-OVERVIEW.FINALISED' | translate}}
2020-07-06 12:21:11 +02:00
</div>
2020-06-30 17:33:01 +02:00
</div>
2020-06-29 09:53:56 +02:00
</div>
<div class="row">
2024-03-01 17:50:46 +01:00
<!-- <button *ngIf="isDraftDmp(dmp) && isDmpOwner(dmp) && !lockStatus" (click)="editClicked(dmp)" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above"> -->
<button *ngIf="canEditDmp() && !lockStatus" (click)="editClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
2020-06-30 17:33:01 +02:00
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
2020-06-29 09:53:56 +02:00
</button>
2024-03-01 17:50:46 +01:00
<button *ngIf="canCloneDmp()" (click)="cloneClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
2020-09-14 14:56:13 +02:00
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
</button>
2024-03-01 17:50:46 +01:00
<button *ngIf="canDeleteDmp() && !lockStatus" (click)="deleteClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
2020-06-30 17:33:01 +02:00
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
2020-06-29 09:53:56 +02:00
</button>
</div>
<div *ngIf="referenceService.hasRerefenceOfTypes(dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])">
<div class="row header">{{'DMP-OVERVIEW.GRANT' | translate}}</div>
<div class="row dmp-label">{{referenceService.getReferencesForTypesFirstSafe(dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])?.reference?.label}}</div>
</div>
2023-12-04 18:37:52 +01:00
<div class="row header">{{'DESCRIPTION-OVERVIEW.RESEARCHERS' | translate}}</div>
2020-06-29 09:53:56 +02:00
<div class="row">
2023-12-04 18:37:52 +01:00
<div *ngFor="let dmpReference of researchers let last = last">
<span *ngIf="isOrcid(dmpReference.reference)">
<a href="{{ getOrcidPathForResearcher(dmpReference.reference?.reference) }}" target="blank" class="researcher">
<div class="id-btn">&nbsp;</div>
2024-03-06 17:41:26 +01:00
<div *ngIf="!last">{{ dmpReference.reference?.label }}, </div>
<div *ngIf="last">{{ dmpReference.reference?.label }}</div>
</a>
</span>
2023-12-04 18:37:52 +01:00
<span *ngIf="!isOrcid(dmpReference.reference)">
2024-03-06 17:41:26 +01:00
<div *ngIf="!last">{{ dmpReference.reference?.label }}, </div>
<div *ngIf="last">{{ dmpReference.reference?.label }}</div>
</span>
2020-06-29 09:53:56 +02:00
</div>
2023-12-04 18:37:52 +01:00
<span *ngIf="!researchers || researchers.length === 0" class="material-icons">horizontal_rule</span>
2020-06-29 09:53:56 +02:00
</div>
2023-12-04 18:37:52 +01:00
<div class="row header">{{'DMP-OVERVIEW.DESCRIPTION' | translate}}</div>
2020-06-30 17:33:01 +02:00
<div class="row" *ngIf="dmp.description">
<p class="desc-txt" [innerHTML]="dmp.description"></p>
2020-06-29 09:53:56 +02:00
</div>
<div class="row" *ngIf="!dmp.description">
<span class="material-icons">horizontal_rule</span>
</div>
2023-12-04 18:37:52 +01:00
<div class="row header">{{'DMP-OVERVIEW.DESCRIPTIONS' | translate}}</div>
<div class="d-flex flex-column">
2023-12-04 18:37:52 +01:00
<div *ngFor="let description of dmp.descriptions">
2023-12-20 08:20:38 +01:00
<a class="row description" [routerLink]="isPublicView ? ['/descriptions/overview/public/' + description.id] : ['/descriptions/overview/' + description.id]" target="_blank">
2023-12-28 16:18:49 +01:00
<button mat-raised-button class="mb-2 mr-2 pl-0 pr-0 h-100">
2023-12-04 18:37:52 +01:00
<div matTooltip="{{ description.label }}" class="col-auto" [ngClass]="{'description-btn': description.status === descriptionStatusEnum.Draft, 'description-finalized-btn': description.status === descriptionStatusEnum.Finalized}">
<div class="description-btn-label">{{ description.label }}</div>
2020-06-29 09:53:56 +02:00
<mat-icon>launch</mat-icon>
</div>
</button>
2020-07-27 10:52:42 +02:00
</a>
2020-06-29 09:53:56 +02:00
</div>
2023-12-04 18:37:52 +01:00
<div class="row" *ngIf="!dmp.descriptions || dmp.descriptions.length === 0">
<span class="material-icons">horizontal_rule</span>
</div>
2020-06-29 09:53:56 +02:00
</div>
2023-12-04 18:37:52 +01:00
<div class="row mt-2 add-description-txt" *ngIf="!lockStatus">
<a class="add-description-btn" *ngIf="canEditDmp()" [routerLink]="['/plans/edit/' + dmp.id]" target="_blank">
2020-06-29 09:53:56 +02:00
<mat-icon>add</mat-icon>
2023-12-04 18:37:52 +01:00
{{'DMP-OVERVIEW.ACTIONS.ADD-DESCRIPTION' | translate}}
</a>
2020-06-29 09:53:56 +02:00
</div>
</div>
2020-06-30 17:33:01 +02:00
<div class="col-md-4 col-lg-4 p-0">
2020-07-01 17:32:22 +02:00
<div *ngIf="!hasDoi(dmp)" class="row d-flex flex-column ml-0 mr-0 mb-3">
<div class="d-flex align-items-center doi-label">
2023-12-04 18:37:52 +01:00
<span class="mr-3">{{'DMP-OVERVIEW.DOI-PROVIDED' | translate}}: </span>
<ng-container *ngIf="selectedModel">
<mat-select class="max-width-80 select-repo" [placeholder]="selectedModel.repositoryId">
2023-12-04 18:37:52 +01:00
<mat-option *ngFor="let entityDoi of dmp.entityDois" (click)="selectDoi(entityDoi)">
{{entityDoi.repositoryId}}
</mat-option>
</mat-select>
</ng-container>
</div>
2023-12-04 18:37:52 +01:00
<div *ngIf="dmp.entityDois && selectedModel" class="doi-panel">
<span class="ml-3 mr-3">{{selectedModel.doi}}</span>
2022-11-02 08:41:40 +01:00
<div class="d-flex justify-content-end ml-3">
2023-12-04 18:37:52 +01:00
<button (click)="copyDoi(selectedModel.doi)" mat-mini-fab class="mr-2 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.COPY' | translate}}" matTooltipPosition="above">
2022-11-02 08:41:40 +01:00
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
</button>
2023-12-04 18:37:52 +01:00
<button *ngIf="depositRepos?.length > 0" mat-mini-fab class="mr-2 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.VISIT-WEBSITE' | translate}}" matTooltipPosition="above">
<a [href]="createDoiLink(selectedModel)" class="doi-link" target="_blank">
2022-11-02 08:41:40 +01:00
<mat-icon class="mat-mini-fab-icon">launch</mat-icon>
</a>
</button>
</div>
</div>
</div>
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()">
<div *ngIf="isDraftDmp() && canFinalizeDmp() && !lockStatus">
2020-07-01 17:32:22 +02:00
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(dmp)">
<button mat-mini-fab class="finalize-btn">
<mat-icon class="mat-mini-fab-icon">check</mat-icon>
</button>
2023-12-04 18:37:52 +01:00
<p class="mb-0 pl-2 finalize-txt">{{ 'DMP-OVERVIEW.ACTIONS.FINALIZE' | translate }}</p>
2020-07-01 17:32:22 +02:00
</div>
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center">
<hr class="hr-line">
</div>
</div>
2024-03-19 11:48:17 +01:00
<app-dmp-deposit-dropdown *ngIf="(hasDoi(dmp) || moreDeposit()) && isFinalizedDmp(dmp) && !this.isPublicView && canDepositDmp(dmp) && inputRepos.length > 0" [inputRepos]="inputRepos" [dmp]="dmp" (outputReposEmitter)="afterDeposit($event)"></app-dmp-deposit-dropdown>
<div *ngIf="isFinalizedDmp(dmp) && hasDoi(dmp) && !isPublishedDmp(dmp) && canFinalizeDmp(dmp)" (click)="reverseFinalization()" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center">
<button mat-mini-fab class="frame-btn">
<mat-icon class="mat-mini-fab-icon">unarchive</mat-icon>
</button>
2023-12-04 18:37:52 +01:00
<p class="mb-0 pl-2 frame-txt">{{ 'DMP-OVERVIEW.ACTIONS.REVERSE' | translate }}</p>
</div>
2024-03-07 16:14:39 +01:00
<div *ngIf="canExportDmp() && fileTransformerService.availableFormats.length > 0" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center">
2020-06-29 17:30:36 +02:00
<button mat-mini-fab class="frame-btn" [matMenuTriggerFor]="exportMenu">
<mat-icon class="mat-mini-fab-icon">open_in_new</mat-icon>
2020-06-29 09:53:56 +02:00
</button>
2020-06-30 17:33:01 +02:00
<p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">
2023-12-04 18:37:52 +01:00
{{ 'DMP-OVERVIEW.ACTIONS.EXPORT' | translate }}</p>
2020-06-29 09:53:56 +02:00
</div>
2024-03-01 17:50:46 +01:00
<div *ngIf="canCreateNewVersion()" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" (click)="newVersionClicked()">
2020-06-29 17:30:36 +02:00
<button mat-mini-fab class="frame-btn">
<mat-icon class="mat-mini-fab-icon">add_to_photos</mat-icon>
2020-06-29 09:53:56 +02:00
</button>
2024-02-26 18:40:31 +01:00
<p class="mb-0 pl-2 frame-txt">{{ 'DMP-OVERVIEW.ACTIONS.NEW-VERSION' | translate }}
2020-06-29 17:30:36 +02:00
</p>
2020-06-29 09:53:56 +02:00
</div>
2020-06-29 17:30:36 +02:00
<mat-menu #exportMenu="matMenu" xPosition="before">
2024-01-17 13:47:32 +01:00
<button mat-menu-item *ngFor='let fileTransformer of fileTransformerService.availableFormats' (click)="fileTransformerService.exportDmp(dmp.id, fileTransformer.format)">
<i class="fa pr-2" [ngClass]="fileTransformer.icon ? fileTransformer.icon : 'fa-file-o'"></i>
2024-03-06 17:18:10 +01:00
<span>{{'GENERAL.FILE-TRANSFORMER.' + fileTransformer?.formatName?.toUpperCase() | translate}}</span>
2020-06-29 17:30:36 +02:00
</button>
2023-12-29 16:04:16 +01:00
</mat-menu>
2020-06-29 09:53:56 +02:00
</div>
2020-07-01 17:32:22 +02:00
<div class="frame mb-3 pt-4 pl-3 pr-3 pb-1">
<div class="row ml-0 mr-0 pl-4 pb-3">
2020-06-30 17:33:01 +02:00
<p class="header">{{ 'DMP-OVERVIEW.DMP-AUTHORS' | translate }}</p>
2020-06-29 17:30:36 +02:00
</div>
2020-07-01 17:32:22 +02:00
<div class="row ml-0 mr-0 pl-4 ml-2 pb-3 d-flex align-items-center">
2023-12-04 18:37:52 +01:00
<div *ngFor="let dmpUser of dmp.dmpUsers" class="row authors">
2020-07-01 17:32:22 +02:00
<div class="d-flex flex-row">
<button class="account_btn mr-3 pl-0">
<mat-icon class="account-icon">account_circle</mat-icon>
</button>
<div>
2023-12-04 18:37:52 +01:00
<p class="authors-label">{{ dmpUser.user?.name }}
<span *ngIf="isUserAuthor(dmpUser.user?.id)">
({{ 'DMP-OVERVIEW.YOU' | translate }})</span>
2020-07-01 17:32:22 +02:00
</p>
2023-12-04 16:56:12 +01:00
<p class="authors-role">{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}</p>
2020-07-01 17:32:22 +02:00
</div>
2020-06-29 17:30:36 +02:00
</div>
2024-03-14 10:41:32 +01:00
<button *ngIf="canAssignDmpUsers(dmp) && dmp.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" (click)="removeUserFromDmp(dmpUser)" class="remove-btn">{{ 'DMP-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}</button>
2020-06-29 17:30:36 +02:00
</div>
2020-06-29 09:53:56 +02:00
</div>
2024-03-04 11:42:14 +01:00
<div *ngIf="canInviteDmpUsers()" class="row mt-3 mb-3 d-flex align-items-center justify-content-center">
<button mat-raised-button class="invite-btn" (click)="openShareDialog(dmp.id,dmp.label)">
2020-06-29 09:53:56 +02:00
<mat-icon>group_add</mat-icon>
2023-12-04 18:37:52 +01:00
{{'DMP-OVERVIEW.ACTIONS.INVITE-SHORT' | translate}}
2020-06-29 09:53:56 +02:00
</button>
</div>
</div>
</div>
</div>
</div>
</div>
2024-01-17 13:47:32 +01:00
</div>