'Start new DMP button' on navbar redirect to login if not authanicated

This commit is contained in:
apapachristou 2020-08-03 11:33:12 +03:00
parent 9ff36a1b12
commit 3baf20f4ec
7 changed files with 61 additions and 10 deletions

View File

@ -14,8 +14,7 @@
<div class="collapse navbar-collapse justify-content-end" id="navigation">
<div class="col-md-auto" *ngIf="!(isAuthenticated() && onInvalidUrl())">
<button type="button" class="normal-btn ml-auto"
(click)="openNewDmpDialog()">{{ 'NAV-BAR.START-NEW-DMP' | translate }}</button>
<button type="button" class="normal-btn ml-auto" (click)="openNewDmpDialog()">{{ 'NAV-BAR.START-NEW-DMP' | translate }}</button>
<!-- <button type="button" class="normal-btn ml-auto" [routerLink]="['/quick-wizard']">{{ 'NAV-BAR.START-NEW-DMP' | translate }}</button> -->
<a class="ml-4 mr-4 faq-title" (click)="openFaqDialog()"><b>{{ 'FAQ.TITLE' | translate }}</b></a>
<!-- <button mat-icon-button class="lang" [matMenuTriggerFor]="languageMenu"></button> -->
@ -100,4 +99,4 @@
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dmp-profiles">{{'NAV-BAR.DMP-PROFILES' |
translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dataset-profiles">{{'NAV-BAR.DATASETS-ADMIN'
| translate}}</a> -->
| translate}}</a> -->

View File

@ -248,8 +248,9 @@ export class NavbarComponent extends BaseComponent implements OnInit {
openNewDmpDialog() {
if (this.dialog.openDialogs.length > 0) {
this.dialog.closeAll();
}
else {
} else if (!this.isAuthenticated()) {
this.router.navigate(['/login']);
} else {
const dialogRef = this.dialog.open(StartNewDmpDialogComponent, {
disableClose: false,
data: {

View File

@ -381,6 +381,9 @@
"TITLE": "Datenmanagementpläne",
"OWNER": "Besitzer",
"MEMBER": "Mitglied",
"EDITED": "Edited",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"CREATOR": "Ersteller",
"COLUMNS": {
"NAME": "Name",
@ -558,6 +561,12 @@
"NEW": "Neue Datensatzbeschreibung",
"CREATE-NEW": "Neue Datensatzbeschreibung erstellen"
},
"STATES": {
"EDITED": "Edited",
"PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
},
"TOOLTIP": {
"DATASET-STATUS": {
"DRAFT": "Privater Zugriff - Datensatzbeschreibung bearbeitbar",
@ -939,6 +948,14 @@
"DMPS": "DMPs",
"DATASETS": "Datensatzbeschreibungen",
"EXTERNAL-SOURCE-HINT": "Liste jener Werte, die von externer(n) Quelle(n) stammen"
},
"RECENT-ACTIVITY-ORDER": {
"CREATED": "Created",
"LABEL": "Label",
"MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status"
}
},
"ADDRESEARCHERS-EDITOR": {

View File

@ -405,6 +405,8 @@
"MEMBER": "Member",
"CREATOR": "Creator",
"EDITED": "Edited",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Version",
"CONTAINED-DATASETS": "Contained Dataset Descriptions",
"TEXT-INFO": "Information in a DMP show how datasets have been collected and/or generated, how they have been processed and analysed, i.e. using which tools, standards, methodologies etc, but also where and how datasets are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services.",
@ -626,7 +628,9 @@
},
"STATES": {
"EDITED": "Edited",
"PUBLIC": "Public"
"PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
},
"TOOLTIP": {
"DATASET-STATUS": {
@ -1092,6 +1096,8 @@
"CREATED": "Created",
"LABEL": "Label",
"MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status"
}
},

View File

@ -402,6 +402,8 @@
"MEMBER": "Miembro",
"CREATOR": "Creator",
"EDITED": "Editado en",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Versión",
"CONTAINED-DATASETS": "Descripción del Dataset contenidos",
"TEXT-INFO": "Information in a DMP show how datasets have been collected and/or generated, how they have been processed and analysed, i.e. using which tools, standards, methodologies etc, but also where and how datasets are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services. Not sure how a DMP looks in practice? Browse Public DMPs and LIBER community in Zenodo to get an idea!",
@ -621,8 +623,10 @@
"INVITE-COLLABORATORS": "Invitar a colaboradores"
},
"STATES": {
"EDITED": "Editado",
"PUBLIC": "Publicado"
"EDITED": "Edited",
"PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
},
"TOOLTIP": {
"DATASET-STATUS": {
@ -1083,6 +1087,8 @@
"CREATED": "Created",
"LABEL": "Label",
"MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status"
}
},

View File

@ -402,6 +402,8 @@
"MEMBER": "Μέλος",
"CREATOR": "Συντάκτης",
"EDITED": "Επεξεργάστηκε",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Έκδοση",
"CONTAINED-DATASETS": "Δεδομένα που συμπεριλαμβάνει",
"TEXT-INFO": "Information in a DMP show how datasets have been collected and/or generated, how they have been processed and analysed, i.e. using which tools, standards, methodologies etc, but also where and how datasets are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services. Not sure how a DMP looks in practice? Browse Public DMPs and LIBER community in Zenodo to get an idea!",
@ -622,8 +624,10 @@
"INVITE-COLLABORATORS": "Προσκάλεσε συνεργάτες"
},
"STATES": {
"EDITED": "Επεξεργάστηκε",
"PUBLIC": "Δημοσιευμένο"
"EDITED": "Edited",
"PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
},
"TOOLTIP": {
"DATASET-STATUS": {
@ -1084,6 +1088,8 @@
"CREATED": "Created",
"LABEL": "Label",
"MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status"
}
},

View File

@ -380,6 +380,8 @@
"DMP-LISTING": {
"TITLE": "Veri Yönetim Planları",
"OWNER": "Sahibi",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"MEMBER": "Üye",
"CREATOR": "Oluşturan",
"COLUMNS": {
@ -558,6 +560,12 @@
"NEW": "Yeni Veriseti Tanımı",
"CREATE-NEW": "Yeni Veriseti Tanımı Oluştur"
},
"STATES": {
"EDITED": "Edited",
"PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
},
"TOOLTIP": {
"DATASET-STATUS": {
"DRAFT": "Özel erişim - Düzenlenebilir Veriseti Tanımı",
@ -939,6 +947,14 @@
"DMPS": "VYP'ları",
"DATASETS": "Veriseti Tanımları",
"EXTERNAL-SOURCE-HINT": "Dış kaynak(lar) tarafından sağlanan değerlerin listesi"
},
"RECENT-ACTIVITY-ORDER": {
"CREATED": "Created",
"LABEL": "Label",
"MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status"
}
},
"ADDRESEARCHERS-EDITOR": {