Fixed "XX Datasets" redirect links on DMP overview model. (Issue #144)

This commit is contained in:
gkolokythas 2019-07-25 17:09:14 +03:00
parent a64c96bc1e
commit 74779d8054
3 changed files with 9 additions and 5 deletions

View File

@ -55,10 +55,10 @@
<h4 class="mt-1 ml-1 mr-3 p-1">{{roleDisplay(dmp.users).toUpperCase()}}</h4>
<div class="datasets-counter">
<mat-icon (click)="$event.stopImmediatePropagation(); datasetClicked(dmp)" class="gray-icon pt-2" matTooltip="{{'DMP-LISTING.TOOLTIP.INVOLVED-DATASETS' | translate}}">
<mat-icon (click)="$event.stopImmediatePropagation(); datasetClicked(dmp.id)" class="gray-icon pt-2" matTooltip="{{'DMP-LISTING.TOOLTIP.INVOLVED-DATASETS' | translate}}">
storage
</mat-icon>
<h4 (click)="$event.stopImmediatePropagation(); datasetClicked(dmp)" class="mt-1 ml-1 mr-3 p-1">
<h4 (click)="$event.stopImmediatePropagation(); datasetClicked(dmp.id)" class="mt-1 ml-1 mr-3 p-1">
{{dmp.datasets.length}}</h4>
</div>

View File

@ -88,8 +88,8 @@ export class DmpListingItemComponent implements OnInit {
this.router.navigate(['/projects/edit/' + projectId]);
}
datasetClicked(dmp: DmpListingModel) {
this.router.navigate(['/datasets'], { queryParams: { dmpId: dmp.id } });
datasetClicked(dmpId: string) {
this.router.navigate(['/plans/edit/' + dmpId], { queryParams: { tab: "datasetDescriptions" } });
}
roleDisplay(value: any) {

View File

@ -66,7 +66,7 @@
<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>
<div class="datasets-counter">
<div class="datasets-counter" *ngIf="!isPublishedDMP(dmp)">
<mat-icon matTooltip="{{'DMP-OVERVIEW.TOOLTIP.INVOLVED-DATASETS' | translate}}" class="gray-icon pt-2" (click)="datasetsClicked(dmp.id)">storage
</mat-icon>
<p class="mt-2 ml-1 p-1" (click)="datasetsClicked(dmp.id)">
@ -75,6 +75,10 @@
{{'NAV-BAR.DATASETS' | translate}}</p>
</div>
<mat-icon matTooltip="{{'DMP-OVERVIEW.TOOLTIP.INVOLVED-DATASETS' | translate}}" class="gray-icon pt-2" *ngIf="isPublishedDMP(dmp)">storage</mat-icon>
<p class="mt-2 ml-1 p-1" *ngIf="isPublishedDMP(dmp)">{{ dmp.datasets.length }}</p>
<p class="mt-2 mr-3 p-1" *ngIf="isPublishedDMP(dmp)">{{'NAV-BAR.DATASETS' | translate}}</p>
<mat-icon matTooltip="{{'DMP-OVERVIEW.TOOLTIP.TEMPLATES-INVOLVED' | translate}}" class="gray-icon pt-2">assignment</mat-icon>
<p class="mt-2 ml-1 p-1">{{ dmp.associatedProfiles.length }}</p>
<p class="mt-2 mr-3 p-1">{{ 'DMP-EDITOR.FIELDS.TEMPLATES' | translate }}</p>