'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="collapse navbar-collapse justify-content-end" id="navigation">
<div class="col-md-auto" *ngIf="!(isAuthenticated() && onInvalidUrl())"> <div class="col-md-auto" *ngIf="!(isAuthenticated() && onInvalidUrl())">
<button type="button" class="normal-btn ml-auto" <button type="button" class="normal-btn ml-auto" (click)="openNewDmpDialog()">{{ 'NAV-BAR.START-NEW-DMP' | translate }}</button>
(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> --> <!-- <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> <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> --> <!-- <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' | <a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dmp-profiles">{{'NAV-BAR.DMP-PROFILES' |
translate}}</a> translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dataset-profiles">{{'NAV-BAR.DATASETS-ADMIN' <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() { openNewDmpDialog() {
if (this.dialog.openDialogs.length > 0) { if (this.dialog.openDialogs.length > 0) {
this.dialog.closeAll(); this.dialog.closeAll();
} } else if (!this.isAuthenticated()) {
else { this.router.navigate(['/login']);
} else {
const dialogRef = this.dialog.open(StartNewDmpDialogComponent, { const dialogRef = this.dialog.open(StartNewDmpDialogComponent, {
disableClose: false, disableClose: false,
data: { data: {

View File

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

View File

@ -405,6 +405,8 @@
"MEMBER": "Member", "MEMBER": "Member",
"CREATOR": "Creator", "CREATOR": "Creator",
"EDITED": "Edited", "EDITED": "Edited",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Version", "VERSION": "Version",
"CONTAINED-DATASETS": "Contained Dataset Descriptions", "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.", "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": { "STATES": {
"EDITED": "Edited", "EDITED": "Edited",
"PUBLIC": "Public" "PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
}, },
"TOOLTIP": { "TOOLTIP": {
"DATASET-STATUS": { "DATASET-STATUS": {
@ -1092,6 +1096,8 @@
"CREATED": "Created", "CREATED": "Created",
"LABEL": "Label", "LABEL": "Label",
"MODIFIED": "Modified", "MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status" "STATUS": "Status"
} }
}, },

View File

@ -402,6 +402,8 @@
"MEMBER": "Miembro", "MEMBER": "Miembro",
"CREATOR": "Creator", "CREATOR": "Creator",
"EDITED": "Editado en", "EDITED": "Editado en",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Versión", "VERSION": "Versión",
"CONTAINED-DATASETS": "Descripción del Dataset contenidos", "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!", "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" "INVITE-COLLABORATORS": "Invitar a colaboradores"
}, },
"STATES": { "STATES": {
"EDITED": "Editado", "EDITED": "Edited",
"PUBLIC": "Publicado" "PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
}, },
"TOOLTIP": { "TOOLTIP": {
"DATASET-STATUS": { "DATASET-STATUS": {
@ -1083,6 +1087,8 @@
"CREATED": "Created", "CREATED": "Created",
"LABEL": "Label", "LABEL": "Label",
"MODIFIED": "Modified", "MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status" "STATUS": "Status"
} }
}, },

View File

@ -402,6 +402,8 @@
"MEMBER": "Μέλος", "MEMBER": "Μέλος",
"CREATOR": "Συντάκτης", "CREATOR": "Συντάκτης",
"EDITED": "Επεξεργάστηκε", "EDITED": "Επεξεργάστηκε",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Έκδοση", "VERSION": "Έκδοση",
"CONTAINED-DATASETS": "Δεδομένα που συμπεριλαμβάνει", "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!", "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": "Προσκάλεσε συνεργάτες" "INVITE-COLLABORATORS": "Προσκάλεσε συνεργάτες"
}, },
"STATES": { "STATES": {
"EDITED": "Επεξεργάστηκε", "EDITED": "Edited",
"PUBLIC": "Δημοσιευμένο" "PUBLIC": "Public",
"FINALIZED": "Finalized",
"PUBLISHED": "Published"
}, },
"TOOLTIP": { "TOOLTIP": {
"DATASET-STATUS": { "DATASET-STATUS": {
@ -1084,6 +1088,8 @@
"CREATED": "Created", "CREATED": "Created",
"LABEL": "Label", "LABEL": "Label",
"MODIFIED": "Modified", "MODIFIED": "Modified",
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"STATUS": "Status" "STATUS": "Status"
} }
}, },

View File

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