'Start-new-dmp-dialog' completed except of import from file

This commit is contained in:
gpapavgeri 2020-07-09 13:45:19 +03:00
parent a1963602df
commit ea3b73dd9c
12 changed files with 184 additions and 5 deletions

View File

@ -14,7 +14,7 @@
{{'DASHBOARD.NEW-QUESTION' | translate}} <a><u>{{'DASHBOARD.OPEN-AIR-GUIDE' | translate}}</u></a> {{'DASHBOARD.LEARN-MORE' | translate}}
</p>
<div class="d-flex">
<button type="button" class="col-auto align-self-center normal-btn">Start your first DMP</button>
<button type="button" class="col-auto align-self-center normal-btn" (click)="openNewDmpDialog()">{{'DASHBOARD.START-YOUR-FIRST-DMP' | translate}}</button>
<img class="col-auto ml-auto" src="../../../assets/splash/assets/img/laptop.png" width="116" height="139">
</div>
</div>

View File

@ -25,6 +25,8 @@ import { BreadcrumbItem } from '../misc/breadcrumb/definition/breadcrumb-item';
import { IBreadCrumbComponent } from '../misc/breadcrumb/definition/IBreadCrumbComponent';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
import { DatasetCriteria } from '@app/core/query/dataset/dataset-criteria';
import { MatDialog } from '@angular/material';
import { StartNewDmpDialogComponent } from '../dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component';
@Component({
@ -68,7 +70,8 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
private dashboardService: DashboardService,
private searchBarService: SearchBarService,
private authentication: AuthService,
private userService: UserService
private userService: UserService,
private dialog: MatDialog
) {
super();
@ -207,6 +210,20 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
this.totalRecents = event;
}
openNewDmpDialog() {
if (this.dialog.openDialogs.length > 0) {
this.dialog.closeAll();
}
else {
const dialogRef = this.dialog.open(StartNewDmpDialogComponent, {
disableClose: true,
data: {
isDialog: true
}
});
}
}
// viewAllPublicDmpsClicked() {
// this.router.navigate(['/explore-plans']);
// }

View File

@ -35,6 +35,8 @@ import { AddOrganizationComponent } from './editor/add-organization/add-organiza
import { AddCostComponent } from './editor/cost-editor/add-cost/add-cost.component';
import { CostListingComponent } from './editor/cost-editor/cost-listing/cost-listing.component';
import { DmpCriteriaDialogComponent } from './listing/criteria/dmp-criteria-dialog.component';
import { StartNewDmpDialogComponent } from './start-new-dmp-dialogue/start-new-dmp-dialog.component';
@NgModule({
imports: [
@ -76,7 +78,8 @@ import { DmpCriteriaDialogComponent } from './listing/criteria/dmp-criteria-dial
DmpCriteriaDialogComponent,
AddOrganizationComponent,
AddCostComponent,
CostListingComponent
CostListingComponent,
StartNewDmpDialogComponent
],
entryComponents: [
DmpInvitationDialogComponent,
@ -87,7 +90,8 @@ import { DmpCriteriaDialogComponent } from './listing/criteria/dmp-criteria-dial
AddOrganizationComponent,
DmpCriteriaDialogComponent,
AddOrganizationComponent,
AddCostComponent
AddCostComponent,
StartNewDmpDialogComponent
]
})
export class DmpModule { }

View File

@ -0,0 +1,22 @@
<div class="form-container">
<div class="row d-flex justify-content-between m-0" >
<a class="logo"><img src="../../../assets/splash/assets/img/argos-logo.svg"></a>
<mat-icon class="close-icon" (click)="close()">close</mat-icon>
</div>
<div class="row content">
<h1 mat-dialog-title class="title">{{'NAV-BAR.START-NEW-DMP' | translate}}</h1>
<p class="text">{{'NAV-BAR.START-NEW-DMP-TXT' | translate}}</p>
<div class="actions">
<button type="button" class="normal-btn upload-btn d-flex flex-row align-items-center">
<mat-icon class="pr-2">file_upload</mat-icon>
{{ 'NAV-BAR.IMPORT-FROM-FILE' | translate }}
</button>
<p class="m-0">{{ 'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate }}</p>
<button type="button" class="normal-btn font-weight-bold d-flex flex-row align-items-center" (click)="startWizard()">
<mat-icon>chevron_right</mat-icon>
{{ 'NAV-BAR.START-WIZARD' | translate }}
</button>
</div>
</div>
</div>

View File

@ -0,0 +1,54 @@
::ng-deep .mat-dialog-container {
border-radius: 8px;
}
.form-container {
width: 33rem;
min-height: 14rem;
padding: 0.28rem 0.34rem 0.875rem 0.625rem;
}
.logo {
width: 8.44rem;
}
.close-icon {
cursor: pointer;
}
.content {
margin: 2.17rem 2.304rem 1.1875rem 3.065rem;
}
.title, .text {
font-size: 1.25rem;
font-weight: lighter;
color: #000000;
opacity: 0.8;
}
.title {
font-size: 2.375rem;
margin-bottom: 1.1875rem;
}
.text {
margin-bottom: 2.9375rem;
line-height: 1.9rem;
}
.upload-btn {
background-color: white;
color: #212121;
font-weight: bold;
box-shadow: 0px 3px 6px #1E202029;
border: 2px solid #212121;
}
.actions {
width: 26.667rem;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}

View File

@ -0,0 +1,39 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router';
@Component({
selector: 'app-start-new-dmp',
templateUrl: './start-new-dmp-dialog.component.html',
styleUrls: ['./start-new-dmp-dialog.component.scss']
})
export class StartNewDmpDialogComponent {
public isDialog: boolean = false;
constructor(
public dialogRef: MatDialogRef<StartNewDmpDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private router: Router
) {
this.isDialog = data.isDialog;
}
cancel() {
this.dialogRef.close();
}
send() {
this.dialogRef.close(this.data);
}
close() {
this.dialogRef.close(false);
}
startWizard() {
this.router.navigate(['/quick-wizard']);
this.close();
}
}

View File

@ -11,7 +11,8 @@
<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" [routerLink]="['/quick-wizard']">{{ '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> -->
<button mat-button [matMenuTriggerFor]="languageMenu" class="p-0 lang"><mat-icon class="mr-2">language</mat-icon><span class="text-uppercase">{{selectedLanguage}}</span><mat-icon>arrow_drop_down</mat-icon></button>

View File

@ -87,3 +87,16 @@ $mat-card-header-size: 40px !default;
width: fit-content !important;
min-width: auto !important;
}
.mat-dialog-container {
display: block;
padding: 24px;
border-radius: 4px;
box-sizing: border-box;
overflow: auto;
outline: 0;
width: 100%;
height: 100%;
min-height: inherit;
max-height: inherit;
}

View File

@ -12,6 +12,8 @@ import { DATASETS_ROUTES, DMP_ROUTES, GENERAL_ROUTES } from '../sidebar/sidebar.
import { LanguageService } from '@app/core/services/language/language.service';
import { UserService } from '@app/core/services/user/user.service';
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
import { DmpInvitationDialogComponent } from '../dmp/invitation/dmp-invitation.component';
import { StartNewDmpDialogComponent } from '../dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component';
const availableLanguages: any[] = require('../../../assets/resources/language.json');
@ -238,4 +240,19 @@ export class NavbarComponent extends BaseComponent implements OnInit {
sidebarToggleOutput(event) {
this.sidebarToggled.emit(event);
}
openNewDmpDialog() {
if (this.dialog.openDialogs.length > 0) {
this.dialog.closeAll();
}
else {
const dialogRef = this.dialog.open(StartNewDmpDialogComponent, {
disableClose: true,
data: {
isDialog: true
}
});
}
}
}

View File

@ -190,6 +190,9 @@
"DMP-TEMPLATES": "DMP TEMPLATES",
"USERS-BREADCRUMB": "USERS",
"START-NEW-DMP": "Start new DMP",
"START-NEW-DMP-TXT": "A special Wizard is made to help you create your DMP easily. It has a step by step guide with all the needed information to create a DMP easily.",
"START-WIZARD": "Start wizard",
"IMPORT-FROM-FILE": "Import from file",
"SEARCH": {
"DATASET": "Dataset Description",
"DMP": "DMP",
@ -1176,6 +1179,7 @@
"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",
"START-YOUR-FIRST-DMP": "Start your first DMP",
"OPEN-AIR-GUIDE": "OpenAIREs Guide for Researchers",
"LEARN-MORE": "to learn more about how to create one!",
"ORGANIZATIONS": "Related Organizations",

View File

@ -189,6 +189,9 @@
"DMP-TEMPLATES": "PLANTILLAS PGD",
"USERS-BREADCRUMB": "USUARIOS",
"START-NEW-DMP": "Comenzar nuevo dmp",
"START-NEW-DMP-TXT": "A special Wizard is made to help you create your DMP easily. It has a step by step guide with all the needed information to create a DMP easily.",
"START-WIZARD": "Start wizard",
"IMPORT-FROM-FILE": "Import from file",
"SEARCH": {
"DATASET": "Descripción del Dataset",
"DMP": "PGD",
@ -1159,6 +1162,7 @@
"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",
"START-YOUR-FIRST-DMP": "Start your first DMP",
"OPEN-AIR-GUIDE": "Guía de OpenAIRE para investigadores",
"LEARN-MORE": "para aprender más sobre cómo crear uno!",
"ORGANIZATIONS": "Organizaciones relacionadas",

View File

@ -189,6 +189,9 @@
"DMP-TEMPLATES": "TEMPLATES ΣΧΕΔΙΩΝ ΔΙΑΧΕΙΡΙΣΗΣ ΔΕΔΟΜΕΝΩΝ",
"USERS-BREADCRUMB": "ΧΡΗΣΤΕΣ",
"START-NEW-DMP": "Ξεκινήστε νέο DMP",
"START-NEW-DMP-TXT": "A special Wizard is made to help you create your DMP easily. It has a step by step guide with all the needed information to create a DMP easily.",
"START-WIZARD": "Ξεκινήστε τον wizard",
"IMPORT-FROM-FILE": "Import from file",
"SEARCH": {
"DATASET": "Περιγραφή Συνόλου Δεδομένων",
"DMP": "Σχέδιο Διαχείρισης Δεδομένων",
@ -1158,6 +1161,7 @@
"TITLE": "Τι είναι το ARGOS?",
"DMP-QUESTION": "Τι είναι το DMP στο ARGOS?",
"NEW-QUESTION": "Νέος με τα DMP; Επίσκεψου",
"START-YOUR-FIRST-DMP": "Ξεκινήστε το πρώτο σας DMP",
"OPEN-AIR-GUIDE": "Οδηγός για ερευνητές του OpenAIRE",
"LEARN-MORE": "για να μάθετε περισσότερα για το πώς να δημιουργήσετε ένα!",
"INFO-TEXT": "Το ARGOS είναι μια ανοικτή επεκτάσιμη υπηρεσία που απλοποιεί τη διαχείριση, την επικύρωση, την παρακολούθηση και τη συντήρηση των Σχεδίων Διαχείρισης Δεδομένων. Επιτρέπει στους φορείς (ερευνητές, υπεύθυνους έρευνας, διευθυντές κλπ.) να δημιουργούν ζωντανά Σχέδια Διαχείρισης Δεδομένων που μπορούν να ανταλλάσσονται ελεύθερα μεταξύ των υποδομών για τη διεξαγωγή συγκεκριμένων πτυχών της διαδικασίας διαχείρισης Δεδομένων, σύμφωνα με τις προθέσεις και τη δέσμευση των κατόχων Δεδομένων.",