make router link for add description buttons pointing to dmp editor

This commit is contained in:
Bernaldo Mihasi 2023-09-25 10:36:04 +03:00
parent 4cef17e999
commit 32c45520b4
18 changed files with 22 additions and 12 deletions

View File

@ -302,7 +302,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
if (result.startNewDmp) {
this.openNewDmpDialog();
} else {
this.router.navigate(['/datasets', 'new', result.formGroup.get('dmp').value.id]);
this.router.navigate(['/plans', 'edit', result.formGroup.get('dmp').value.id]);
// Save dataset direct but missing title and template
// this.datasetWizardService.createDataset(result.formGroup.getRawValue())
// .pipe(takeUntil(this._destroyed))

View File

@ -45,7 +45,7 @@
<span>.</span>
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
</div>
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ getDatasets(activity).length }})
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DESCRIPTIONS' | translate}}: ({{ getDatasets(activity).length }})
</div>
<div *ngFor="let dataset of getDatasets(activity); let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
<div *ngIf="i < 3">
@ -58,7 +58,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/plans/edit/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.id, activity.title)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(activity, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(getGroupId(activity), activity.title, activity)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -61,7 +61,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/plans/edit/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.id, activity.title)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(activity, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(getGroupId(activity), activity.title, activity)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -55,7 +55,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/plans/edit/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.id, activity.label)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(activity, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(activity.groupId, activity.label, activity)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -430,7 +430,7 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
if (result.startNewDmp) {
this.openNewDmpDialog();
} else {
this.router.navigate(['/datasets', 'new', result.formGroup.get('dmp').value.id]);
this.router.navigate(['/plans', 'edit', result.formGroup.get('dmp').value.id]);
}
}
});

View File

@ -54,7 +54,7 @@
<ul *ngIf="hasProfile(i)" class="add-dataset-option">
<li>
<a class="add-dataset-action" (click)="addDataset(i)">
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
</a>
</li>
</ul>
@ -72,9 +72,9 @@
<span class="material-icons">chevron_right</span>
</div>
<!-- <div *ngIf="this.step >= 3 && hasProfile() && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank"> -->
<!-- <button [disabled]="saving" *ngIf="this.step >= this.maxStep && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank"> -->
<!-- <button [disabled]="saving" *ngIf="this.step >= this.maxStep && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset(i)" target="_blank"> -->
<!-- <mat-icon>add</mat-icon> -->
<!-- {{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
<!-- {{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
</button> -->
</div>
<div class="col-auto pr-0" *ngIf="this.step !== 0">
@ -326,7 +326,7 @@
</mat-form-field>
</div>
<button [disabled]="saving" mat-raised-button type="button" class="stepper-btn add-dataset-btn mb-4" (click)="addDataset(i)" target="_blank">
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
</button> -->
</div>
</div>

View File

@ -29,7 +29,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(dmp)" [routerLink]="['/datasets/new/' + dmp.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(dmp)" [routerLink]="['/plans/edit/' + dmp.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(dmp)" (click)="openShareDialog(dmp.id, dmp.label)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(dmp, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(dmp.groupId, dmp.label, dmp)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -106,7 +106,7 @@
</div>
</div>
<div class="row mt-2 add-dataset-txt" *ngIf="!lockStatus">
<a class="add-dataset-btn" *ngIf="isDraftDmp(dmp)" [routerLink]="['/datasets/new/' + dmp.id]" target="_blank">
<a class="add-dataset-btn" *ngIf="isDraftDmp(dmp)" [routerLink]="['/plans/edit/' + dmp.id]" target="_blank">
<mat-icon>add</mat-icon>
{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
</a>

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Invite",
"ADD-DATASET": "Datensatzbeschreibung zum DMP hinzufügen",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Alle DMP-Datensatzbeschreibungen auflisten",
"NEW-VERSION": "Neue Version",
"START-NEW-VERSION": "Start New Version",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Invite",
"ADD-DATASET": "Add Dataset To DMP",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "List All DMP Datasets",
"NEW-VERSION": "New Version",
"START-NEW-VERSION": "Start New Version",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Invitar",
"ADD-DATASET": "Añadir la descripción del dataset al PGD",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Listar todas las descripciones de los dataset",
"NEW-VERSION": "Nueva versión",
"START-NEW-VERSION": "Iniciar una nueva versión",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Πρόσκληση",
"ADD-DATASET": "Προσθήκη Περιγραφής Συνόλου Δεδομένων στο Σχέδιο Διαχείρισης Δεδομένων",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Κατάλογος όλων των Περιγραφών Συνόλου Δεδομένων",
"NEW-VERSION": "Νέα Έκδοση",
"START-NEW-VERSION": "Νέα Έκδοση",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Pozovi",
"ADD-DATASET": "Dodaj skup podataka u Plan",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Prikaži sve skupove podataka",
"NEW-VERSION": "Nova verzija",
"START-NEW-VERSION": "Započni novu verziju",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Zaproś",
"ADD-DATASET": "Dodaj zbiór danych do DMP",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Wyświetl na liście wszystkie zbiory danych DMP",
"NEW-VERSION": "Nowa wersja",
"START-NEW-VERSION": "Rozpocznij nową wersję",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Convidar",
"ADD-DATASET": "Adicionar Dataset ao PGD",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Listar todos os Datasets do PGD",
"NEW-VERSION": "Nova Versão",
"START-NEW-VERSION": "Iniciar Nova Versão",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Pozvať",
"ADD-DATASET": "Pridať súbor dát do DMP",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Uviesť všetky súbory dát DMP",
"NEW-VERSION": "Nová verzia",
"START-NEW-VERSION": "Začať novú verziu",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Pozovite",
"ADD-DATASET": "Dodajte skup podataka u Plan",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Prikažite sve skupove podataka",
"NEW-VERSION": "Nova verzija",
"START-NEW-VERSION": "Započnite novu verziju",

View File

@ -651,6 +651,7 @@
"INVITE-SHORT": "Davet Et",
"ADD-DATASET": "VYP'na Veri Seti Ekle",
"ADD-DESCRIPTION-SHORT": "Add Description",
"ADD-DESCRIPTION-FOR-SECTION": "Add Description",
"DATASETS": "Tüm VYP Veri Seti Tanımlarını Listele",
"NEW-VERSION": "Yeni Sürüm",
"START-NEW-VERSION": "Yeni Sürümü Başlat",