diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html index 601ccf0bd..d50ae2413 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html @@ -8,12 +8,10 @@
-

What is a DMP in ARGOS

-

A Data Management Plan (DMP) is a living document describing the datasets that are generated and/ or re-used - during and after a research lifetime. DMPs aim to provide researchers with essential information to re-produce, - re-distribute and re-purpose research results thus assuring for their validity and exploitation.

+

{{'DASHBOARD.DMP-QUESTION' | translate}}

+

{{'DASHBOARD.INFO-DMP-TEXT' | translate}}

- New with DMPs? Visit OpenAIRE’s Guide for Researchers to learn more about how to create one! + {{'DASHBOARD.NEW-QUESTION' | translate}} {{'DASHBOARD.OPEN-AIR-GUIDE' | translate}} {{'DASHBOARD.LEARN-MORE' | translate}}

@@ -22,15 +20,15 @@
-
Personal usage
+
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
0
- DMP's + {{'DASHBOARD.DMPS' | translate}}
0
- Dataset Descriptions + {{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}
0
- Grants + {{'DASHBOARD.GRANTS' | translate}}
0
- Related organizations + {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}
diff --git a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.html b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.html index 767a57fb7..eb053a3c7 100644 --- a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.html +++ b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.html @@ -26,7 +26,7 @@
open_in_new{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}} - group_add{{'DATASET-LISTING.ACTIONS.INVITE-COLLABORATORS' | translate}} + group_add{{'DATASET-LISTING.ACTIONS.INVITE-COLLABORATORS' | translate}} more_horiz
diff --git a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts index 0d3a63409..597925313 100644 --- a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.ts @@ -20,6 +20,7 @@ import { SnackBarNotificationLevel } from '@app/core/services/notification/ui-no import * as FileSaver from 'file-saver'; import { EnumUtils } from '@app/core/services/utilities/enum-utils.service'; import { UiNotificationService } from '@app/core/services/notification/ui-notification-service'; +import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dmp-invitation.component'; @Component({ selector: 'app-drafts', @@ -161,6 +162,18 @@ export class DraftsComponent extends BaseComponent implements OnInit { }); } + openShareDialog(dmpRowId: any, dmpRowName: any) { + const dialogRef = this.dialog.open(DmpInvitationDialogComponent, { + // height: '250px', + // width: '700px', + restoreFocus: false, + data: { + dmpId: dmpRowId, + dmpName: dmpRowName + } + }); + } + onCallbackSuccess(id?: String): void { this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); id ? this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', id]); }) : this.router.navigate(['/datasets']); diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.html b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.html index 3d057a645..b555cdc02 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.html +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.html @@ -28,7 +28,7 @@
open_in_new{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}} - group_add{{'DATASET-LISTING.ACTIONS.INVITE-COLLABORATORS' | translate}} + group_add{{'DATASET-LISTING.ACTIONS.INVITE-COLLABORATORS' | translate}} more_horiz
diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.ts b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.ts index 769780f85..e163cc42d 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.ts @@ -20,6 +20,7 @@ import { ValidationErrorModel } from '@common/forms/validation/error-model/valid import { UiNotificationService } from '@app/core/services/notification/ui-notification-service'; import { SnackBarNotificationLevel } from '@common/modules/notification/ui-notification-service'; import { DatasetStatus } from '@app/core/common/enum/dataset-status'; +import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dmp-invitation.component'; @Component({ selector: 'app-recent-edited-dataset-activity', @@ -151,6 +152,18 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen }); } + openShareDialog(dmpRowId: any, dmpRowName: any, activity: any) { + const dialogRef = this.dialog.open(DmpInvitationDialogComponent, { + // height: '250px', + // width: '700px', + restoreFocus: false, + data: { + dmpId: dmpRowId, + dmpName: dmpRowName + } + }); + } + getFilenameFromContentDispositionHeader(header: string): string { const regex: RegExp = new RegExp(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/g); diff --git a/dmp-frontend/src/app/ui/language/language-content/language.component.ts b/dmp-frontend/src/app/ui/language/language-content/language.component.ts index 791ed94d1..9eff5109f 100644 --- a/dmp-frontend/src/app/ui/language/language-content/language.component.ts +++ b/dmp-frontend/src/app/ui/language/language-content/language.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Output, EventEmitter } from '@angular/core'; import { Router } from '@angular/router'; import { AuthService } from '@app/core/services/auth/auth.service'; import { LanguageService } from '@app/core/services/language/language.service'; @@ -9,53 +9,55 @@ import { BaseComponent } from '@common/base/base.component'; const availableLanguages: any[] = require('../../../../assets/resources/language.json'); @Component({ - selector: 'app-language', - templateUrl: './language.component.html', - styleUrls: ['./language.component.scss'] + selector: 'app-language', + templateUrl: './language.component.html', + styleUrls: ['./language.component.scss'] }) export class LanguageComponent extends BaseComponent implements OnInit { + @Output() languageChange: EventEmitter = new EventEmitter(); languages = availableLanguages; - constructor( - private router: Router, - private authentication: AuthService, - private languageService: LanguageService, - private userService: UserService - ) { super(); } + constructor( + private router: Router, + private authentication: AuthService, + private languageService: LanguageService, + private userService: UserService + ) { super(); } - ngOnInit() { - } - - public isAuthenticated(): boolean { - return !(!this.authentication.current()); -} - - public getCurrentLanguage(): any { - const lang = this.languages.find(lang => lang.value === this.languageService.getCurrentLanguage()); - return lang; -} - - onLanguageSelected(selectedLanguage: any) { - if (this.isAuthenticated()) { - const langMap = new Map(); - langMap.set('language', selectedLanguage.value); - this.userService.updateUserSettings({language: this.languages.find(lang => lang.value === selectedLanguage.value)}) - .pipe(takeUntil(this._destroyed)) - .subscribe((response) => { - this.languageService.changeLanguage(selectedLanguage.value); - this.authentication.me() - .pipe(takeUntil(this._destroyed)) - .subscribe ( innerResponse => - {this.router.navigateByUrl(this.router.url);}); - }, - error => { - console.log(error); - }); - } else { - this.languageService.changeLanguage(selectedLanguage.value); - this.router.navigateByUrl(this.router.url); + ngOnInit() { + this.languageChange.emit(this.getCurrentLanguage().value) + } + + public isAuthenticated(): boolean { + return !(!this.authentication.current()); + } + + public getCurrentLanguage(): any { + const lang = this.languages.find(lang => lang.value === this.languageService.getCurrentLanguage()); + return lang; + } + + onLanguageSelected(selectedLanguage: any) { + if (this.isAuthenticated()) { + const langMap = new Map(); + langMap.set('language', selectedLanguage.value); + this.userService.updateUserSettings({ language: this.languages.find(lang => lang.value === selectedLanguage.value) }) + .pipe(takeUntil(this._destroyed)) + .subscribe((response) => { + this.languageService.changeLanguage(selectedLanguage.value); + this.authentication.me() + .pipe(takeUntil(this._destroyed)) + .subscribe(innerResponse => { this.router.navigateByUrl(this.router.url); }); + }, + error => { + console.log(error); + }); + } else { + this.languageService.changeLanguage(selectedLanguage.value); + this.router.navigateByUrl(this.router.url); + } + this.languageChange.emit(selectedLanguage.value); } -} } diff --git a/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss b/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss index 593d91ba2..0e90859e5 100644 --- a/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss +++ b/dmp-frontend/src/app/ui/sidebar/sidebar.component.scss @@ -36,3 +36,8 @@ $mat-card-header-size: 30px !default; .active a i{ color: #23BCBA; } + +mat-list-item { + display: flex !important; + height: auto !important; +} diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index dccd10204..10bb1e2d2 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -1123,7 +1123,12 @@ "GRANTS": "Grants", "MY-DMPS": "My DMPs", "TITLE": "What is ARGOS?", + "DMP-QUESTION": "What is a DMP in ARGOS?", "INFO-TEXT": "ARGOS is an open extensible service that simplifies the management, validation, monitoring and maintenance and of Data Management Plans. It allows actors (researchers, managers, supervisors etc) to create actionable DMPs that may be freely exchanged among infrastructures for carrying out specific aspects of the Data management process in accordance with the intentions and commitment of Data owners.", + "INFO-DMP-TEXT": "A Data Management Plan (DMP) is a living document describing the datasets that are generated and/ or re-used during and after a research lifetime. DMPs aim to provide researchers with essential information to re-produce,re-distribute and re-purpose research results thus assuring for their validity and exploitation.", + "NEW-QUESTION": "New with DMPs? Visit", + "OPEN-AIR-GUIDE": "OpenAIRE’s Guide for Researchers", + "LEARN-MORE": "to learn more about how to create one!", "ORGANIZATIONS": "Related Organizations", "DMPS": "DMPs", "MY-DATASETS": "My Dataset Descriptions", diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json index 9261319cd..8c67bed8f 100644 --- a/dmp-frontend/src/assets/i18n/es.json +++ b/dmp-frontend/src/assets/i18n/es.json @@ -1110,7 +1110,12 @@ "GRANTS": "Subvenciones", "MY-DMPS": "Mis PGDs", "TITLE": "¿Qué es ARGOS?", + "DMP-QUESTION": "¿Que es un DMP en ARGOS?", "INFO-TEXT": "ARGOS es un servicio extensible y abierto que simplifica la gestión, validación, monitorización y mantenimiento de los Plan de Gestión de Datos. Permite a los participantes (investigadores, gestores, supervisores, etc) crear un PGDs visible que puede ser compartido libremente entre distintas infraestructuras para llevar a cabo aspectos específicos del proceso de Gestión de Datos de acuerdo con los propósitos y el compromiso de los propietarios de los datos.", + "INFO-DMP-TEXT": "A Data Management Plan (DMP) is a living document describing the datasets that are generated and/ or re-used during and after a research lifetime. DMPs aim to provide researchers with essential information to re-produce,re-distribute and re-purpose research results thus assuring for their validity and exploitation.", + "NEW-QUESTION": "¿Nuevo con DMP? Visitar", + "OPEN-AIR-GUIDE": "Guía de OpenAIRE para investigadores", + "LEARN-MORE": "para aprender más sobre cómo crear uno!", "ORGANIZATIONS": "Organizaciones relacionadas", "DMPS": "PGDs", "MY-DATASETS": "Mis descripciones del Dataset", diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json index fa4f747da..5bc65bc3d 100644 --- a/dmp-frontend/src/assets/i18n/gr.json +++ b/dmp-frontend/src/assets/i18n/gr.json @@ -1097,8 +1097,13 @@ "MY-GRANTS": "Οι Επιχορηγήσεις μου", "GRANTS": "Επιχορηγήσεις", "MY-DMPS": "Τα Σχέδια Διαχείρισης Δεδομένων μου", - "TITLE": "Τi είναι το ARGOS?", + "TITLE": "Τι είναι το ARGOS?", + "DMP-QUESTION": "Τι είναι το DMP στο ARGOS?", + "NEW-QUESTION": "Νέος με τα DMP; Επίσκεψου", + "OPEN-AIR-GUIDE": "Οδηγός για ερευνητές του OpenAIRE", + "LEARN-MORE": "για να μάθετε περισσότερα για το πώς να δημιουργήσετε ένα!", "INFO-TEXT": "Το ARGOS είναι μια ανοικτή επεκτάσιμη υπηρεσία που απλοποιεί τη διαχείριση, την επικύρωση, την παρακολούθηση και τη συντήρηση των Σχεδίων Διαχείρισης Δεδομένων. Επιτρέπει στους φορείς (ερευνητές, υπεύθυνους έρευνας, διευθυντές κλπ.) να δημιουργούν ζωντανά Σχέδια Διαχείρισης Δεδομένων που μπορούν να ανταλλάσσονται ελεύθερα μεταξύ των υποδομών για τη διεξαγωγή συγκεκριμένων πτυχών της διαδικασίας διαχείρισης Δεδομένων, σύμφωνα με τις προθέσεις και τη δέσμευση των κατόχων Δεδομένων.", + "INFO-DMP-TEXT": "A Data Management Plan (DMP) is a living document describing the datasets that are generated and/ or re-used during and after a research lifetime. DMPs aim to provide researchers with essential information to re-produce,re-distribute and re-purpose research results thus assuring for their validity and exploitation.", "ORGANIZATIONS": "Σχετικοί Οργανισμοί", "DMPS": "Σχέδια Διαχείρισης Δεδομένων", "MY-DATASETS": "Οι Περιγραφές Συνόλων Δεδομένων μου",