diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java index 3f9b6b184..7726e9200 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java @@ -1422,7 +1422,7 @@ public class DataManagementPlanManager { for (Researcher researcher : dmpEntity.getResearchers()) { XWPFRun runResearcher = systemFieldParagraph.createRun(); runResearcher.addBreak(); - runResearcher.setText("• " + researcher.getLabel()); + runResearcher.setText(researcher.getLabel()); runResearcher.setColor("116a78"); } break; @@ -1430,7 +1430,7 @@ public class DataManagementPlanManager { for (Organisation organisation : dmpEntity.getOrganisations()) { XWPFRun runOrganisation = systemFieldParagraph.createRun(); runOrganisation.addBreak(); - runOrganisation.setText("• " + organisation.getLabel()); + runOrganisation.setText(organisation.getLabel()); runOrganisation.setColor("116a78"); } break; @@ -1581,6 +1581,12 @@ public class DataManagementPlanManager { //runDatasetTitle.setBold(true); //runDatasetTitle.setFontSize(12); + XWPFParagraph descriptionParagraph = document.createParagraph(); + XWPFRun descriptionParagraphRun = descriptionParagraph.createRun(); + descriptionParagraphRun.setText("Description: "); + descriptionParagraphRun.setColor("000000"); + wordBuilder.addParagraphContent(datasetEntity.getDescription(), document, ParagraphStyle.HTML, BigInteger.ZERO, 0); + XWPFParagraph datasetTemplateParagraph = document.createParagraph(); // datasetTemplateParagraph.setStyle("Heading3"); XWPFRun runDatasetTemplate1 = datasetTemplateParagraph.createRun(); diff --git a/dmp-backend/web/src/main/resources/documents/h2020.docx b/dmp-backend/web/src/main/resources/documents/h2020.docx index b0e721ab0..defd937d3 100644 Binary files a/dmp-backend/web/src/main/resources/documents/h2020.docx and b/dmp-backend/web/src/main/resources/documents/h2020.docx differ diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-blueprint-editor.model.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-blueprint-editor.model.ts index bda17b1b1..034561b37 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-blueprint-editor.model.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-blueprint-editor.model.ts @@ -5,15 +5,15 @@ import { ValidationErrorModel } from "@common/forms/validation/error-model/valid import { ValidationContext } from "@common/forms/validation/validation-context"; export class DmpBlueprintEditor { - public id: string; + public id: string; public label: string; - public definition: DmpBlueprintDefinitionEditor = new DmpBlueprintDefinitionEditor(); - public status: number; + public definition: DmpBlueprintDefinitionEditor = new DmpBlueprintDefinitionEditor(); + public status: number; public created: Date; public modified: Date; public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); - fromModel(item: DmpBlueprint): DmpBlueprintEditor { + fromModel(item: DmpBlueprint): DmpBlueprintEditor { this.id = item.id; this.label = item.label; this.definition = new DmpBlueprintDefinitionEditor().fromModel(item.definition); @@ -51,9 +51,9 @@ export class DmpBlueprintEditor { export class DmpBlueprintDefinitionEditor { - public sections: SectionDmpBlueprintEditor[] = new Array(); + public sections: SectionDmpBlueprintEditor[] = new Array(); - fromModel(item: DmpBlueprintDefinition): DmpBlueprintDefinitionEditor { + fromModel(item: DmpBlueprintDefinition): DmpBlueprintDefinitionEditor { if (item.sections) { item.sections.map(x => this.sections.push(new SectionDmpBlueprintEditor().fromModel(x))); } return this; } @@ -62,7 +62,7 @@ export class DmpBlueprintDefinitionEditor { const formBuilder = new FormBuilder(); const formGroup = formBuilder.group({}); const sectionsFormArray = new Array(); - this.sections.forEach(item => { + this.sections.sort((a, b) => a.ordinal - b.ordinal).forEach(item => { const form: FormGroup = item.buildForm(); sectionsFormArray.push(form); }); @@ -72,23 +72,23 @@ export class DmpBlueprintDefinitionEditor { } export class SectionDmpBlueprintEditor { - public id: string; - public label: string; - public description: string; - public ordinal: number; - public fields: FieldInSectionEditor[] = new Array(); + public id: string; + public label: string; + public description: string; + public ordinal: number; + public fields: FieldInSectionEditor[] = new Array(); public hasTemplates: boolean; - public descriptionTemplates: DescriptionTemplatesInSectionEditor[] = new Array(); + public descriptionTemplates: DescriptionTemplatesInSectionEditor[] = new Array(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); - fromModel(item: SectionDmpBlueprint): SectionDmpBlueprintEditor { + fromModel(item: SectionDmpBlueprint): SectionDmpBlueprintEditor { this.id = item.id; this.label = item.label; this.description = item.description; - this.ordinal = item.ordinal; + this.ordinal = item.ordinal; if (item.fields) { item.fields.map(x => this.fields.push(new FieldInSectionEditor().fromModel(x))); } this.hasTemplates = item.hasTemplates; - if (item.descriptionTemplates) { item.descriptionTemplates.map(x => this.descriptionTemplates.push(new DescriptionTemplatesInSectionEditor().fromModel(x))); } + if (item.descriptionTemplates) { item.descriptionTemplates.map(x => this.descriptionTemplates.push(new DescriptionTemplatesInSectionEditor().fromModel(x))); } return this; } @@ -101,14 +101,14 @@ export class SectionDmpBlueprintEditor { ordinal: [{ value: this.ordinal, disabled: disabled }, context.getValidation('ordinal')], hasTemplates: [{ value: this.hasTemplates, disabled: disabled }, context.getValidation('hasTemplates')] }); - const formBuilder = new FormBuilder(); - const fieldsFormArray = new Array(); - this.fields.forEach(item => { + const formBuilder = new FormBuilder(); + const fieldsFormArray = new Array(); + this.fields.sort((a, b) => a.ordinal - b.ordinal).forEach(item => { const form: FormGroup = item.buildForm(); fieldsFormArray.push(form); }); formGroup.addControl('fields', formBuilder.array(fieldsFormArray)); - const descriptionTemplatesFormArray = new Array(); + const descriptionTemplatesFormArray = new Array(); this.descriptionTemplates.forEach(item => { const form: FormGroup = item.buildForm(); descriptionTemplatesFormArray.push(form); @@ -130,25 +130,25 @@ export class SectionDmpBlueprintEditor { } export class FieldInSectionEditor { - public id: string; + public id: string; public category: FieldCategory; - public type: number; - public label: string; - public placeholder: string; - public description: string; - public required: boolean; - public ordinal: number; + public type: number; + public label: string; + public placeholder: string; + public description: string; + public required: boolean; + public ordinal: number; public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); - fromModel(item: FieldInSection): FieldInSectionEditor { + fromModel(item: FieldInSection): FieldInSectionEditor { this.id = item.id; this.category = item.category; this.type = item.type; this.label = item.label; - this.placeholder = item.placeholder; - this.description = item.description; - this.required = item.required; - this.ordinal = item.ordinal; + this.placeholder = item.placeholder; + this.description = item.description; + this.required = item.required; + this.ordinal = item.ordinal; return this; } @@ -182,19 +182,19 @@ export class FieldInSectionEditor { } export class DescriptionTemplatesInSectionEditor { - public id: string; - public descriptionTemplateId: string; - public label: string; - public minMultiplicity: number; - public maxMultiplicity: number; + public id: string; + public descriptionTemplateId: string; + public label: string; + public minMultiplicity: number; + public maxMultiplicity: number; public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); - fromModel(item: DescriptionTemplatesInSection): DescriptionTemplatesInSectionEditor { + fromModel(item: DescriptionTemplatesInSection): DescriptionTemplatesInSectionEditor { this.id = item.id; this.descriptionTemplateId = item.descriptionTemplateId; - this.label = item.label; - this.minMultiplicity = item.minMultiplicity; - this.maxMultiplicity = item.maxMultiplicity; + this.label = item.label; + this.minMultiplicity = item.minMultiplicity; + this.maxMultiplicity = item.maxMultiplicity; return this; } @@ -253,4 +253,4 @@ export class DescriptionTemplatesInSectionEditor { // }); // return formGroup; // } -// } \ No newline at end of file +// } diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts index 66108cebd..65c604863 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts @@ -249,6 +249,9 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie removeField(sectionIndex: number, fieldIndex: number): void { this.fieldsArray(sectionIndex).removeAt(fieldIndex); + this.fieldsArray(sectionIndex).controls.forEach((field, index) => { + field.get('ordinal').setValue(index + 1); + }); } systemFieldsArray(sectionIndex: number): FormArray { @@ -366,6 +369,9 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie drop(event: CdkDragDrop, sectionIndex: number) { moveItemInArray(this.fieldsArray(sectionIndex).controls, event.previousIndex, event.currentIndex); moveItemInArray(this.fieldsArray(sectionIndex).value, event.previousIndex, event.currentIndex); + this.fieldsArray(sectionIndex).controls.forEach((field, index) => { + field.get('ordinal').setValue(index + 1); + }); } dropSections(event: CdkDragDrop) { diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html index e94a96db9..f60d38f2c 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html @@ -84,7 +84,7 @@
-
0.1 Title of DMP *
+
Title of DMP *
Title @@ -95,13 +95,13 @@
-
0.2 Description of DMP *
+
Description of DMP *
-
0.3 Blueprint of DMP *
+
Blueprint of DMP *
Select blueprint diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.scss b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.scss index e8209775a..a9283c45b 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.scss +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.scss @@ -425,5 +425,13 @@ a:hover { ::ng-deep .input-form .mat-form-field-appearance-outline .mat-form-field-infix { font-size: 1rem; - padding: 0.6em 0 1em 0 !important; -} \ No newline at end of file + // padding: 0.6em 0 1em 0 !important; +} + +::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { + padding: 1em 0 1em 0 !important; +} + +// ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { +// padding: 0rem 0rem 0.4rem 0rem !important; +// } \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss index 9833fa58d..5f3773e0b 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.scss @@ -332,7 +332,7 @@ vertical-align: bottom; } -::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { +:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { padding: 0rem 0rem 0.4rem 0rem !important; } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 8991904c1..0361a9f8e 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -318,7 +318,7 @@ "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", - "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", + "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "UNTITLED": "Untitled", "QUESTION": "Question", "TEMPLATE-OUTLINE": "Template outline", @@ -1159,7 +1159,7 @@ "DATASET-SELECTION": "Dataset selection", "DESCRIPTION-INFO": "Description info", "LICENSE-INFO": "License", - "DATASET": "Dataset", + "DATASET": "Description", "PREVIOUS": "Previous", "NEXT": "Next" }, diff --git a/dmp-frontend/src/assets/resources/skipDisable.json b/dmp-frontend/src/assets/resources/skipDisable.json index 61fc34953..3a0850e64 100644 --- a/dmp-frontend/src/assets/resources/skipDisable.json +++ b/dmp-frontend/src/assets/resources/skipDisable.json @@ -1,6 +1,5 @@ [ "DatasetProfileEditorModel.description", - "DatasetProfileEditorModel.type", "DatasetProfileEditorModel.label", "SectionEditorModel.title", "SectionEditorModel.description",