Add button to add new dataset on DMP overview (ref #245)

This commit is contained in:
George Kalampokis 2020-02-25 18:36:43 +02:00
parent af5265ee29
commit 77df06c6bd
3 changed files with 21 additions and 0 deletions

View File

@ -14,6 +14,9 @@
<button mat-menu-item (click)="openShareDialog(dmp.id,dmp.label)">
<mat-icon>share</mat-icon>{{'DMP-LISTING.ACTIONS.INVITE' | translate}}
</button>
<!-- <button *ngIf="isDraftDmp(dmp) && isUserOwner" mat-menu-item (click)="addDataset(dmp.id)">
<mat-icon>add_box</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DATASET' | translate}}
</button> -->
<button *ngIf="isUserOwner" mat-menu-item (click)="newVersion(dmp.id, dmp.label)">
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
</button>
@ -120,6 +123,11 @@
</div>
</div>
</div>
<div class="row">
<div class="interact-icon">
<mat-icon *ngIf="isDraftDmp(dmp) && isUserOwner" matTooltip="{{'DMP-LISTING.ACTIONS.ADD-DATASET' | translate}}" (click)="addDataset(dmp.id)">add_box</mat-icon>
</div>
</div>
<div class="row">
<div *ngFor="let dataset of dmp.datasets; let i=index" class="col-md-4">
<div *ngIf="i < 9" class="dataset-card" (click)="datasetClicked(dataset.id)">

View File

@ -225,3 +225,12 @@ h4 span {
height: 1.4em;
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
}
.interact-icon {
cursor: pointer;
margin-left: 32px;
}
.interact-icon :hover {
color: #00b29f !important;
}

View File

@ -424,6 +424,10 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
});
}
addDataset(rowId: String) {
this.router.navigate(['/datasets/new/' + rowId]);
}
// advancedClicked() {
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
// maxWidth: '500px',