Compare commits

..

No commits in common. "master" and "1.8.9" have entirely different histories.

98 changed files with 1333 additions and 4470 deletions

1
.gitignore vendored
View File

@ -48,4 +48,3 @@ bin/
*.classpath *.classpath
openDMP/dmp-backend/uploads/ openDMP/dmp-backend/uploads/
openDMP/dmp-backend/tmp/ openDMP/dmp-backend/tmp/
dmp-frontend/.angular/

View File

@ -1,9 +1,3 @@
**Important note: The deployment, troubleshooting, maintenance and operation of on-premises / self-served OpenDMP instances for development, testing or production use, shall be the sole responsibility of the adopter. No support is guaranteed by OpenDMP implentation team for issues that may be encountered during deployment, extension or operation of such installations.**
**Documentation is provided on a best-effort basis for the code and processes around the development, deployment and operation of OpenDMP. If you find any misalignment of the actual processes with the related documentation, please let us know so that the misalignment is addressed for the benefit of future adopters.**
# Using Docker Compose with Argos # Using Docker Compose with Argos
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. 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.

View File

@ -77,7 +77,7 @@ public class DMPDaoImpl extends DatabaseAccess<DMP> implements DMPDao {
query.where((builder, root) -> root.join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id").in(criteria.getCollaborators())); query.where((builder, root) -> root.join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id").in(criteria.getCollaborators()));
} }
if (criteria.getDatasetTemplates() != null && !criteria.getDatasetTemplates().isEmpty()) { if (criteria.getDatasetTemplates() != null && !criteria.getDatasetTemplates().isEmpty()) {
query.where((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("datasetprofile").get("id").in(criteria.getDatasetTemplates())); query.where((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("id").in(criteria.getDatasetTemplates()));
} }
if (criteria.getGrantStatus() != null) { if (criteria.getGrantStatus() != null) {
if (criteria.getGrantStatus().equals(GrantStateType.FINISHED.getValue().shortValue())) if (criteria.getGrantStatus().equals(GrantStateType.FINISHED.getValue().shortValue()))

View File

@ -46,10 +46,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple --> <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
@ -226,7 +222,6 @@
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.9.RELEASE</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -6,7 +6,6 @@ import eu.eudat.logic.managers.DatasetProfileManager;
import eu.eudat.logic.services.ApiContext; import eu.eudat.logic.services.ApiContext;
import eu.eudat.models.data.datasetprofile.DatasetProfileAutocompleteItem; import eu.eudat.models.data.datasetprofile.DatasetProfileAutocompleteItem;
import eu.eudat.models.data.datasetprofile.DatasetProfileListingModel; import eu.eudat.models.data.datasetprofile.DatasetProfileListingModel;
import eu.eudat.models.data.datasetprofile.DatasetProfileWithPrefillingPropertyModel;
import eu.eudat.models.data.helpers.responses.ResponseItem; import eu.eudat.models.data.helpers.responses.ResponseItem;
import eu.eudat.types.ApiMessageCode; import eu.eudat.types.ApiMessageCode;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -43,12 +42,5 @@ public class DatasetProfiles extends BaseController {
List<DatasetProfileListingModel> datasetProfileTableData = this.datasetProfileManager.getAll(tableRequestItem); List<DatasetProfileListingModel> datasetProfileTableData = this.datasetProfileManager.getAll(tableRequestItem);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DatasetProfileListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(datasetProfileTableData)); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DatasetProfileListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(datasetProfileTableData));
} }
@RequestMapping(method = RequestMethod.POST, value = {"/datasetprofiles/getAllWithPrefilling"}, produces = "application/json")
public @ResponseBody
ResponseEntity<ResponseItem<List<DatasetProfileWithPrefillingPropertyModel>>> getAllWithPrefilling(@RequestBody DatasetProfileTableRequestItem tableRequestItem) {
List<DatasetProfileWithPrefillingPropertyModel> datasetProfileTableData = this.datasetProfileManager.getAllWithPrefilling(tableRequestItem);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DatasetProfileWithPrefillingPropertyModel>>().status(ApiMessageCode.NO_MESSAGE).payload(datasetProfileTableData));
}
} }

View File

@ -21,7 +21,6 @@ public class AdminManager {
public static DescriptionTemplate generateViewStyleDefinition(DatasetProfile profile, ApiContext apiContext) throws Exception { public static DescriptionTemplate generateViewStyleDefinition(DatasetProfile profile, ApiContext apiContext) throws Exception {
ViewStyleModel viewStyleModel = new ViewStyleModel(); ViewStyleModel viewStyleModel = new ViewStyleModel();
viewStyleModel.setEnablePrefilling(profile.isEnablePrefilling());
viewStyleModel.setSections(new ModelBuilder().toViewStyleDefinition(profile.getSections(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Section.class)); viewStyleModel.setSections(new ModelBuilder().toViewStyleDefinition(profile.getSections(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Section.class));
viewStyleModel.setPages(new ModelBuilder().toViewStyleDefinition(profile.getPages(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Page.class)); viewStyleModel.setPages(new ModelBuilder().toViewStyleDefinition(profile.getPages(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Page.class));
Document viewStyleDoc = XmlBuilder.getDocument(); Document viewStyleDoc = XmlBuilder.getDocument();

View File

@ -202,14 +202,14 @@ public class DashBoardManager {
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build()) .selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
.whenComplete((datasetActivities, throwable) -> activity.setRecentDatasetActivities(datasetActivities)); .whenComplete((datasetActivities, throwable) -> activity.setRecentDatasetActivities(datasetActivities));
/*CompletableFuture<List<RecentActivityData>> grants = grantRepository.getAuthenticated(grantRepository.getWithCriteria(grantCriteria), user) CompletableFuture<List<RecentActivityData>> grants = grantRepository.getAuthenticated(grantRepository.getWithCriteria(grantCriteria), user)
.withHint("grantRecentActivity") .withHint("grantRecentActivity")
.orderBy((builder, root) -> builder.desc(root.get("modified"))) .orderBy((builder, root) -> builder.desc(root.get("modified")))
.take(numberofactivities) .take(numberofactivities)
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build()) .selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
.whenComplete((grantActivities, throwable) -> activity.setRecentGrantActivities(grantActivities));*/ .whenComplete((grantActivities, throwable) -> activity.setRecentGrantActivities(grantActivities));
CompletableFuture.allOf(/*grants, */dmps, datasets).join(); CompletableFuture.allOf(grants, dmps, datasets).join();
return activity; return activity;
} }

View File

@ -1,6 +1,5 @@
package eu.eudat.logic.managers; package eu.eudat.logic.managers;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.configurations.dynamicgrant.DynamicGrantConfiguration; import eu.eudat.configurations.dynamicgrant.DynamicGrantConfiguration;
@ -68,7 +67,6 @@ import eu.eudat.models.data.userinfo.UserListingModel;
import eu.eudat.queryable.QueryableList; import eu.eudat.queryable.QueryableList;
import eu.eudat.types.Authorities; import eu.eudat.types.Authorities;
import eu.eudat.types.MetricNames; import eu.eudat.types.MetricNames;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun; import org.apache.poi.xwpf.usermodel.XWPFRun;
@ -146,7 +144,6 @@ public class DataManagementPlanManager {
public DataTableData<DataManagementPlanListingModel> getPaged(DataManagementPlanTableRequest dataManagementPlanTableRequest, Principal principal, String fieldsGroup) throws Exception { public DataTableData<DataManagementPlanListingModel> getPaged(DataManagementPlanTableRequest dataManagementPlanTableRequest, Principal principal, String fieldsGroup) throws Exception {
UUID principalID = principal.getId(); UUID principalID = principal.getId();
List<Dmp> dmps = null; List<Dmp> dmps = null;
QueryableList<DMP> items = null; QueryableList<DMP> items = null;
QueryableList<DMP> authItems = null; QueryableList<DMP> authItems = null;
Long totalData = 0L; Long totalData = 0L;
@ -484,7 +481,7 @@ public class DataManagementPlanManager {
DMP newDmp = dataManagementPlan.toDataModel(); DMP newDmp = dataManagementPlan.toDataModel();
if(dataManagementPlan.getProfile() != null){ if(dataManagementPlan.getProfile() != null){
DMPProfile dmpProfile = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(dataManagementPlan.getProfile()); DMPProfile dmpProfile = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(dataManagementPlan.getProfile().getId());
newDmp.setProfile(dmpProfile); newDmp.setProfile(dmpProfile);
} }
if (newDmp.getStatus() == (int) DMP.DMPStatus.FINALISED.getValue()) { if (newDmp.getStatus() == (int) DMP.DMPStatus.FINALISED.getValue()) {
@ -544,14 +541,6 @@ public class DataManagementPlanManager {
} }
if(newDmp.getId() != null){ if(newDmp.getId() != null){
UUID dmpId = newDmp.getId();
List<DMPDatasetProfile> dmpDatasetProfiles = apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().asQueryable()
.where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList();
for (DMPDatasetProfile dmpDatasetProfile : dmpDatasetProfiles) {
if (newDmp.getAssociatedDmps().stream().filter(dmpDatasetProfile1 -> dmpDatasetProfile1.getId() != null).noneMatch(dmpDatasetProfile1 -> dmpDatasetProfile1.getId().equals(dmpDatasetProfile.getId()))) {
apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().delete(dmpDatasetProfile);
}
}
for(DMPDatasetProfile dmpDatasetProfile : newDmp.getAssociatedDmps()){ for(DMPDatasetProfile dmpDatasetProfile : newDmp.getAssociatedDmps()){
apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().createOrUpdate(dmpDatasetProfile); apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().createOrUpdate(dmpDatasetProfile);
} }
@ -1370,105 +1359,104 @@ public class DataManagementPlanManager {
DataManagementPlanBlueprintListingModel dmpBlueprintModel = new DataManagementPlanBlueprintListingModel(); DataManagementPlanBlueprintListingModel dmpBlueprintModel = new DataManagementPlanBlueprintListingModel();
dmpBlueprintModel.fromDataModel(dmpProfile); dmpBlueprintModel.fromDataModel(dmpProfile);
DataManagementPlanBlueprint dmpBlueprint = dmpBlueprintModel.getDefinition(); DataManagementPlanBlueprint dmpBlueprint = dmpBlueprintModel.getDefinition();
for(Section section: dmpBlueprint.getSections()) { for(Section section: dmpBlueprint.getSections()){
wordBuilder.addParagraphContent(section.getOrdinal() + ". " + section.getLabel(), document, ParagraphStyle.HEADER1, BigInteger.ZERO, 0); wordBuilder.addParagraphContent("Section " + section.getOrdinal(), document, ParagraphStyle.HEADER1, BigInteger.ZERO, 0);
// XWPFParagraph sectionInfoParagraph = document.createParagraph(); XWPFParagraph sectionInfoParagraph = document.createParagraph();
// sectionInfoParagraph.setSpacingBetween(1.0); sectionInfoParagraph.setSpacingBetween(1.0);
// XWPFRun runSectionTitle = sectionInfoParagraph.createRun(); XWPFRun runSectionTitle = sectionInfoParagraph.createRun();
// runSectionTitle.setText("Title: "); runSectionTitle.setText("Title: ");
// runSectionTitle.setColor("000000"); runSectionTitle.setColor("000000");
// XWPFRun runSectionTitleText = sectionInfoParagraph.createRun(); XWPFRun runSectionTitleText = sectionInfoParagraph.createRun();
// runSectionTitleText.setText(section.getLabel()); runSectionTitleText.setText(section.getLabel());
// runSectionTitleText.setColor("116a78"); runSectionTitleText.setColor("116a78");
// XWPFParagraph sectionDescriptionParagraph = document.createParagraph(); XWPFParagraph sectionDescriptionParagraph = document.createParagraph();
// XWPFRun runSectionDescription = sectionDescriptionParagraph.createRun(); XWPFRun runSectionDescription = sectionDescriptionParagraph.createRun();
// runSectionDescription.setText("Description: "); runSectionDescription.setText("Description: ");
// runSectionDescription.setColor("000000"); runSectionDescription.setColor("000000");
// XWPFRun runSectionDescriptionText = sectionDescriptionParagraph.createRun(); XWPFRun runSectionDescriptionText = sectionDescriptionParagraph.createRun();
// runSectionDescriptionText.setText(section.getDescription()); runSectionDescriptionText.setText(section.getDescription());
// runSectionDescriptionText.setColor("116a78"); runSectionDescriptionText.setColor("116a78");
//wordBuilder.addParagraphContent("Section Fields", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0); wordBuilder.addParagraphContent("Section Fields", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0);
section.getFields().sort(Comparator.comparingInt(FieldModel::getOrdinal)); section.getFields().sort(Comparator.comparingInt(FieldModel::getOrdinal));
for (FieldModel field : section.getFields()) { for(FieldModel field: section.getFields()){
if (field.getCategory() == FieldCategory.SYSTEM) { if(field.getCategory() == FieldCategory.SYSTEM){
SystemField systemField = field.toSystemField(); SystemField systemField = field.toSystemField();
if (systemField.getType() == SystemFieldType.LANGUAGE) continue;
XWPFParagraph systemFieldParagraph = document.createParagraph(); XWPFParagraph systemFieldParagraph = document.createParagraph();
// systemFieldParagraph.setSpacingBetween(1.0); systemFieldParagraph.setSpacingBetween(1.0);
XWPFRun runSyStemFieldTitle = systemFieldParagraph.createRun(); XWPFRun runSyStemFieldTitle = systemFieldParagraph.createRun();
runSyStemFieldTitle.setText(systemField.getLabel() + ": "); runSyStemFieldTitle.setText("Title: ");
runSyStemFieldTitle.setColor("000000"); runSyStemFieldTitle.setColor("000000");
// XWPFRun runSystemFieldTitleText = systemFieldParagraph.createRun(); XWPFRun runSystemFieldTitleText = systemFieldParagraph.createRun();
// runSystemFieldTitleText.setText(systemField.getLabel()); runSystemFieldTitleText.setText(systemField.getLabel());
// runSystemFieldTitleText.setColor("116a78"); runSystemFieldTitleText.setColor("116a78");
// if(systemField.getDescription() != null && !systemField.getDescription().isEmpty()){ if(systemField.getDescription() != null && !systemField.getDescription().isEmpty()){
// XWPFParagraph systemFieldDescription = document.createParagraph(); XWPFParagraph systemFieldDescription = document.createParagraph();
// systemFieldDescription.setSpacingBetween(1.0); systemFieldDescription.setSpacingBetween(1.0);
// XWPFRun runSyStemFieldDescription = systemFieldDescription.createRun(); XWPFRun runSyStemFieldDescription = systemFieldDescription.createRun();
// runSyStemFieldDescription.setText("Description: "); runSyStemFieldDescription.setText("Description: ");
// runSyStemFieldDescription.setColor("000000"); runSyStemFieldDescription.setColor("000000");
// XWPFRun runSystemFieldDescriptionText = systemFieldDescription.createRun(); XWPFRun runSystemFieldDescriptionText = systemFieldDescription.createRun();
// runSystemFieldDescriptionText.setText(systemField.getDescription()); runSystemFieldDescriptionText.setText(systemField.getDescription());
// runSystemFieldDescriptionText.setColor("116a78"); runSystemFieldDescriptionText.setColor("116a78");
// } }
// XWPFParagraph systemFieldInput = document.createParagraph(); XWPFParagraph systemFieldInput = document.createParagraph();
// systemFieldInput.setSpacingBetween(1.0); systemFieldInput.setSpacingBetween(1.0);
// XWPFRun runInput = systemFieldInput.createRun(); XWPFRun runInput = systemFieldInput.createRun();
// runInput.setText("Input: "); runInput.setText("Input: ");
// runInput.setColor("000000"); runInput.setColor("000000");
switch (systemField.getType()) { switch (systemField.getType()) {
case TEXT: case TEXT:
XWPFRun runTitle = systemFieldParagraph.createRun(); XWPFRun runTitle = systemFieldInput.createRun();
runTitle.setText(dmpEntity.getLabel()); runTitle.setText(dmpEntity.getLabel());
runTitle.setColor("116a78"); runTitle.setColor("116a78");
break; break;
case HTML_TEXT: case HTML_TEXT:
wordBuilder.addParagraphContent(dmpEntity.getDescription(), document, ParagraphStyle.HTML, BigInteger.ZERO, 0); XWPFRun runDescription = systemFieldInput.createRun();
runDescription.setText(dmpEntity.getDescription());
runDescription.setColor("116a78");
break; break;
case RESEARCHERS: case RESEARCHERS:
for (Researcher researcher : dmpEntity.getResearchers()) { for(Researcher researcher: dmpEntity.getResearchers()){
XWPFRun runResearcher = systemFieldParagraph.createRun(); XWPFRun runResearcher = systemFieldInput.createRun();
runResearcher.addBreak(); runResearcher.setText("" + researcher.getLabel());
runResearcher.setText(researcher.getLabel());
runResearcher.setColor("116a78"); runResearcher.setColor("116a78");
} }
break; break;
case ORGANIZATIONS: case ORGANIZATIONS:
for (Organisation organisation : dmpEntity.getOrganisations()) { for(Organisation organisation: dmpEntity.getOrganisations()){
XWPFRun runOrganisation = systemFieldParagraph.createRun(); XWPFRun runOrganisation = systemFieldInput.createRun();
runOrganisation.addBreak(); runOrganisation.setText("" + organisation.getLabel());
runOrganisation.setText(organisation.getLabel());
runOrganisation.setColor("116a78"); runOrganisation.setColor("116a78");
} }
break; break;
// case LANGUAGE: case LANGUAGE:
// XWPFRun runLanguage = systemFieldParagraph.createRun(); XWPFRun runLanguage = systemFieldInput.createRun();
// runLanguage.setText(objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class).get("language").toString()); runLanguage.setText(objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class).get("language").toString());
// runLanguage.setColor("116a78"); runLanguage.setColor("116a78");
// break; break;
case CONTACT: case CONTACT:
XWPFRun runContact = systemFieldParagraph.createRun(); XWPFRun runContact = systemFieldInput.createRun();
runContact.setText(dmpEntity.getCreator() == null ? "" : dmpEntity.getCreator().getName()); runContact.setText(dmpEntity.getCreator().getName());
runContact.setColor("116a78"); runContact.setColor("116a78");
break; break;
case FUNDER: case FUNDER:
if (dmpEntity.getGrant() != null && dmpEntity.getGrant().getFunder() != null) { if (dmpEntity.getGrant() != null && dmpEntity.getGrant().getFunder() != null) {
XWPFRun runFunder = systemFieldParagraph.createRun(); XWPFRun runFunder = systemFieldInput.createRun();
runFunder.setText(dmpEntity.getGrant().getFunder().getLabel()); runFunder.setText(dmpEntity.getGrant().getFunder().getLabel());
runFunder.setColor("116a78"); runFunder.setColor("116a78");
} }
break; break;
case GRANT: case GRANT:
if (dmpEntity.getGrant() != null) { if (dmpEntity.getGrant() != null) {
XWPFRun runGrant = systemFieldParagraph.createRun(); XWPFRun runGrant = systemFieldInput.createRun();
runGrant.setText(dmpEntity.getGrant().getLabel()); runGrant.setText(dmpEntity.getGrant().getLabel());
runGrant.setColor("116a78"); runGrant.setColor("116a78");
} }
break; break;
case PROJECT: case PROJECT:
if (dmpEntity.getProject() != null) { if (dmpEntity.getProject() != null ) {
XWPFRun runProject = systemFieldParagraph.createRun(); XWPFRun runProject = systemFieldInput.createRun();
runProject.setText(dmpEntity.getProject().getLabel()); runProject.setText(dmpEntity.getProject().getLabel());
runProject.setColor("116a78"); runProject.setColor("116a78");
} }
@ -1476,137 +1464,114 @@ public class DataManagementPlanManager {
case LICENSE: case LICENSE:
Map extraProperties = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class); Map extraProperties = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class);
if (extraProperties.containsKey("license")) { if (extraProperties.containsKey("license")) {
Map<String, String> license = ((Map<String, String>) extraProperties.get("license")); XWPFRun runLicense = systemFieldInput.createRun();
if (license != null && !StringUtils.isEmpty(license.get("pid"))) { runLicense.setText(extraProperties.get("license").toString());
XWPFRun runLicense = systemFieldParagraph.createRun(); runLicense.setColor("116a78");
runLicense.setText(license.get("pid").toString());
runLicense.setColor("116a78");
}
} }
break; break;
case ACCESS_RIGHTS: case ACCESS_RIGHTS:
Map extraPropertiesMap = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class); Map extraPropertiesMap = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class);
if (extraPropertiesMap.containsKey("visible")) { if (extraPropertiesMap.containsKey("visible")) {
XWPFRun runAccessRights = systemFieldParagraph.createRun(); XWPFRun runAccessRights = systemFieldInput.createRun();
runAccessRights.setText(Boolean.valueOf(extraPropertiesMap.get("visible").toString()) ? "Public" : "Restricted"); runAccessRights.setText(extraPropertiesMap.get("visible").toString());
runAccessRights.setColor("116a78"); runAccessRights.setColor("116a78");
} }
break; break;
} }
//document.createParagraph(); document.createParagraph();
} else if (field.getCategory() == FieldCategory.EXTRA) { }
else if(field.getCategory() == FieldCategory.EXTRA){
Map dmpProperties = objectMapper.readValue(dmpEntity.getProperties(), HashMap.class);
if (dmpProperties != null && (!dmpProperties.containsKey(field.getId().toString()) || StringUtils.isEmpty((String) dmpProperties.get(field.getId().toString()))))
continue;
ExtraField extraField = field.toExtraField(); ExtraField extraField = field.toExtraField();
XWPFParagraph extraFieldParagraph = document.createParagraph(); XWPFParagraph extraFieldParagraph = document.createParagraph();
extraFieldParagraph.setSpacingBetween(1.0); extraFieldParagraph.setSpacingBetween(1.0);
XWPFRun runExtraFieldLabel = extraFieldParagraph.createRun(); XWPFRun runExtraFieldLabel = extraFieldParagraph.createRun();
runExtraFieldLabel.setText(extraField.getLabel() + ": "); runExtraFieldLabel.setText(extraField.getLabel());
runExtraFieldLabel.setColor("000000"); runExtraFieldLabel.setColor("116a78");
// if(extraField.getDescription() != null && !extraField.getDescription().isEmpty()){ if(extraField.getDescription() != null && !extraField.getDescription().isEmpty()){
// XWPFRun runExtraFieldDescription = extraFieldParagraph.createRun(); XWPFRun runExtraFieldDescription = extraFieldParagraph.createRun();
// runExtraFieldDescription.setText(extraField.getDescription()); runExtraFieldDescription.setText(extraField.getDescription());
// runExtraFieldDescription.setColor("116a78"); runExtraFieldDescription.setColor("116a78");
// }
XWPFRun runExtraFieldInput = extraFieldParagraph.createRun();
switch (extraField.getType()) {
case TEXT:
runExtraFieldInput.setText((String) dmpProperties.get(field.getId().toString()));
runExtraFieldInput.setColor("116a78");
break;
case RICH_TEXT:
wordBuilder.addParagraphContent(dmpProperties.get(field.getId().toString()), document, ParagraphStyle.HTML, BigInteger.ZERO, 0);
// runExtraFieldInput.setText((String) dmpProperties.get(field.getId().toString()));
// runExtraFieldInput.setColor("116a78");
break;
case DATE:
runExtraFieldInput.setText((String) dmpProperties.get(field.getId().toString()));
runExtraFieldInput.setColor("116a78");
break;
case NUMBER:
runExtraFieldInput.setText((String) dmpProperties.get(field.getId().toString()));
runExtraFieldInput.setColor("116a78");
break;
} }
XWPFRun runExtraFieldInput = extraFieldParagraph.createRun();
Map dmpProperties = objectMapper.readValue(dmpEntity.getProperties(), HashMap.class);
if (dmpProperties.containsKey(field.getId()) && dmpProperties.get(field.getId()) != null) {
runExtraFieldInput.setText((String) dmpProperties.get(field.getId()));
}
runExtraFieldInput.setColor("116a78");
} }
} }
//if(!section.getDescriptionTemplates().isEmpty()){ if(!section.getDescriptionTemplates().isEmpty()){
final Boolean isFinalized = dmpEntity.getStatus() == DMP.DMPStatus.FINALISED.getValue(); wordBuilder.addParagraphContent("Section descriptions", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0);
final Boolean isPublic = dmpEntity.isPublic(); wordBuilder.addParagraphContent("Description Templates", document, ParagraphStyle.HEADER4, BigInteger.ZERO, 0);
List<Dataset> datasets = dmpEntity.getDataset().stream() for(eu.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.DescriptionTemplate descriptionTemplate: section.getDescriptionTemplates()){
.filter(item -> item.getStatus() != Dataset.Status.CANCELED.getValue()) XWPFParagraph templateParagraph = document.createParagraph();
.filter(item -> item.getStatus() != Dataset.Status.DELETED.getValue()) XWPFRun runTemplateLabel = templateParagraph.createRun();
.filter(item -> !isPublic && !isFinalized || item.getStatus() == Dataset.Status.FINALISED.getValue()) runTemplateLabel.setText("" + descriptionTemplate.getLabel());
.filter(item -> item.getDmpSectionIndex().equals(section.getOrdinal() - 1)) runTemplateLabel.setColor("116a78");
.sorted(Comparator.comparing(Dataset::getCreated)).collect(Collectors.toList());
if (datasets.size() > 0)
wordBuilder.addParagraphContent("Descriptions", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0);
for (Dataset datasetEntity : datasets) {
Map<String, Object> properties = new HashMap<>();
if (datasetEntity.getProperties() != null) {
//ObjectMapper objectMapper = new ObjectMapper();
try {
properties = objectMapper.readValue(datasetEntity.getProperties(), LinkedHashMap.class);
} catch (IOException e) {
logger.error(e.getLocalizedMessage(), e);
}
/*JSONObject jObject = new JSONObject(datasetEntity.getProperties());
properties = jObject.toMap();*/
} }
final Boolean isFinalized = dmpEntity.getStatus() == DMP.DMPStatus.FINALISED.getValue();
// Dataset Description custom style. final Boolean isPublic = dmpEntity.isPublic();
XWPFParagraph datasetDescriptionParagraph = document.createParagraph(); dmpEntity.getDataset().stream()
datasetDescriptionParagraph.setStyle("Heading4"); .filter(item -> item.getStatus() != Dataset.Status.CANCELED.getValue())
datasetDescriptionParagraph.setSpacingBetween(1.5); .filter(item -> item.getStatus() != Dataset.Status.DELETED.getValue())
XWPFRun datasetDescriptionRun = datasetDescriptionParagraph.createRun(); .filter(item -> !isPublic && !isFinalized || item.getStatus() == Dataset.Status.FINALISED.getValue())
datasetDescriptionRun.setText(datasetEntity.getLabel()); .filter(item -> item.getDmpSectionIndex().equals(section.getOrdinal() - 1))
//datasetDescriptionRun.setColor("2E75B6"); .sorted(Comparator.comparing(Dataset::getCreated))
//datasetDescriptionRun.setBold(true); .forEach(datasetEntity -> {
datasetDescriptionRun.setFontSize(15); Map<String, Object> properties = new HashMap<>();
if (datasetEntity.getProperties() != null) {
//ObjectMapper objectMapper = new ObjectMapper();
try {
properties = objectMapper.readValue(datasetEntity.getProperties(), LinkedHashMap.class);
} catch (IOException e) {
logger.error(e.getLocalizedMessage(), e);
}
/*JSONObject jObject = new JSONObject(datasetEntity.getProperties());
properties = jObject.toMap();*/
}
// Custom style for the Dataset title. // Dataset Description custom style.
//wordBuilder.addParagraphContent("Title: " + datasetEntity.getLabel(), document, ParagraphStyle.HEADER1, BigInteger.ZERO); XWPFParagraph datasetDescriptionParagraph = document.createParagraph();
// XWPFParagraph datasetLabelParagraph = document.createParagraph(); datasetDescriptionParagraph.setStyle("Heading4");
//// datasetLabelParagraph.setStyle("Heading2"); datasetDescriptionParagraph.setSpacingBetween(1.5);
// datasetLabelParagraph.setSpacingBetween(1.0); XWPFRun datasetDescriptionRun = datasetDescriptionParagraph.createRun();
// XWPFRun runDatasetTitle1 = datasetLabelParagraph.createRun(); datasetDescriptionRun.setText("Dataset Description");
// runDatasetTitle1.setText("Title: "); //datasetDescriptionRun.setColor("2E75B6");
// runDatasetTitle1.setColor("000000"); //datasetDescriptionRun.setBold(true);
// //runDatasetTitle1.setBold(true); datasetDescriptionRun.setFontSize(15);
// //runDatasetTitle1.setFontSize(12);
// XWPFRun runDatasetTitle = datasetLabelParagraph.createRun();
// runDatasetTitle.setText(datasetEntity.getLabel());
// runDatasetTitle.setColor("116a78");
//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(); // Custom style for the Dataset title.
//wordBuilder.addParagraphContent("Title: " + datasetEntity.getLabel(), document, ParagraphStyle.HEADER1, BigInteger.ZERO);
XWPFParagraph datasetLabelParagraph = document.createParagraph();
// datasetLabelParagraph.setStyle("Heading2");
datasetLabelParagraph.setSpacingBetween(1.0);
XWPFRun runDatasetTitle1 = datasetLabelParagraph.createRun();
runDatasetTitle1.setText("Title: ");
runDatasetTitle1.setColor("000000");
//runDatasetTitle1.setBold(true);
//runDatasetTitle1.setFontSize(12);
XWPFRun runDatasetTitle = datasetLabelParagraph.createRun();
runDatasetTitle.setText(datasetEntity.getLabel());
runDatasetTitle.setColor("116a78");
//runDatasetTitle.setBold(true);
//runDatasetTitle.setFontSize(12);
XWPFParagraph datasetTemplateParagraph = document.createParagraph();
// datasetTemplateParagraph.setStyle("Heading3"); // datasetTemplateParagraph.setStyle("Heading3");
XWPFRun runDatasetTemplate1 = datasetTemplateParagraph.createRun(); XWPFRun runDatasetTemplate1 = datasetTemplateParagraph.createRun();
runDatasetTemplate1.setText("Template: "); runDatasetTemplate1.setText("Template: ");
runDatasetTemplate1.setColor("000000"); runDatasetTemplate1.setColor("000000");
//runDatasetTemplate1.setBold(true); //runDatasetTemplate1.setBold(true);
//runDatasetTemplate1.setFontSize(12); //runDatasetTemplate1.setFontSize(12);
XWPFRun runDatasetTemplate = datasetTemplateParagraph.createRun(); XWPFRun runDatasetTemplate = datasetTemplateParagraph.createRun();
runDatasetTemplate.setText(datasetEntity.getProfile().getLabel()); runDatasetTemplate.setText(datasetEntity.getProfile().getLabel());
runDatasetTemplate.setColor("116a78"); runDatasetTemplate.setColor("116a78");
//runDatasetTemplate.setBold(true); //runDatasetTemplate.setBold(true);
//runDatasetTemplate.setFontSize(12); //runDatasetTemplate.setFontSize(12);
// /*XWPFParagraph externalReferencesParagraph = document.createParagraph(); // /*XWPFParagraph externalReferencesParagraph = document.createParagraph();
// externalReferencesParagraph.setStyle("Heading3"); // externalReferencesParagraph.setStyle("Heading3");
@ -1644,30 +1609,30 @@ public class DataManagementPlanManager {
// //
// //
XWPFParagraph datasetDescParagraph = document.createParagraph(); XWPFParagraph datasetDescParagraph = document.createParagraph();
XWPFRun runDatasetDescription1 = datasetDescParagraph.createRun(); XWPFRun runDatasetDescription1 = datasetDescParagraph.createRun();
runDatasetDescription1.setText("Type: "); runDatasetDescription1.setText("Description: ");
runDatasetDescription1.setColor("000000"); runDatasetDescription1.setColor("000000");
XWPFRun runDatasetDescription = datasetDescParagraph.createRun(); XWPFRun runDatasetDescription = datasetDescParagraph.createRun();
runDatasetDescription.setText(datasetEntity.getProfile().getType().getName()); runDatasetDescription.setText(datasetEntity.getProfile().getLabel());
runDatasetDescription.setColor("116a78"); runDatasetDescription.setColor("116a78");
//wordBuilder.addParagraphContent(datasetEntity.getDescription(), document, ParagraphStyle.HTML, BigInteger.ZERO, 0); //wordBuilder.addParagraphContent(datasetEntity.getDescription(), document, ParagraphStyle.HTML, BigInteger.ZERO, 0);
document.createParagraph(); document.createParagraph();
PagedDatasetProfile pagedDatasetProfile = datasetManager.getPagedProfile(dataset, datasetEntity); PagedDatasetProfile pagedDatasetProfile = datasetManager.getPagedProfile(dataset, datasetEntity);
visibilityRuleService.setProperties(properties); visibilityRuleService.setProperties(properties);
visibilityRuleService.buildVisibilityContext(pagedDatasetProfile.getRules()); visibilityRuleService.buildVisibilityContext(pagedDatasetProfile.getRules());
try { try {
wordBuilder.build(document, pagedDatasetProfile, visibilityRuleService); wordBuilder.build(document, pagedDatasetProfile, visibilityRuleService);
} catch (IOException e) { } catch (IOException e) {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
} }
// Page break at the end of the Dataset. // Page break at the end of the Dataset.
XWPFParagraph parBreakDataset = document.createParagraph(); XWPFParagraph parBreakDataset = document.createParagraph();
parBreakDataset.setPageBreak(true); parBreakDataset.setPageBreak(true);
});
} }
//}
} }
// // Removes the top empty headings. // // Removes the top empty headings.
@ -1807,7 +1772,7 @@ public class DataManagementPlanManager {
// Funder. // Funder.
Element funder = xmlDoc.createElement("funder"); Element funder = xmlDoc.createElement("funder");
if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.GRANT, principal) && this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.FUNDER, principal) && dmp.getGrant() != null) { if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.GRANT, principal) && this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.FUNDER, principal)) {
Element funderLabel = xmlDoc.createElement("label"); Element funderLabel = xmlDoc.createElement("label");
Element funderId = xmlDoc.createElement("id"); Element funderId = xmlDoc.createElement("id");
funderLabel.setTextContent(dmp.getGrant().getFunder().getLabel()); funderLabel.setTextContent(dmp.getGrant().getFunder().getLabel());
@ -1825,7 +1790,7 @@ public class DataManagementPlanManager {
dmpElement.appendChild(funder); dmpElement.appendChild(funder);
// Grant. // Grant.
Element grant = xmlDoc.createElement("grant"); Element grant = xmlDoc.createElement("grant");
if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.GRANT, principal) && dmp.getGrant() != null) { if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.GRANT, principal)) {
Element grantLabel = xmlDoc.createElement("label"); Element grantLabel = xmlDoc.createElement("label");
Element grantId = xmlDoc.createElement("id"); Element grantId = xmlDoc.createElement("id");
grantLabel.setTextContent(dmp.getGrant().getLabel()); grantLabel.setTextContent(dmp.getGrant().getLabel());
@ -1843,7 +1808,7 @@ public class DataManagementPlanManager {
dmpElement.appendChild(grant); dmpElement.appendChild(grant);
// Project. // Project.
Element project = xmlDoc.createElement("project"); Element project = xmlDoc.createElement("project");
if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.PROJECT, principal) && dmp.getProject() != null) { if (this.dataManagementProfileManager.fieldInBlueprint(dmp.getProfile(), SystemFieldType.PROJECT, principal)) {
Element projectId = xmlDoc.createElement("id"); Element projectId = xmlDoc.createElement("id");
Element projectLabel = xmlDoc.createElement("label"); Element projectLabel = xmlDoc.createElement("label");
Element projectDescription = xmlDoc.createElement("description"); Element projectDescription = xmlDoc.createElement("description");
@ -2085,14 +2050,16 @@ public class DataManagementPlanManager {
DataManagementPlanEditorModel dm = new DataManagementPlanEditorModel(); DataManagementPlanEditorModel dm = new DataManagementPlanEditorModel();
DmpProfileImportModel dmpProfileImportModel = dataManagementPlans.get(0).getDmpProfile(); DmpProfileImportModel dmpProfileImportModel = dataManagementPlans.get(0).getDmpProfile();
UUID profileId = null; Tuple<UUID, String> tupleProfile = new Tuple<>();
if (dmpProfileImportModel != null) { if (dmpProfileImportModel != null) {
profileId = dmpProfileImportModel.getDmpProfileId(); tupleProfile.setId(dmpProfileImportModel.getDmpProfileId());
tupleProfile.setLabel(dmpProfileImportModel.getDmpProfileName());
} }
else { else {
profileId = UUID.fromString("86635178-36a6-484f-9057-a934e4eeecd5"); tupleProfile.setId(UUID.fromString("86635178-36a6-484f-9057-a934e4eeecd5"));
tupleProfile.setLabel("Dmp Default Blueprint");
} }
dm.setProfile(profileId); dm.setProfile(tupleProfile);
Map<String, Object> dmpPropertiesMap = new HashMap<>(); Map<String, Object> dmpPropertiesMap = new HashMap<>();
@ -2286,11 +2253,6 @@ public class DataManagementPlanManager {
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList())); dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
this.updateIndex(dmp); this.updateIndex(dmp);
} }
for(DMPDatasetProfile dmpDatasetProfile : dmp.getAssociatedDmps()){
dmpDatasetProfile.setDmp(dmp);
apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().createOrUpdate(dmpDatasetProfile);
}
dmp.getDataset().forEach(dataset -> { dmp.getDataset().forEach(dataset -> {
dataset.setStatus(Dataset.Status.SAVED.getValue()); dataset.setStatus(Dataset.Status.SAVED.getValue());
dataset.setCreated(new Date()); dataset.setCreated(new Date());

View File

@ -135,17 +135,6 @@ public class DataManagementProfileManager {
return false; return false;
} }
public List<Integer> sectionIndexesForDescriptionTemplate(DMPProfile dmpProfile, UUID descriptionTemplateId) {
DataManagementPlanBlueprintListingModel dmpBlueprint = new DataManagementPlanBlueprintListingModel();
dmpBlueprint.fromDataModel(dmpProfile);
List<Integer> sectionIndexes = new ArrayList<>();
for(int i = 0; i < dmpBlueprint.getDefinition().getSections().size(); i++) {
Section section = dmpBlueprint.getDefinition().getSections().get(i);
if(section.getHasTemplates() && section.getDescriptionTemplates().stream().anyMatch(x -> x.getDescriptionTemplateId().equals(descriptionTemplateId))) sectionIndexes.add(i);
}
return sectionIndexes;
}
public List<DataManagementPlanProfileListingModel> getWithCriteria(DataManagementPlanProfileCriteriaRequest dataManagementPlanProfileCriteriaRequest) throws IllegalAccessException, InstantiationException { public List<DataManagementPlanProfileListingModel> getWithCriteria(DataManagementPlanProfileCriteriaRequest dataManagementPlanProfileCriteriaRequest) throws IllegalAccessException, InstantiationException {
QueryableList<DMPProfile> items = databaseRepository.getDmpProfileDao().getWithCriteria(dataManagementPlanProfileCriteriaRequest.getCriteria()); QueryableList<DMPProfile> items = databaseRepository.getDmpProfileDao().getWithCriteria(dataManagementPlanProfileCriteriaRequest.getCriteria());
List<DataManagementPlanProfileListingModel> datamanagementPlans = items.select(item -> new DataManagementPlanProfileListingModel().fromDataModel(item)); List<DataManagementPlanProfileListingModel> datamanagementPlans = items.select(item -> new DataManagementPlanProfileListingModel().fromDataModel(item));

View File

@ -1,5 +1,7 @@
package eu.eudat.logic.managers; package eu.eudat.logic.managers;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria; import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.entities.DescriptionTemplate; import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.UserDatasetProfile; import eu.eudat.data.entities.UserDatasetProfile;
@ -8,21 +10,17 @@ import eu.eudat.data.query.items.item.datasetprofile.DatasetProfileAutocompleteR
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem; import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
import eu.eudat.exceptions.datasetprofile.DatasetProfileNewVersionException; import eu.eudat.exceptions.datasetprofile.DatasetProfileNewVersionException;
import eu.eudat.logic.builders.model.models.DataTableDataBuilder; import eu.eudat.logic.builders.model.models.DataTableDataBuilder;
import eu.eudat.logic.proxy.config.*; import eu.eudat.logic.proxy.config.Semantic;
import eu.eudat.logic.proxy.config.configloaders.ConfigLoader; import eu.eudat.logic.proxy.config.configloaders.ConfigLoader;
import eu.eudat.logic.proxy.config.entities.GeneralUrls;
import eu.eudat.logic.proxy.fetching.RemoteFetcher;
import eu.eudat.logic.services.ApiContext; import eu.eudat.logic.services.ApiContext;
import eu.eudat.logic.services.operations.DatabaseRepository; import eu.eudat.logic.services.operations.DatabaseRepository;
import eu.eudat.logic.utilities.builders.XmlBuilder; import eu.eudat.logic.utilities.builders.XmlBuilder;
import eu.eudat.logic.utilities.documents.helpers.FileEnvelope; import eu.eudat.logic.utilities.documents.helpers.FileEnvelope;
import eu.eudat.logic.utilities.documents.xml.datasetProfileXml.ExportXmlBuilderDatasetProfile; import eu.eudat.logic.utilities.documents.xml.datasetProfileXml.ExportXmlBuilderDatasetProfile;
import eu.eudat.logic.utilities.documents.xml.datasetProfileXml.ImportXmlBuilderDatasetProfile; import eu.eudat.logic.utilities.documents.xml.datasetProfileXml.ImportXmlBuilderDatasetProfile;
import eu.eudat.models.data.admin.composite.DatasetProfile;
import eu.eudat.models.data.components.commons.datafield.AutoCompleteData; import eu.eudat.models.data.components.commons.datafield.AutoCompleteData;
import eu.eudat.models.data.datasetprofile.DatasetProfileAutocompleteItem; import eu.eudat.models.data.datasetprofile.DatasetProfileAutocompleteItem;
import eu.eudat.models.data.datasetprofile.DatasetProfileListingModel; import eu.eudat.models.data.datasetprofile.DatasetProfileListingModel;
import eu.eudat.models.data.datasetprofile.DatasetProfileWithPrefillingPropertyModel;
import eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field; import eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field;
import eu.eudat.models.data.externaldataset.ExternalAutocompleteFieldModel; import eu.eudat.models.data.externaldataset.ExternalAutocompleteFieldModel;
import eu.eudat.models.data.helpers.common.DataTableData; import eu.eudat.models.data.helpers.common.DataTableData;
@ -36,11 +34,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders; import org.springframework.http.*;
import org.springframework.http.HttpStatus; import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
@ -57,8 +54,6 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.*; import javax.xml.xpath.*;
import java.io.*; import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -69,20 +64,20 @@ public class DatasetProfileManager {
private static final Logger logger = LoggerFactory.getLogger(DatasetProfileManager.class); private static final Logger logger = LoggerFactory.getLogger(DatasetProfileManager.class);
private static final List<String> cache = new ArrayList<>(); private static final List<String> cache = new ArrayList<>();
private final ApiContext apiContext; private ApiContext apiContext;
private final DatabaseRepository databaseRepository; private DatabaseRepository databaseRepository;
private final Environment environment; private Environment environment;
private final ConfigLoader configLoader; private ConfigLoader configLoader;
private final MetricsManager metricsManager; private final MetricsManager metricsManager;
private final RemoteFetcher remoteFetcher;
@Autowired @Autowired
public DatasetProfileManager(ApiContext apiContext, Environment environment, ConfigLoader configLoader, MetricsManager metricsManager, RemoteFetcher remoteFetcher) { public DatasetProfileManager(ApiContext apiContext, Environment environment, ConfigLoader configLoader, MetricsManager metricsManager) {
this.apiContext = apiContext; this.apiContext = apiContext;
this.databaseRepository = apiContext.getOperationsContext().getDatabaseRepository(); this.databaseRepository = apiContext.getOperationsContext().getDatabaseRepository();
this.environment = environment; this.environment = environment;
this.configLoader = configLoader; this.configLoader = configLoader;
this.metricsManager = metricsManager; this.metricsManager = metricsManager;
this.remoteFetcher = remoteFetcher;
} }
@Transactional @Transactional
@ -134,21 +129,6 @@ public class DatasetProfileManager {
return datasetProfiles; return datasetProfiles;
} }
public List<DatasetProfileWithPrefillingPropertyModel> getAllWithPrefilling(DatasetProfileTableRequestItem tableRequestItem) {
List<DatasetProfileWithPrefillingPropertyModel> datasetProfiles = new ArrayList<>();
if (!tableRequestItem.getCriteria().getIds().isEmpty()) {
tableRequestItem.getCriteria().getIds().forEach(id -> {
DatasetProfile datasetProfile = this.getDatasetProfile(id.toString());
DatasetProfileWithPrefillingPropertyModel profileModel = new DatasetProfileWithPrefillingPropertyModel();
profileModel.setId(id);
profileModel.setLabel(datasetProfile.getLabel());
profileModel.setEnablePrefilling(datasetProfile.isEnablePrefilling());
datasetProfiles.add(profileModel);
});
}
return datasetProfiles;
}
public eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field queryForField(String xml, String fieldId) throws XPathExpressionException { public eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field queryForField(String xml, String fieldId) throws XPathExpressionException {
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field field = new Field(); eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field field = new Field();
Document document = XmlBuilder.fromXml(xml); Document document = XmlBuilder.fromXml(xml);
@ -161,10 +141,10 @@ public class DatasetProfileManager {
return field; return field;
} }
public List<ExternalAutocompleteFieldModel> getAutocomplete(AutoCompleteData data, String like) { public static List<ExternalAutocompleteFieldModel> getAutocomplete(AutoCompleteData data, String like) {
/*List<ExternalAutocompleteFieldModel> result = new LinkedList<>(); List<ExternalAutocompleteFieldModel> result = new LinkedList<>();
SimpleClientHttpRequestFactory simpleFactory = new SimpleClientHttpRequestFactory(); SimpleClientHttpRequestFactory simpleFactory = new SimpleClientHttpRequestFactory();
RestTemplate restTemplate = new RestTemplate(simpleFactory); RestTemplate restTemplate = new RestTemplate(simpleFactory);
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
DocumentContext jsonContext = null; DocumentContext jsonContext = null;
@ -183,7 +163,7 @@ public class DatasetProfileManager {
if (url.contains("zenodo")) { if (url.contains("zenodo")) {
url = url.replace("?", "/?"); url = url.replace("?", "/?");
} }
url = url.replace("{like}", like.equals("") ? "*" : like); url = url.replace("{like}", like.equals("") ? "*" : like);
url = url.replace("%20", " "); url = url.replace("%20", " ");
url = url.replace("%22", "\""); url = url.replace("%22", "\"");
@ -199,7 +179,7 @@ public class DatasetProfileManager {
headers.setContentType(MediaType.APPLICATION_JSON); headers.setContentType(MediaType.APPLICATION_JSON);
entity = new HttpEntity<>("parameters", headers); entity = new HttpEntity<>("parameters", headers);
response = restTemplate.exchange(url, HttpMethod.GET, entity, Object.class); response = restTemplate.exchange(url, HttpMethod.GET, entity, Object.class);
jsonContext = JsonPath.parse(response.getBody()); jsonContext = JsonPath.parse(response.getBody());
jsonItems = jsonContext.read(singleData.getOptionsRoot() + "['" + singleData.getAutoCompleteOptions().getLabel() + "','" + singleData.getAutoCompleteOptions().getValue() + "','" + singleData.getAutoCompleteOptions().getSource() + "','" + "uri" + "']"); jsonItems = jsonContext.read(singleData.getOptionsRoot() + "['" + singleData.getAutoCompleteOptions().getLabel() + "','" + singleData.getAutoCompleteOptions().getValue() + "','" + singleData.getAutoCompleteOptions().getSource() + "','" + "uri" + "']");
@ -225,72 +205,8 @@ public class DatasetProfileManager {
} }
return result.stream().sorted(Comparator.comparing(ExternalAutocompleteFieldModel::getLabel)).collect(Collectors.toList()); return result.stream().sorted(Comparator.comparing(ExternalAutocompleteFieldModel::getLabel)).collect(Collectors.toList());
*/
List<ExternalAutocompleteFieldModel> result = new LinkedList<>(); //return result;
ExternalUrlCriteria urlCriteria = new ExternalUrlCriteria();
GeneralUrls genericUrls = new GeneralUrls();
int ordinal = 1;
List<Map<String, String>> rawResults = new ArrayList<>();
genericUrls.setFetchMode(FetchStrategy.FIRST);
urlCriteria.setLike(like);
for (AutoCompleteData.AutoCompleteSingleData singleData : data.getAutoCompleteSingleDataList()) {
UrlConfiguration urlConfiguration = new UrlConfiguration();
try {
URI uri;
if (singleData.getUrl().contains("?")) {
uri = new URI(singleData.getUrl().substring(0, singleData.getUrl().lastIndexOf("?")));
} else {
uri = new URI(singleData.getUrl());
}
String source = singleData.getAutoCompleteOptions().getSource();
source = source != null && !source.isEmpty() ? source : uri.getHost();
String uriString = singleData.getAutoCompleteOptions().getUri();
uriString = uriString != null && !uriString.isEmpty() ? uriString : "uri";
String parsedUrl = singleData.getUrl();
parsedUrl = parsedUrl.replace("%20", " ");
parsedUrl = parsedUrl.replace("%22", "\"");
while (parsedUrl.contains("&amp;")) {
parsedUrl = parsedUrl.replace("&amp;", "&");
}
urlConfiguration.setUrl(parsedUrl);
urlConfiguration.setOrdinal(ordinal);
urlConfiguration.setType("External");
urlConfiguration.setContentType(MediaType.APPLICATION_JSON_VALUE);
urlConfiguration.setFirstpage("1");
urlConfiguration.setRequestType(singleData.getMethod() != null ? singleData.getMethod() : "GET");
DataUrlConfiguration dataUrlConfiguration = new DataUrlConfiguration();
dataUrlConfiguration.setPath(singleData.getOptionsRoot());
DataFieldsUrlConfiguration fieldsUrlConfiguration = new DataFieldsUrlConfiguration();
fieldsUrlConfiguration.setId(singleData.getAutoCompleteOptions().getValue());
fieldsUrlConfiguration.setName(singleData.getAutoCompleteOptions().getLabel());
fieldsUrlConfiguration.setSource(singleData.getAutoCompleteOptions().getSource().isEmpty()? null : singleData.getAutoCompleteOptions().getSource());
fieldsUrlConfiguration.setUri(uriString);
dataUrlConfiguration.setFieldsUrlConfiguration(fieldsUrlConfiguration);
urlConfiguration.setKey(source);
urlConfiguration.setLabel(source);
urlConfiguration.setData(dataUrlConfiguration);
if (singleData.getHasAuth()) {
AuthenticationConfiguration authenticationConfiguration = new AuthenticationConfiguration();
authenticationConfiguration.setAuthUrl(singleData.getAuth().getUrl());
authenticationConfiguration.setAuthMethod(singleData.getAuth().getMethod());
authenticationConfiguration.setAuthTokenPath(singleData.getAuth().getPath());
authenticationConfiguration.setAuthRequestBody(singleData.getAuth().getBody());
authenticationConfiguration.setType(singleData.getAuth().getType());
urlConfiguration.setAuth(authenticationConfiguration);
}
genericUrls.getUrls().add(urlConfiguration);
List<Map<String, String>> singleResults = this.remoteFetcher.getExternalGeneric(urlCriteria, genericUrls);
if (!singleResults.isEmpty() && !singleResults.get(0).containsKey("source") && !singleData.getAutoCompleteOptions().getSource().isEmpty()) {
singleResults.forEach(singleResult -> singleResult.put("source", singleData.getAutoCompleteOptions().getSource()));
}
rawResults.addAll(singleResults);
genericUrls.getUrls().clear();
} catch (URISyntaxException e) {
logger.error(e.getMessage(), e);
}
}
rawResults.forEach(item -> result.add(new ExternalAutocompleteFieldModel(parseItem(item.get("pid")), parseItem(item.get("name")), parseItem(item.get("source")), parseItem(item.get("uri")))));
return result;
} }
private static String parseItem(Object item) { private static String parseItem(Object item) {

View File

@ -140,7 +140,6 @@ public class GrantManager {
grants.add(grant); grants.add(grant);
} }
grants = grants.stream().filter(grant -> grant.getLabel() != null).collect(Collectors.toList());
grants.sort(Comparator.comparing(Grant::getLabel)); grants.sort(Comparator.comparing(Grant::getLabel));
grants = grants.stream().filter(listHelper.distinctByKey(Grant::getLabel)).collect(Collectors.toList()); grants = grants.stream().filter(listHelper.distinctByKey(Grant::getLabel)).collect(Collectors.toList());
return grants; return grants;

View File

@ -27,13 +27,11 @@ public class PrefillingManager {
private final ObjectMapper objectMapper; private final ObjectMapper objectMapper;
private final DatasetManager datasetManager; private final DatasetManager datasetManager;
private final LicenseManager licenseManager; private final LicenseManager licenseManager;
private final PrefillingMapper prefillingMapper;
@Autowired @Autowired
public PrefillingManager(ApiContext apiContext, ConfigLoader configLoader, DatasetManager datasetManager, LicenseManager licenseManager, PrefillingMapper prefillingMapper) { public PrefillingManager(ApiContext apiContext, ConfigLoader configLoader, DatasetManager datasetManager, LicenseManager licenseManager) {
this.apiContext = apiContext; this.apiContext = apiContext;
this.configLoader = configLoader; this.configLoader = configLoader;
this.prefillingMapper = prefillingMapper;
this.objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); this.objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
this.datasetManager = datasetManager; this.datasetManager = datasetManager;
this.licenseManager = licenseManager; this.licenseManager = licenseManager;
@ -64,14 +62,14 @@ public class PrefillingManager {
PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet(); PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet();
Map<String, Object> prefillingEntity = getSingle(prefillingGet.getUrl(), prefillId); Map<String, Object> prefillingEntity = getSingle(prefillingGet.getUrl(), prefillId);
DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId); DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId);
return prefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), descriptionTemplate, datasetManager, licenseManager); return PrefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), descriptionTemplate, datasetManager, licenseManager);
} }
public DatasetWizardModel getPrefilledDatasetUsingData(Map<String, Object> data, String configId, UUID profileId) throws Exception { public DatasetWizardModel getPrefilledDatasetUsingData(Map<String, Object> data, String configId, UUID profileId) throws Exception {
PrefillingConfig prefillingConfig = configLoader.getExternalUrls().getPrefillings().get(configId); PrefillingConfig prefillingConfig = configLoader.getExternalUrls().getPrefillings().get(configId);
PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet(); PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet();
DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId); DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId);
return prefillingMapper.mapPrefilledEntityToDatasetWizard(data, prefillingGet, prefillingConfig.getType(), descriptionTemplate, datasetManager, licenseManager); return PrefillingMapper.mapPrefilledEntityToDatasetWizard(data, prefillingGet, prefillingConfig.getType(), descriptionTemplate, datasetManager, licenseManager);
} }
private Map<String, Object> getSingle(String url, String id) { private Map<String, Object> getSingle(String url, String id) {

View File

@ -27,8 +27,6 @@ import eu.eudat.models.data.license.LicenseModel;
import org.json.JSONObject; import org.json.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
@ -37,18 +35,11 @@ import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component
public class PrefillingMapper { public class PrefillingMapper {
private static final Logger logger = LoggerFactory.getLogger(PrefillingMapper.class); private static final Logger logger = LoggerFactory.getLogger(PrefillingMapper.class);
private static final ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); private static final ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
private final DatasetProfileManager datasetProfileManager;
@Autowired public static DatasetWizardModel mapPrefilledEntityToDatasetWizard(Map<String, Object> prefilledEntity, PrefillingGet prefillingGet, String type,
public PrefillingMapper(DatasetProfileManager datasetProfileManager) {
this.datasetProfileManager = datasetProfileManager;
}
public DatasetWizardModel mapPrefilledEntityToDatasetWizard(Map<String, Object> prefilledEntity, PrefillingGet prefillingGet, String type,
DescriptionTemplate profile, DatasetManager datasetManager, LicenseManager licenseManager) throws Exception { DescriptionTemplate profile, DatasetManager datasetManager, LicenseManager licenseManager) throws Exception {
DatasetWizardModel datasetWizardModel = new DatasetWizardModel(); DatasetWizardModel datasetWizardModel = new DatasetWizardModel();
datasetWizardModel.setProfile(new DatasetProfileOverviewModel().fromDataModel(profile)); datasetWizardModel.setProfile(new DatasetProfileOverviewModel().fromDataModel(profile));
@ -86,7 +77,7 @@ public class PrefillingMapper {
return datasetWizardModel; return datasetWizardModel;
} }
private void setValue(PrefillingMapping prefillingMapping, String value, DatasetWizardModel datasetWizardModel, JsonNode parentNode, Map<String, Object> properties, String type, LicenseManager licenseManager) throws InvocationTargetException, IllegalAccessException, JsonProcessingException { private static void setValue(PrefillingMapping prefillingMapping, String value, DatasetWizardModel datasetWizardModel, JsonNode parentNode, Map<String, Object> properties, String type, LicenseManager licenseManager) throws InvocationTargetException, IllegalAccessException, JsonProcessingException {
String trimRegex = prefillingMapping.getTrimRegex() != null ? prefillingMapping.getTrimRegex() : ""; String trimRegex = prefillingMapping.getTrimRegex() != null ? prefillingMapping.getTrimRegex() : "";
if (!value.startsWith("\"") && !value.startsWith("[") && !value.equals("null")) { if (!value.startsWith("\"") && !value.startsWith("[") && !value.equals("null")) {
value = "\"" + value + "\""; value = "\"" + value + "\"";
@ -225,7 +216,7 @@ public class PrefillingMapper {
} }
} }
private Object parseComboBoxValues(JsonNode node, List<String> parsedValues) throws JsonProcessingException { private static Object parseComboBoxValues(JsonNode node, List<String> parsedValues) throws JsonProcessingException {
List<Object> normalizedValues = new ArrayList<>(); List<Object> normalizedValues = new ArrayList<>();
boolean isMultiSelect; boolean isMultiSelect;
String type = node.isArray() ? node.get(0).get("data").get("type").asText() : node.get("data").get("type").asText(); String type = node.isArray() ? node.get(0).get("data").get("type").asText() : node.get("data").get("type").asText();
@ -236,7 +227,7 @@ public class PrefillingMapper {
for (String format : parsedValues) { for (String format : parsedValues) {
List<ExternalAutocompleteFieldModel> result = new ArrayList<>(); List<ExternalAutocompleteFieldModel> result = new ArrayList<>();
try { try {
result = datasetProfileManager.getAutocomplete(autoCompleteData, format); result = DatasetProfileManager.getAutocomplete(autoCompleteData, format);
} }
catch (Exception e) { catch (Exception e) {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);

View File

@ -1,23 +0,0 @@
package eu.eudat.logic.proxy.config;
public enum AuthType {
;
private final String name;
AuthType(String name) {
this.name = name;
}
public String getName() {
return name;
}
public static AuthType fromName(String name) {
for (AuthType authType : AuthType.values()) {
if (authType.getName().equals(name)) {
return authType;
}
}
throw new IllegalArgumentException("AuthType [" + name + "] is not supported");
}
}

View File

@ -1,57 +0,0 @@
package eu.eudat.logic.proxy.config;
import javax.xml.bind.annotation.XmlElement;
public class AuthenticationConfiguration {
private String authUrl;
private String authMethod = "GET";
private String authTokenPath;
private String authRequestBody;
private String type;
public String getAuthUrl() {
return authUrl;
}
@XmlElement(name = "authUrl")
public void setAuthUrl(String authUrl) {
this.authUrl = authUrl;
}
public String getAuthMethod() {
return authMethod;
}
@XmlElement(name = "authUrlMethod")
public void setAuthMethod(String authMethod) {
this.authMethod = authMethod;
}
public String getAuthTokenPath() {
return authTokenPath;
}
@XmlElement(name = "authTokenJpath")
public void setAuthTokenPath(String authTokenPath) {
this.authTokenPath = authTokenPath;
}
public String getAuthRequestBody() {
return authRequestBody;
}
@XmlElement(name = "authUrlBody")
public void setAuthRequestBody(String authRequestBody) {
this.authRequestBody = authRequestBody;
}
public String getType() {
return type;
}
@XmlElement(name = "authType")
public void setType(String type) {
this.type = type;
}
}

View File

@ -21,7 +21,6 @@ public class UrlConfiguration {
private String requestType = "GET"; private String requestType = "GET";
private String requestBody = ""; private String requestBody = "";
private String filterType = "remote"; private String filterType = "remote";
private AuthenticationConfiguration auth;
private List<QueryConfig> queries; private List<QueryConfig> queries;
@ -144,13 +143,4 @@ public class UrlConfiguration {
public void setQueries(List<QueryConfig> queries) { public void setQueries(List<QueryConfig> queries) {
this.queries = queries; this.queries = queries;
} }
public AuthenticationConfiguration getAuth() {
return auth;
}
@XmlElement(name="authentication")
public void setAuth(AuthenticationConfiguration auth) {
this.auth = auth;
}
} }

View File

@ -1,31 +0,0 @@
package eu.eudat.logic.proxy.config.entities;
import eu.eudat.logic.proxy.config.FetchStrategy;
import eu.eudat.logic.proxy.config.UrlConfiguration;
import java.util.ArrayList;
import java.util.List;
public class GeneralUrls extends GenericUrls{
List<UrlConfiguration> urls;
FetchStrategy fetchMode;
public GeneralUrls() {
this.urls = new ArrayList<>();
}
@Override
public List<UrlConfiguration> getUrls() {
return urls;
}
@Override
public FetchStrategy getFetchMode() {
return fetchMode;
}
public void setFetchMode(FetchStrategy fetchMode) {
this.fetchMode = fetchMode;
}
}

View File

@ -15,14 +15,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.*; import org.springframework.http.*;
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.netty.http.client.HttpClient;
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller; import javax.xml.bind.Unmarshaller;
@ -38,16 +33,10 @@ public class RemoteFetcher {
private static final Logger logger = LoggerFactory.getLogger(RemoteFetcher.class); private static final Logger logger = LoggerFactory.getLogger(RemoteFetcher.class);
private ConfigLoader configLoader; private ConfigLoader configLoader;
private final WebClient client;
@Autowired @Autowired
public RemoteFetcher(ConfigLoader configLoader) { public RemoteFetcher(ConfigLoader configLoader) {
this.configLoader = configLoader; this.configLoader = configLoader;
this.client = WebClient.builder().codecs(clientCodecConfigurer -> {
clientCodecConfigurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder(new ObjectMapper(), MediaType.APPLICATION_JSON));
clientCodecConfigurer.defaultCodecs().maxInMemorySize(2 * ((int) Math.pow(1024, 3))); //GK: Why here???
}
).clientConnector(new ReactorClientHttpConnector(HttpClient.create().followRedirect(true))).build();
} }
@Cacheable(value = "repositories", keyGenerator = "externalUrlsKeyGenerator") @Cacheable(value = "repositories", keyGenerator = "externalUrlsKeyGenerator")
@ -209,11 +198,7 @@ public class RemoteFetcher {
ifFunderQueryExist(urlConfiguration, externalUrlCriteria); ifFunderQueryExist(urlConfiguration, externalUrlCriteria);
if (urlConfiguration.getType() == null || urlConfiguration.getType().equals("External")) { if (urlConfiguration.getType() == null || urlConfiguration.getType().equals("External")) {
try { try {
String auth = null; results.addAll(getAllResultsFromUrl(urlConfiguration.getUrl(), fetchStrategy, urlConfiguration.getData(), urlConfiguration.getPaginationPath(), externalUrlCriteria, urlConfiguration.getLabel(), urlConfiguration.getKey(), urlConfiguration.getContentType(), urlConfiguration.getFirstpage(), urlConfiguration.getRequestBody(), urlConfiguration.getRequestType(), urlConfiguration.getFilterType(), urlConfiguration.getQueries()));
if (urlConfiguration.getAuth() != null) {
auth = this.getAuthentication(urlConfiguration.getAuth());
}
results.addAll(getAllResultsFromUrl(urlConfiguration.getUrl(), fetchStrategy, urlConfiguration.getData(), urlConfiguration.getPaginationPath(), externalUrlCriteria, urlConfiguration.getLabel(), urlConfiguration.getKey(), urlConfiguration.getContentType(), urlConfiguration.getFirstpage(), urlConfiguration.getRequestBody(), urlConfiguration.getRequestType(), urlConfiguration.getFilterType(), urlConfiguration.getQueries(), auth));
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getLocalizedMessage(), e); logger.error(e.getLocalizedMessage(), e);
} }
@ -232,19 +217,6 @@ public class RemoteFetcher {
return results; return results;
} }
private String getAuthentication(AuthenticationConfiguration authenticationConfiguration) {
HttpMethod method = HttpMethod.valueOf(authenticationConfiguration.getAuthMethod());
Map<String, Object> reponse = this.client.method(method).uri(authenticationConfiguration.getAuthUrl())
.contentType(MediaType.APPLICATION_JSON)
.bodyValue(this.parseBodyString(authenticationConfiguration.getAuthRequestBody()))
.exchangeToMono(mono -> mono.bodyToMono(new ParameterizedTypeReference<Map<String, Object>>() {
})).block();
return authenticationConfiguration.getType() + " " + reponse.get(authenticationConfiguration.getAuthTokenPath());
}
private List<Map<String, Object>> getAllWithData(List<UrlConfiguration> urlConfigs, ExternalUrlCriteria externalUrlCriteria) { private List<Map<String, Object>> getAllWithData(List<UrlConfiguration> urlConfigs, ExternalUrlCriteria externalUrlCriteria) {
List<Map<String, Object>> results = new LinkedList<>(); List<Map<String, Object>> results = new LinkedList<>();
@ -301,7 +273,7 @@ public class RemoteFetcher {
protected String replaceCriteriaOnUrl(String path, ExternalUrlCriteria externalUrlCriteria, String firstPage, List<QueryConfig> queries) { protected String replaceCriteriaOnUrl(String path, ExternalUrlCriteria externalUrlCriteria, String firstPage, List<QueryConfig> queries) {
String completedPath = path; String completedPath = path;
if (externalUrlCriteria.getLike() != null) { if (externalUrlCriteria.getLike() != null) {
if ((path.contains("openaire") || path.contains("orcid") || path.contains("ror") || path.contains("fairsharing")) && externalUrlCriteria.getLike().equals("")) { if ((path.contains("openaire") || path.contains("orcid") || path.contains("ror")) && externalUrlCriteria.getLike().equals("")) {
completedPath = completedPath.replaceAll("\\{like}", "*"); completedPath = completedPath.replaceAll("\\{like}", "*");
completedPath = completedPath.replaceAll("\\{query}", "*"); completedPath = completedPath.replaceAll("\\{query}", "*");
} else { } else {
@ -357,13 +329,13 @@ public class RemoteFetcher {
return completedPath; return completedPath;
} }
private List<Map<String, String>> getAllResultsFromUrl(String path, FetchStrategy fetchStrategy, final DataUrlConfiguration jsonDataPath, final String jsonPaginationPath, ExternalUrlCriteria externalUrlCriteria, String tag, String key, String contentType, String firstPage, String requestBody, String requestType, String filterType, List<QueryConfig> queries, String auth) throws Exception { private List<Map<String, String>> getAllResultsFromUrl(String path, FetchStrategy fetchStrategy, final DataUrlConfiguration jsonDataPath, final String jsonPaginationPath, ExternalUrlCriteria externalUrlCriteria, String tag, String key, String contentType, String firstPage, String requestBody, String requestType, String filterType, List<QueryConfig> queries) throws Exception {
Set<Integer> pages = new HashSet<>(); Set<Integer> pages = new HashSet<>();
String replacedPath = replaceCriteriaOnUrl(path, externalUrlCriteria, firstPage, queries); String replacedPath = replaceCriteriaOnUrl(path, externalUrlCriteria, firstPage, queries);
String replacedBody = replaceCriteriaOnUrl(requestBody, externalUrlCriteria, firstPage, queries); String replacedBody = replaceCriteriaOnUrl(requestBody, externalUrlCriteria, firstPage, queries);
Results results = getResultsFromUrl(replacedPath, jsonDataPath, jsonPaginationPath, contentType, replacedBody, requestType, auth); Results results = getResultsFromUrl(replacedPath, jsonDataPath, jsonPaginationPath, contentType, replacedBody, requestType);
if(results != null) { if(results != null) {
if (filterType != null && filterType.equals("local") && (externalUrlCriteria.getLike() != null && !externalUrlCriteria.getLike().isEmpty())) { if (filterType != null && filterType.equals("local") && (externalUrlCriteria.getLike() != null && !externalUrlCriteria.getLike().isEmpty())) {
results.setResults(results.getResults().stream() results.setResults(results.getResults().stream()
@ -382,7 +354,7 @@ public class RemoteFetcher {
throw new HugeResultSet("The submitted search query " + externalUrlCriteria.getLike() + " is about to return " + results.getPagination().get("count") + " results... Please submit a more detailed search query"); throw new HugeResultSet("The submitted search query " + externalUrlCriteria.getLike() + " is about to return " + results.getPagination().get("count") + " results... Please submit a more detailed search query");
Optional<Results> optionalResults = pages.parallelStream() Optional<Results> optionalResults = pages.parallelStream()
.map(page -> getResultsFromUrl(path + "&page=" + page, jsonDataPath, jsonPaginationPath, contentType, replacedBody, requestType, auth)) .map(page -> getResultsFromUrl(path + "&page=" + page, jsonDataPath, jsonPaginationPath, contentType, replacedBody, requestType))
.filter(Objects::nonNull) .filter(Objects::nonNull)
.reduce((result1, result2) -> { .reduce((result1, result2) -> {
result1.getResults().addAll(result2.getResults()); result1.getResults().addAll(result2.getResults());
@ -415,7 +387,7 @@ public class RemoteFetcher {
JsonNode jsonBody = new ObjectMapper().readTree(replacedBody); JsonNode jsonBody = new ObjectMapper().readTree(replacedBody);
entity = new HttpEntity<>(jsonBody, headers); entity = new HttpEntity<>(jsonBody, headers);
response = restTemplate.exchange(replacedPath, HttpMethod.valueOf(requestType), entity, String.class); response = restTemplate.exchange(replacedPath, HttpMethod.resolve(requestType), entity, String.class);
if (response.getStatusCode() == HttpStatus.OK) { if (response.getStatusCode() == HttpStatus.OK) {
if (response.getHeaders().get("Content-Type").get(0).contains("json")) { if (response.getHeaders().get("Content-Type").get(0).contains("json")) {
DocumentContext jsonContext = JsonPath.parse(response.getBody()); DocumentContext jsonContext = JsonPath.parse(response.getBody());
@ -431,12 +403,12 @@ public class RemoteFetcher {
} }
protected Results getResultsFromUrl(String urlString, DataUrlConfiguration jsonDataPath, String jsonPaginationPath, String contentType, String requestBody, String requestType, String auth) { protected Results getResultsFromUrl(String urlString, DataUrlConfiguration jsonDataPath, String jsonPaginationPath, String contentType, String requestBody, String requestType) {
try { try {
//RestTemplate restTemplate = new RestTemplate(new SimpleClientHttpRequestFactory()); RestTemplate restTemplate = new RestTemplate();
//HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
//HttpEntity<JsonNode> entity; HttpEntity<JsonNode> entity;
ResponseEntity<String> response; ResponseEntity<String> response;
/* /*
* URL url = new URL(urlString.replaceAll(" ", "%20")); * URL url = new URL(urlString.replaceAll(" ", "%20"));
@ -444,27 +416,14 @@ public class RemoteFetcher {
* HttpURLConnection con = (HttpURLConnection) url.openConnection(); * HttpURLConnection con = (HttpURLConnection) url.openConnection();
* con.setRequestMethod("GET"); * con.setRequestMethod("GET");
*/ */
/* if (contentType != null && !contentType.isEmpty()) { if (contentType != null && !contentType.isEmpty()) {
headers.setAccept(Collections.singletonList(MediaType.valueOf(contentType))); headers.setAccept(Collections.singletonList(MediaType.valueOf(contentType)));
headers.setContentType(MediaType.valueOf(contentType)); headers.setContentType(MediaType.valueOf(contentType));
} }
if (auth != null) {
headers.set("Authorization", auth);
}*/
JsonNode jsonBody = new ObjectMapper().readTree(requestBody); JsonNode jsonBody = new ObjectMapper().readTree(requestBody);
// entity = new HttpEntity<>(jsonBody, headers); entity = new HttpEntity<>(jsonBody, headers);
response = restTemplate.exchange(urlString, HttpMethod.resolve(requestType), entity, String.class);
response = this.client.method(HttpMethod.valueOf(requestType)).uri(urlString).headers(httpHeaders -> {
if (contentType != null && !contentType.isEmpty()) {
httpHeaders.setAccept(Collections.singletonList(MediaType.valueOf(contentType)));
httpHeaders.setContentType(MediaType.valueOf(contentType));
}
if (auth != null) {
httpHeaders.set("Authorization", auth);
}
}).bodyValue(jsonBody).retrieve().toEntity(String.class).block();
//response = restTemplate.exchange(urlString, HttpMethod.resolve(requestType), entity, String.class);
if (response.getStatusCode() == HttpStatus.OK) { // success if (response.getStatusCode() == HttpStatus.OK) { // success
//do here all the parsing //do here all the parsing
Results results = new Results(); Results results = new Results();
@ -472,7 +431,7 @@ public class RemoteFetcher {
DocumentContext jsonContext = JsonPath.parse(response.getBody()); DocumentContext jsonContext = JsonPath.parse(response.getBody());
if (jsonDataPath.getFieldsUrlConfiguration().getPath() != null) { if (jsonDataPath.getFieldsUrlConfiguration().getPath() != null) {
results = RemoteFetcherUtils.getFromJsonWithRecursiveFetching(jsonContext, jsonDataPath, this, requestBody, requestType, auth); results = RemoteFetcherUtils.getFromJsonWithRecursiveFetching(jsonContext, jsonDataPath, this, requestBody, requestType);
} else if (jsonDataPath.getFieldsUrlConfiguration().getFirstName() != null) { } else if (jsonDataPath.getFieldsUrlConfiguration().getFirstName() != null) {
results = RemoteFetcherUtils.getFromJsonWithFirstAndLastName(jsonContext, jsonDataPath); results = RemoteFetcherUtils.getFromJsonWithFirstAndLastName(jsonContext, jsonDataPath);
} else { } else {
@ -594,18 +553,8 @@ public class RemoteFetcher {
return null; return null;
} }
private String parseBodyString(String bodyString) {
String finalBodyString = bodyString;
if (bodyString.contains("{env:")) {
int index = bodyString.indexOf("{env: ");
while (index >= 0) {
int endIndex = bodyString.indexOf("}", index + 6);
String envName = bodyString.substring(index + 6, endIndex);
finalBodyString = finalBodyString.replace("{env: " + envName + "}", System.getenv(envName));
index = bodyString.indexOf("{env: ", index + 6);
}
}
return finalBodyString;
}
} }

View File

@ -28,7 +28,7 @@ public class RemoteFetcherUtils {
new HashMap<>(1, 1)); new HashMap<>(1, 1));
} }
public static Results getFromJsonWithRecursiveFetching(DocumentContext jsonContext, DataUrlConfiguration jsonDataPath, RemoteFetcher remoteFetcher, String requestBody, String requestType, String auth) { public static Results getFromJsonWithRecursiveFetching(DocumentContext jsonContext, DataUrlConfiguration jsonDataPath, RemoteFetcher remoteFetcher, String requestBody, String requestType) {
Results results = new Results(parseData(jsonContext, jsonDataPath), Results results = new Results(parseData(jsonContext, jsonDataPath),
new HashMap<>(1, 1)); new HashMap<>(1, 1));
@ -37,7 +37,7 @@ public class RemoteFetcherUtils {
externalUrlCriteria.setPath(result.get("path")); externalUrlCriteria.setPath(result.get("path"));
externalUrlCriteria.setHost(result.get("host")); externalUrlCriteria.setHost(result.get("host"));
String replacedPath = remoteFetcher.replaceCriteriaOnUrl(jsonDataPath.getUrlConfiguration().getUrl(), externalUrlCriteria, jsonDataPath.getUrlConfiguration().getFirstpage(), jsonDataPath.getUrlConfiguration().getQueries()); String replacedPath = remoteFetcher.replaceCriteriaOnUrl(jsonDataPath.getUrlConfiguration().getUrl(), externalUrlCriteria, jsonDataPath.getUrlConfiguration().getFirstpage(), jsonDataPath.getUrlConfiguration().getQueries());
return remoteFetcher.getResultsFromUrl(replacedPath, jsonDataPath.getUrlConfiguration().getData(), jsonDataPath.getUrlConfiguration().getData().getPath(), jsonDataPath.getUrlConfiguration().getContentType(), requestBody, requestType, auth); return remoteFetcher.getResultsFromUrl(replacedPath, jsonDataPath.getUrlConfiguration().getData(), jsonDataPath.getUrlConfiguration().getData().getPath(), jsonDataPath.getUrlConfiguration().getContentType(), requestBody, requestType);
}).filter(Objects::nonNull).map(results1 -> results1.getResults().get(0)).collect(Collectors.toList()); }).filter(Objects::nonNull).map(results1 -> results1.getResults().get(0)).collect(Collectors.toList());
return new Results(multiResults, new HashMap<>(1, 1)); return new Results(multiResults, new HashMap<>(1, 1));
} }
@ -98,22 +98,8 @@ public class RemoteFetcherUtils {
} }
} else { } else {
value = value.replace("'", ""); value = value.replace("'", "");
if (value.contains(".")) { if (stringObjectMap.containsKey(value)) {
String[] parts = value.split("\\."); parsedData.get(parsedData.size() - 1).put(field.getName().equals("types") ? "tags" : value, normalizeValue(stringObjectMap.get(value), (field.getName().equals("types") || field.getName().equals("uri"))));
Map<String, Object> tempMap = stringObjectMap;
for (int i = 0; i < parts.length; i++) {
if (tempMap.containsKey(parts[i])) {
if (i + 1 < parts.length) {
tempMap = (Map<String, Object>) tempMap.get(parts[i]);
} else {
parsedData.get(parsedData.size() - 1).put(field.getName().equals("types") ? "tags" : value, normalizeValue(tempMap.get(parts[i]), (field.getName().equals("types") || field.getName().equals("uri"))));
}
}
}
} else {
if (stringObjectMap.containsKey(value)) {
parsedData.get(parsedData.size() - 1).put(field.getName().equals("types") ? "tags" : value, normalizeValue(stringObjectMap.get(value), (field.getName().equals("types") || field.getName().equals("uri"))));
}
} }
} }
} }
@ -149,8 +135,7 @@ public class RemoteFetcherUtils {
} }
} }
} else if (value instanceof Map) { } else if (value instanceof Map) {
String key = ((Map<String, String>)value).containsKey("$") ? "$" : "content"; return ((Map<String, String>)value).get("content");
return ((Map<String, String>)value).get(key);
} }
return value != null ? value.toString() : null; return value != null ? value.toString() : null;
} }

View File

@ -24,7 +24,6 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.util.Units; import org.apache.poi.util.Units;
import org.apache.poi.xwpf.usermodel.*; import org.apache.poi.xwpf.usermodel.*;
import org.apache.xmlbeans.XmlCursor; import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
@ -1020,44 +1019,60 @@ public class WordBuilder {
int descrParPos = -1; int descrParPos = -1;
XWPFParagraph descrPar = null; XWPFParagraph descrPar = null;
for(XWPFParagraph p: document.getParagraphs()){ for(XWPFParagraph p: document.getParagraphs()){
List<XWPFRun> runs = p.getRuns();
if( dmpEntity != null) { if(runs != null){
this.replaceTextSegment(p, "'{ARGOS.DMP.TITLE}'", dmpEntity.getLabel()); for(XWPFRun r : runs){
this.replaceTextSegment(p, "'{ARGOS.DMP.VERSION}'", "Version " + dmpEntity.getVersion()); String text = r.getText(0);
} if(text != null){
if( datasetEntity != null) { if(text.contains("{ARGOS.DMP.TITLE}")) {
this.replaceTextSegment(p, "'{ARGOS.DATASET.TITLE}'", datasetEntity.getLabel()); text = text.replace("{ARGOS.DMP.TITLE}", dmpEntity.getLabel());
} r.setText(text, 0);
} else if(text.contains("{ARGOS.DMP.VERSION}")) {
String researchersNames = ""; text = text.replace("{ARGOS.DMP.VERSION}", "Version " + dmpEntity.getVersion());
Set<Researcher> researchers = dmpEntity.getResearchers(); r.setText(text, 0);
int i = 0; } else if(datasetEntity != null && text.contains("{ARGOS.DATASET.TITLE}")) {
for(Researcher researcher : researchers){ text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel());
i++; r.setText(text, 0);
researchersNames += researcher.getLabel() + (i < researchers.size() ? ", " : ""); // } else if(text.equals("Description") && ((!isDataset && (dmpEntity == null || dmpEntity.getDescription() != null)) || (isDataset && (datasetEntity == null || datasetEntity.getDescription() == null)))) {
} // r.setText("", 0);
this.replaceTextSegment(p, "'{ARGOS.DMP.RESEARCHERS}'", researchersNames, 15); } else if((dmpEntity != null && text.contains("{ARGOS.DMP.DESCRIPTION}") && !isDataset) || (datasetEntity != null && text.contains("{ARGOS.DATASET.DESCRIPTION}") && isDataset)) {
descrParPos = parPos;
String organisationsNames = ""; descrPar = p;
Set<Organisation> organisations = dmpEntity.getOrganisations(); if(dmpEntity != null && !isDataset) {
i = 0; text = text.replace("{ARGOS.DMP.DESCRIPTION}", "");
for(Organisation organisation : organisations){ } else if(datasetEntity != null && isDataset) {
i++; text = text.replace("{ARGOS.DATASET.DESCRIPTION}", "");
organisationsNames += organisation.getLabel() + (i < organisations.size() ? ", " : ""); }
} r.setText(text, 0);
this.replaceTextSegment(p, "'{ARGOS.DMP.ORGANIZATIONS}'", organisationsNames, 15); } else if(text.equals("{ARGOS.DMP.RESEARCHERS}")) {
String researchersNames = "";
if(this.textSegmentExists(p,"'{ARGOS.DMP.DESCRIPTION}'")) { Set<Researcher> researchers = dmpEntity.getResearchers();
descrParPos = parPos; int i = 0;
descrPar = p; for(Researcher researcher : researchers){
this.replaceTextSegment(p, "'{ARGOS.DMP.DESCRIPTION}'", ""); i++;
} researchersNames += researcher.getLabel() + (i < researchers.size() ? ", " : "");
if(this.textSegmentExists(p,"'{ARGOS.DATASET.DESCRIPTION}'")) { }
descrParPos = parPos; text = text.replace("{ARGOS.DMP.RESEARCHERS}", researchersNames);
descrPar = p; r.setText(text, 0);
this.replaceTextSegment(p, "'{ARGOS.DATASET.DESCRIPTION}'", ""); r.setFontSize(17);
} else if(text.equals("{ARGOS.DMP.ORGANIZATIONS}")) {
String organisationsNames = "";
Set<Organisation> organisations = dmpEntity.getOrganisations();
int i = 0;
for(Organisation organisation : organisations){
i++;
organisationsNames += organisation.getLabel() + (i < organisations.size() ? ", " : "");
}
text = text.replace("{ARGOS.DMP.ORGANIZATIONS}", organisationsNames);
r.setText(text, 0);
r.setFontSize(17);
}
}
}
} }
parPos++;
} }
if((descrParPos != -1) && (dmpEntity!=null) && (dmpEntity.getDescription() != null) && !isDataset) { if((descrParPos != -1) && (dmpEntity!=null) && (dmpEntity.getDescription() != null) && !isDataset) {
XmlCursor cursor = descrPar.getCTP().newCursor(); XmlCursor cursor = descrPar.getCTP().newCursor();
cursor.toNextSibling(); cursor.toNextSibling();
@ -1081,7 +1096,7 @@ public class WordBuilder {
XWPFParagraph p = it.next().getCell(0).getParagraphs().get(0); XWPFParagraph p = it.next().getCell(0).getParagraphs().get(0);
XWPFRun run = p.createRun(); XWPFRun run = p.createRun();
run.setText(dmpEntity.getGrant().getFunder().getLabel()); run.setText(dmpEntity.getGrant().getFunder().getLabel());
run.setFontSize(15); run.setFontSize(17);
p.setAlignment(ParagraphAlignment.CENTER); p.setAlignment(ParagraphAlignment.CENTER);
} }
it = tbl.getRows().iterator(); it = tbl.getRows().iterator();
@ -1096,7 +1111,7 @@ public class WordBuilder {
text += parts.length > 1 ? "/ No "+parts[parts.length - 1] : ""; text += parts.length > 1 ? "/ No "+parts[parts.length - 1] : "";
} }
run.setText(text); run.setText(text);
run.setFontSize(15); run.setFontSize(17);
p.setAlignment(ParagraphAlignment.CENTER); p.setAlignment(ParagraphAlignment.CENTER);
} }
} }
@ -1104,165 +1119,43 @@ public class WordBuilder {
public void fillFooter(DMP dmpEntity, Dataset datasetEntity, XWPFDocument document, boolean isDataset) { public void fillFooter(DMP dmpEntity, Dataset datasetEntity, XWPFDocument document, boolean isDataset) {
document.getFooterList().forEach(xwpfFooter -> { document.getFooterList().forEach(xwpfFooter -> {
List<XWPFRun> runs = xwpfFooter.getParagraphs().get(0).getRuns(); List<XWPFRun> runs = xwpfFooter.getParagraphs().get(0).getRuns();
for(XWPFParagraph p : xwpfFooter.getParagraphs()){ if(runs != null){
if(p != null){ for(XWPFRun r : runs){
if( dmpEntity != null) { String text = r.getText(0);
this.replaceTextSegment(p, "'{ARGOS.DMP.TITLE}'", dmpEntity.getLabel()); if(text != null){
} if(text.contains("{ARGOS.DMP.TITLE}")){
if( datasetEntity != null) { text = text.replace("{ARGOS.DMP.TITLE}", dmpEntity.getLabel());
this.replaceTextSegment(p, "'{ARGOS.DATASET.TITLE}'", datasetEntity.getLabel()); r.setText(text, 0);
} }
Map<String, String> license = null; if(text.contains("{ARGOS.DATASET.TITLE}") && datasetEntity != null){
try { text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel());
license = ((Map<String, String>) mapper.readValue(dmpEntity.getExtraProperties(), Map.class).get("license")); r.setText(text, 0);
if (license != null && license.get("pid") != null) { }
this.replaceTextSegment(p, "'{ARGOS.DMP.LICENSE}'", license.get("pid")); if(text.contains("{ARGOS.DMP.LICENSE}")){
} else { try{
this.replaceTextSegment(p, "'{ARGOS.DMP.LICENSE}'", "License: -"); Map<String, String> license = ((Map<String, String>) mapper.readValue(dmpEntity.getExtraProperties(), Map.class).get("license"));
text = text.replace("{ARGOS.DMP.LICENSE}", license.get("pid"));
}
catch (JsonProcessingException | NullPointerException e){
text = text.replace("{ARGOS.DMP.LICENSE}", "License: -");
}
r.setText(text, 0);
}
if(text.contains("{ARGOS.DMP.DOI}")){
if(dmpEntity.getDois() != null && !dmpEntity.getDois().isEmpty())
text = text.replace("{ARGOS.DMP.DOI}", dmpEntity.getDois().iterator().next().getDoi());
else
text = text.replace("{ARGOS.DMP.DOI}", "-");
r.setText(text, 0);
}
if(text.contains("{ARGOS.DMP.LAST_MODIFIED}")){
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
text = text.replace("{ARGOS.DMP.LAST_MODIFIED}", formatter.format(dmpEntity.getModified()));
r.setText(text, 0);
} }
} catch (JsonProcessingException e) {
this.replaceTextSegment(p, "'{ARGOS.DMP.LICENSE}'", "License: -");
} }
if(dmpEntity.getDois() != null && !dmpEntity.getDois().isEmpty()) {
this.replaceTextSegment(p, "'{ARGOS.DMP.DOI}'", dmpEntity.getDois().iterator().next().getDoi());
} else {
this.replaceTextSegment(p, "'{ARGOS.DMP.DOI}'", "-");
}
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
this.replaceTextSegment(p, "'{ARGOS.DMP.LAST_MODIFIED}'", formatter.format(dmpEntity.getModified()));
} }
} }
}); });
} }
private boolean textSegmentExists(XWPFParagraph paragraph, String textToFind) {
TextSegment foundTextSegment = null;
PositionInParagraph startPos = new PositionInParagraph(0, 0, 0);
while((foundTextSegment = this.searchText(paragraph, textToFind, startPos)) != null) {
return true;
}
return false;
}
private void replaceTextSegment(XWPFParagraph paragraph, String textToFind, String replacement) {
this.replaceTextSegment(paragraph, textToFind, replacement, null);
}
private void replaceTextSegment(XWPFParagraph paragraph, String textToFind, String replacement, Integer fontSize) {
TextSegment foundTextSegment = null;
PositionInParagraph startPos = new PositionInParagraph(0, 0, 0);
while((foundTextSegment = this.searchText(paragraph, textToFind, startPos)) != null) { // search all text segments having text to find
System.out.println(foundTextSegment.getBeginRun()+":"+foundTextSegment.getBeginText()+":"+foundTextSegment.getBeginChar());
System.out.println(foundTextSegment.getEndRun()+":"+foundTextSegment.getEndText()+":"+foundTextSegment.getEndChar());
// maybe there is text before textToFind in begin run
XWPFRun beginRun = paragraph.getRuns().get(foundTextSegment.getBeginRun());
String textInBeginRun = beginRun.getText(foundTextSegment.getBeginText());
String textBefore = textInBeginRun.substring(0, foundTextSegment.getBeginChar()); // we only need the text before
// maybe there is text after textToFind in end run
XWPFRun endRun = paragraph.getRuns().get(foundTextSegment.getEndRun());
String textInEndRun = endRun.getText(foundTextSegment.getEndText());
String textAfter = textInEndRun.substring(foundTextSegment.getEndChar() + 1); // we only need the text after
if (foundTextSegment.getEndRun() == foundTextSegment.getBeginRun()) {
textInBeginRun = textBefore + replacement + textAfter; // if we have only one run, we need the text before, then the replacement, then the text after in that run
} else {
textInBeginRun = textBefore + replacement; // else we need the text before followed by the replacement in begin run
endRun.setText(textAfter, foundTextSegment.getEndText()); // and the text after in end run
}
beginRun.setText(textInBeginRun, foundTextSegment.getBeginText());
if (fontSize != null) {
beginRun.setFontSize(fontSize);
}
// runs between begin run and end run needs to be removed
for (int runBetween = foundTextSegment.getEndRun() - 1; runBetween > foundTextSegment.getBeginRun(); runBetween--) {
paragraph.removeRun(runBetween); // remove not needed runs
}
}
}
/**
* this methods parse the paragraph and search for the string searched.
* If it finds the string, it will return true and the position of the String
* will be saved in the parameter startPos.
*
* @param searched
* @param startPos
*/
private TextSegment searchText(XWPFParagraph paragraph, String searched, PositionInParagraph startPos) {
int startRun = startPos.getRun(),
startText = startPos.getText(),
startChar = startPos.getChar();
int beginRunPos = 0, candCharPos = 0;
boolean newList = false;
//CTR[] rArray = paragraph.getRArray(); //This does not contain all runs. It lacks hyperlink runs for ex.
java.util.List<XWPFRun> runs = paragraph.getRuns();
int beginTextPos = 0, beginCharPos = 0; //must be outside the for loop
//for (int runPos = startRun; runPos < rArray.length; runPos++) {
for (int runPos = startRun; runPos < runs.size(); runPos++) {
//int beginTextPos = 0, beginCharPos = 0, textPos = 0, charPos; //int beginTextPos = 0, beginCharPos = 0 must be outside the for loop
int textPos = 0, charPos;
//CTR ctRun = rArray[runPos];
CTR ctRun = runs.get(runPos).getCTR();
XmlCursor c = ctRun.newCursor();
c.selectPath("./*");
try {
while (c.toNextSelection()) {
XmlObject o = c.getObject();
if (o instanceof CTText) {
if (textPos >= startText) {
String candidate = ((CTText) o).getStringValue();
if (runPos == startRun) {
charPos = startChar;
} else {
charPos = 0;
}
for (; charPos < candidate.length(); charPos++) {
if ((candidate.charAt(charPos) == searched.charAt(0)) && (candCharPos == 0)) {
beginTextPos = textPos;
beginCharPos = charPos;
beginRunPos = runPos;
newList = true;
}
if (candidate.charAt(charPos) == searched.charAt(candCharPos)) {
if (candCharPos + 1 < searched.length()) {
candCharPos++;
} else if (newList) {
TextSegment segment = new TextSegment();
segment.setBeginRun(beginRunPos);
segment.setBeginText(beginTextPos);
segment.setBeginChar(beginCharPos);
segment.setEndRun(runPos);
segment.setEndText(textPos);
segment.setEndChar(charPos);
return segment;
}
} else {
candCharPos = 0;
}
}
}
textPos++;
} else if (o instanceof CTProofErr) {
c.removeXml();
} else if (o instanceof CTRPr) {
//do nothing
} else {
candCharPos = 0;
}
}
} finally {
c.dispose();
}
}
return null;
}
} }

View File

@ -37,7 +37,6 @@ public class ExportXmlBuilderDatasetProfile {
pages.setAttribute("description", datasetProfile.getDescription()); pages.setAttribute("description", datasetProfile.getDescription());
pages.setAttribute("language", datasetProfile.getLanguage()); pages.setAttribute("language", datasetProfile.getLanguage());
pages.setAttribute("type", datasetProfile.getType()); pages.setAttribute("type", datasetProfile.getType());
pages.setAttribute("enablePrefilling", String.valueOf(datasetProfile.isEnablePrefilling()));
String xml = XmlBuilder.generateXml(xmlDoc); String xml = XmlBuilder.generateXml(xmlDoc);
writer.write(xml); writer.write(xml);
writer.close(); writer.close();

View File

@ -15,7 +15,6 @@ public class DatasetProfile {
private String description; private String description;
private String language; private String language;
private String type; private String type;
private boolean enablePrefilling;
private List<Page> page; private List<Page> page;
@ -55,15 +54,6 @@ public class DatasetProfile {
this.type = type; this.type = type;
} }
@XmlAttribute(name = "enablePrefilling")
public boolean isEnablePrefilling() {
return enablePrefilling;
}
public void setEnablePrefilling(boolean enablePrefilling) {
this.enablePrefilling = enablePrefilling;
}
public eu.eudat.models.data.admin.composite.DatasetProfile toAdminCompositeModel(String label){ public eu.eudat.models.data.admin.composite.DatasetProfile toAdminCompositeModel(String label){
eu.eudat.models.data.admin.composite.DatasetProfile newDatasetEntityProfile = new eu.eudat.models.data.admin.composite.DatasetProfile(); eu.eudat.models.data.admin.composite.DatasetProfile newDatasetEntityProfile = new eu.eudat.models.data.admin.composite.DatasetProfile();
newDatasetEntityProfile.setLabel(label); newDatasetEntityProfile.setLabel(label);
@ -71,7 +61,6 @@ public class DatasetProfile {
newDatasetEntityProfile.setDescription(description); newDatasetEntityProfile.setDescription(description);
newDatasetEntityProfile.setLanguage(language); newDatasetEntityProfile.setLanguage(language);
newDatasetEntityProfile.setType(type); newDatasetEntityProfile.setType(type);
newDatasetEntityProfile.setEnablePrefilling(enablePrefilling);
List<eu.eudat.models.data.admin.components.datasetprofile.Page> pagesDatasetEntity = new LinkedList<>(); List<eu.eudat.models.data.admin.components.datasetprofile.Page> pagesDatasetEntity = new LinkedList<>();
List<eu.eudat.models.data.admin.components.datasetprofile.Section> sectionDatasetEntity = new LinkedList<>(); List<eu.eudat.models.data.admin.components.datasetprofile.Section> sectionDatasetEntity = new LinkedList<>();
for (Page xmlPage: page) { for (Page xmlPage: page) {

View File

@ -12,8 +12,8 @@ public class DescriptionTemplate {
private String id; private String id;
private String descriptionTemplateId; private String descriptionTemplateId;
private String label; private String label;
private Integer minMultiplicity; private int minMultiplicity;
private Integer maxMultiplicity; private int maxMultiplicity;
@XmlAttribute(name = "id") @XmlAttribute(name = "id")
public String getId() { public String getId() {
@ -43,20 +43,20 @@ public class DescriptionTemplate {
} }
@XmlAttribute(name = "minMultiplicity") @XmlAttribute(name = "minMultiplicity")
public Integer getMinMultiplicity() { public int getMinMultiplicity() {
return minMultiplicity; return minMultiplicity;
} }
public void setMinMultiplicity(Integer minMultiplicity) { public void setMinMultiplicity(int minMultiplicity) {
this.minMultiplicity = minMultiplicity; this.minMultiplicity = minMultiplicity;
} }
@XmlAttribute(name = "maxMultiplicity") @XmlAttribute(name = "maxMultiplicity")
public Integer getMaxMultiplicity() { public int getMaxMultiplicity() {
return maxMultiplicity; return maxMultiplicity;
} }
public void setMaxMultiplicity(Integer maxMultiplicity) { public void setMaxMultiplicity(int maxMultiplicity) {
this.maxMultiplicity = maxMultiplicity; this.maxMultiplicity = maxMultiplicity;
} }

View File

@ -14,7 +14,6 @@ public class DatasetProfile {
private String label; private String label;
private String description; private String description;
private String type; private String type;
private boolean enablePrefilling;
private List<Page> pages; private List<Page> pages;
private List<Section> sections; private List<Section> sections;
private Short status; private Short status;
@ -44,13 +43,6 @@ public class DatasetProfile {
this.type = type; this.type = type;
} }
public boolean isEnablePrefilling() {
return enablePrefilling;
}
public void setEnablePrefilling(boolean enablePrefilling) {
this.enablePrefilling = enablePrefilling;
}
public List<Page> getPages() { public List<Page> getPages() {
return pages; return pages;
} }
@ -88,7 +80,6 @@ public class DatasetProfile {
} }
public void buildProfile(eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewStyle) { public void buildProfile(eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewStyle) {
this.enablePrefilling = viewStyle.isEnablePrefilling();
this.sections = new ModelBuilder().fromViewStyleDefinition(viewStyle.getSections(), Section.class); this.sections = new ModelBuilder().fromViewStyleDefinition(viewStyle.getSections(), Section.class);
this.pages = new ModelBuilder().fromViewStyleDefinition(viewStyle.getPages(), Page.class); this.pages = new ModelBuilder().fromViewStyleDefinition(viewStyle.getPages(), Page.class);
} }
@ -98,7 +89,6 @@ public class DatasetProfile {
shortProfile.setLabel(this.label); shortProfile.setLabel(this.label);
shortProfile.setDescription(this.description); shortProfile.setDescription(this.description);
shortProfile.setType(this.type); shortProfile.setType(this.type);
shortProfile.setEnablePrefilling(this.enablePrefilling);
List<Section> shortSection = new LinkedList<>(); List<Section> shortSection = new LinkedList<>();
for (Section toshortSection : this.getSections()) { for (Section toshortSection : this.getSections()) {
shortSection.add(toshortSection.toShort()); shortSection.add(toshortSection.toShort());

View File

@ -10,62 +10,11 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class AutoCompleteData extends ComboBoxData<AutoCompleteData> { public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
public static class AuthAutoCompleteData {
private String url;
private String method;
private String body;
private String path;
private String type;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
public static class AutoCompleteSingleData { public static class AutoCompleteSingleData {
private int autocompleteType; private int autocompleteType;
private String url; private String url;
private ComboBoxData.Option autoCompleteOptions; private ComboBoxData.Option autoCompleteOptions;
private String optionsRoot; private String optionsRoot;
private Boolean hasAuth;
private AuthAutoCompleteData auth;
private String method;
public int getAutocompleteType() { public int getAutocompleteType() {
return autocompleteType; return autocompleteType;
@ -89,36 +38,12 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
this.url = url; this.url = url;
} }
public Boolean getHasAuth() {
return hasAuth;
}
public void setHasAuth(Boolean hasAuth) {
this.hasAuth = hasAuth;
}
public AuthAutoCompleteData getAuth() {
return auth;
}
public void setAuth(AuthAutoCompleteData auth) {
this.auth = auth;
}
public ComboBoxData.Option getAutoCompleteOptions() { public ComboBoxData.Option getAutoCompleteOptions() {
return autoCompleteOptions; return autoCompleteOptions;
} }
public void setAutoCompleteOptions(ComboBoxData.Option autoCompleteOptions) { public void setAutoCompleteOptions(ComboBoxData.Option autoCompleteOptions) {
this.autoCompleteOptions = autoCompleteOptions; this.autoCompleteOptions = autoCompleteOptions;
} }
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
} }
private Boolean multiAutoComplete; private Boolean multiAutoComplete;
@ -145,22 +70,11 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
parent.setAttribute("url", singleData.url); parent.setAttribute("url", singleData.url);
parent.setAttribute("optionsRoot", singleData.optionsRoot); parent.setAttribute("optionsRoot", singleData.optionsRoot);
parent.setAttribute("autoCompleteType", Integer.toString(singleData.autocompleteType)); parent.setAttribute("autoCompleteType", Integer.toString(singleData.autocompleteType));
parent.setAttribute("hasAuth", Boolean.toString(singleData.hasAuth));
parent.setAttribute("method", singleData.method);
Element element = doc.createElement("option"); Element element = doc.createElement("option");
element.setAttribute("label", singleData.autoCompleteOptions.getLabel()); element.setAttribute("label", singleData.autoCompleteOptions.getLabel());
element.setAttribute("value", singleData.autoCompleteOptions.getValue()); element.setAttribute("value", singleData.autoCompleteOptions.getValue());
element.setAttribute("source", singleData.autoCompleteOptions.getSource()); element.setAttribute("source", singleData.autoCompleteOptions.getSource());
parent.appendChild(element); parent.appendChild(element);
if (singleData.hasAuth) {
Element authElement = doc.createElement("auth");
authElement.setAttribute("url", singleData.auth.url);
authElement.setAttribute("method", singleData.auth.method);
authElement.setAttribute("body", singleData.auth.body);
authElement.setAttribute("path", singleData.auth.path);
authElement.setAttribute("type", singleData.auth.type);
parent.appendChild(authElement);
}
root.appendChild(parent); root.appendChild(parent);
} }
return root; return root;
@ -194,8 +108,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
} else { } else {
singleData.autocompleteType = AutocompleteType.fromValue(Integer.parseInt(item.getAttribute("autoCompleteType"))).getValue(); singleData.autocompleteType = AutocompleteType.fromValue(Integer.parseInt(item.getAttribute("autoCompleteType"))).getValue();
} }
singleData.hasAuth = Boolean.parseBoolean(item.getAttribute("hasAuth"));
singleData.method = item.hasAttribute("method") ? item.getAttribute("method") : "GET";
Element optionElement = (Element) item.getElementsByTagName("option").item(0); Element optionElement = (Element) item.getElementsByTagName("option").item(0);
if (optionElement != null) { if (optionElement != null) {
singleData.autoCompleteOptions = new Option(); singleData.autoCompleteOptions = new Option();
@ -204,17 +116,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
singleData.autoCompleteOptions.setSource(optionElement.getAttribute("source")); singleData.autoCompleteOptions.setSource(optionElement.getAttribute("source"));
singleData.autoCompleteOptions.setUri(optionElement.getAttribute("uri")); singleData.autoCompleteOptions.setUri(optionElement.getAttribute("uri"));
} }
if (singleData.hasAuth) {
Element authElement = (Element) item.getElementsByTagName("auth").item(0);
if (authElement != null) {
singleData.auth = new AuthAutoCompleteData();
singleData.auth.setUrl(authElement.getAttribute("url"));
singleData.auth.setMethod(authElement.getAttribute("method"));
singleData.auth.setBody(authElement.getAttribute("body"));
singleData.auth.setPath(authElement.getAttribute("path"));
singleData.auth.setType(authElement.getAttribute("type"));
}
}
} }
@Override @Override
@ -240,8 +141,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
this.autoCompleteSingleDataList.get(i).autoCompleteOptions = new Option(); this.autoCompleteSingleDataList.get(i).autoCompleteOptions = new Option();
this.autoCompleteSingleDataList.get(i).url = (String) singleData.get("url"); this.autoCompleteSingleDataList.get(i).url = (String) singleData.get("url");
this.autoCompleteSingleDataList.get(i).optionsRoot = (String) singleData.get("optionsRoot"); this.autoCompleteSingleDataList.get(i).optionsRoot = (String) singleData.get("optionsRoot");
this.autoCompleteSingleDataList.get(i).hasAuth = (Boolean) singleData.get("hasAuth");
this.autoCompleteSingleDataList.get(i).method = singleData.containsKey("method") ? (String) singleData.get("method") : "GET";
if (singleData.get("autoCompleteType") == null) { if (singleData.get("autoCompleteType") == null) {
this.autoCompleteSingleDataList.get(i).autocompleteType = AutocompleteType.UNCACHED.getValue(); this.autoCompleteSingleDataList.get(i).autocompleteType = AutocompleteType.UNCACHED.getValue();
@ -255,17 +154,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
this.autoCompleteSingleDataList.get(i).autoCompleteOptions.setSource(options.get("source")); this.autoCompleteSingleDataList.get(i).autoCompleteOptions.setSource(options.get("source"));
this.autoCompleteSingleDataList.get(i).autoCompleteOptions.setUri(options.get("uri")); this.autoCompleteSingleDataList.get(i).autoCompleteOptions.setUri(options.get("uri"));
} }
if (this.autoCompleteSingleDataList.get(i).hasAuth) {
Map<String, String> auth = (Map<String, String>) singleData.get("auth");
if (auth != null) {
this.autoCompleteSingleDataList.get(i).auth = new AuthAutoCompleteData();
this.autoCompleteSingleDataList.get(i).auth.setUrl(auth.get("url"));
this.autoCompleteSingleDataList.get(i).auth.setType(auth.get("type"));
this.autoCompleteSingleDataList.get(i).auth.setPath(auth.get("path"));
this.autoCompleteSingleDataList.get(i).auth.setBody(auth.get("body"));
this.autoCompleteSingleDataList.get(i).auth.setMethod(auth.get("method"));
}
}
i++; i++;
} }
} }
@ -302,8 +190,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
node.appendChild(autoCompleteSingles.item(i)); node.appendChild(autoCompleteSingles.item(i));
node.setAttribute("url", item.getAttribute("url")); node.setAttribute("url", item.getAttribute("url"));
node.setAttribute("optionsRoot", item.getAttribute("optionsRoot")); node.setAttribute("optionsRoot", item.getAttribute("optionsRoot"));
node.setAttribute("hasAuth", item.getAttribute("hasAuth"));
node.setAttribute("method", item.hasAttribute("method") ? item.getAttribute("method") : "GET");
autoCompletes.add(singleToMap(node)); autoCompletes.add(singleToMap(node));
} }
} }
@ -328,16 +214,6 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
return dataMap; return dataMap;
} }
private Map<String, Object> authToMap(Element item){
HashMap dataMap = new HashMap();
dataMap.put("url", item != null ? item.getAttribute("url") : "");
dataMap.put("method", item != null ? item.getAttribute("method") : "");
dataMap.put("body", item != null ? item.getAttribute("body") : "");
dataMap.put("path", item != null ? item.getAttribute("path") : "");
dataMap.put("type", item != null ? item.getAttribute("type") : "");
return dataMap;
}
private Map<String, Object> singleToMap(Element item) { private Map<String, Object> singleToMap(Element item) {
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
if (!item.getAttribute("autoCompleteType").isEmpty()) { if (!item.getAttribute("autoCompleteType").isEmpty()) {
@ -345,12 +221,8 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
} }
dataMap.put("optionsRoot", item != null ? item.getAttribute("optionsRoot") : ""); dataMap.put("optionsRoot", item != null ? item.getAttribute("optionsRoot") : "");
dataMap.put("url", item != null ? item.getAttribute("url") : ""); dataMap.put("url", item != null ? item.getAttribute("url") : "");
dataMap.put("hasAuth", item != null ? item.getAttribute("hasAuth") : "false");
Element optionElement = (Element) item.getElementsByTagName("option").item(0); Element optionElement = (Element) item.getElementsByTagName("option").item(0);
dataMap.put("autoCompleteOptions", item != null ? optionToMap(optionElement) : null); dataMap.put("autoCompleteOptions", item != null ? optionToMap(optionElement) : null);
Element authElement = (Element) item.getElementsByTagName("auth").item(0);
dataMap.put("auth", item != null ? authToMap(authElement) : null);
dataMap.put("method", item != null && item.hasAttribute("method") ? item.getAttribute("method") : "GET");
return dataMap; return dataMap;
} }

View File

@ -1,30 +0,0 @@
package eu.eudat.models.data.datasetprofile;
import java.util.UUID;
public class DatasetProfileWithPrefillingPropertyModel {
private UUID id;
private String label;
private boolean enablePrefilling;
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public boolean isEnablePrefilling() {
return enablePrefilling;
}
public void setEnablePrefilling(boolean enablePrefilling) {
this.enablePrefilling = enablePrefilling;
}
}

View File

@ -23,7 +23,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
private UUID id; private UUID id;
private String label; private String label;
private UUID groupId; private UUID groupId;
private UUID profile; private Tuple<UUID, String> profile;
private int version; private int version;
private int status; private int status;
private boolean lockable; private boolean lockable;
@ -53,10 +53,10 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
this.id = id; this.id = id;
} }
public UUID getProfile() { public Tuple<UUID, String> getProfile() {
return profile; return profile;
} }
public void setProfile(UUID profile) { public void setProfile(Tuple<UUID, String> profile) {
this.profile = profile; this.profile = profile;
} }
@ -226,7 +226,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
@Override @Override
public DataManagementPlanEditorModel fromDataModel(DMP entity) { public DataManagementPlanEditorModel fromDataModel(DMP entity) {
this.id = entity.getId(); this.id = entity.getId();
this.profile = entity.getProfile() != null ? entity.getProfile().getId() : null; this.profile = entity.getProfile() != null ? new Tuple<UUID, String>(entity.getProfile().getId(), entity.getProfile().getLabel()) : null;
this.organisations = entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList()); this.organisations = entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList());
this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList()); this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList());
this.version = entity.getVersion(); this.version = entity.getVersion();
@ -289,7 +289,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
DMP dataManagementPlanEntity = new DMP(); DMP dataManagementPlanEntity = new DMP();
if (this.profile != null) { if (this.profile != null) {
DMPProfile dmpProfile = new DMPProfile(); DMPProfile dmpProfile = new DMPProfile();
dmpProfile.setId(this.profile); dmpProfile.setId(this.profile.getId());
dataManagementPlanEntity.setProfile(dmpProfile); dataManagementPlanEntity.setProfile(dmpProfile);
} }
dataManagementPlanEntity.setId(this.id); dataManagementPlanEntity.setId(this.id);

View File

@ -11,18 +11,9 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
public class ViewStyleModel implements XmlSerializable<ViewStyleModel> { public class ViewStyleModel implements XmlSerializable<ViewStyleModel> {
private boolean enablePrefilling;
private List<Section> sections; private List<Section> sections;
private List<Page> pages; private List<Page> pages;
public boolean isEnablePrefilling() {
return enablePrefilling;
}
public void setEnablePrefilling(boolean enablePrefilling) {
this.enablePrefilling = enablePrefilling;
}
public List<Section> getSections() { public List<Section> getSections() {
return sections; return sections;
} }
@ -42,8 +33,6 @@ public class ViewStyleModel implements XmlSerializable<ViewStyleModel> {
@Override @Override
public Element toXml(Document doc) { public Element toXml(Document doc) {
Element root = doc.createElement("root"); Element root = doc.createElement("root");
Element prefilling = doc.createElement("enablePrefilling");
prefilling.setTextContent(String.valueOf(this.enablePrefilling));
Element sections = doc.createElement("sections"); Element sections = doc.createElement("sections");
Element pages = doc.createElement("pages"); Element pages = doc.createElement("pages");
for (Section section : this.sections) { for (Section section : this.sections) {
@ -55,7 +44,6 @@ public class ViewStyleModel implements XmlSerializable<ViewStyleModel> {
pages.appendChild(page.toXml(doc)); pages.appendChild(page.toXml(doc));
} }
root.appendChild(prefilling);
root.appendChild(pages); root.appendChild(pages);
root.appendChild(sections); root.appendChild(sections);
return root; return root;
@ -64,12 +52,6 @@ public class ViewStyleModel implements XmlSerializable<ViewStyleModel> {
@Override @Override
public ViewStyleModel fromXml(Element element) { public ViewStyleModel fromXml(Element element) {
this.enablePrefilling = true;
Element prefilling = (Element) XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "enablePrefilling");
if (prefilling != null) {
this.enablePrefilling = Boolean.parseBoolean(prefilling.getChildNodes().item(0).getNodeValue());
}
this.sections = new LinkedList(); this.sections = new LinkedList();
Element sections = (Element) XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "sections"); Element sections = (Element) XmlBuilder.getNodeFromListByTagName(element.getChildNodes(), "sections");
if (sections != null) { if (sections != null) {

View File

@ -55,8 +55,8 @@ public class DescriptionTemplate implements XmlSerializable<DescriptionTemplate>
rootElement.setAttribute("id", this.getId().toString()); rootElement.setAttribute("id", this.getId().toString());
rootElement.setAttribute("descriptionTemplateId", this.getDescriptionTemplateId().toString()); rootElement.setAttribute("descriptionTemplateId", this.getDescriptionTemplateId().toString());
rootElement.setAttribute("label", this.label); rootElement.setAttribute("label", this.label);
if (this.minMultiplicity != null) rootElement.setAttribute("minMultiplicity", String.valueOf(this.minMultiplicity)); rootElement.setAttribute("minMultiplicity", String.valueOf(this.minMultiplicity));
if (this.maxMultiplicity != null) rootElement.setAttribute("maxMultiplicity", String.valueOf(this.maxMultiplicity)); rootElement.setAttribute("maxMultiplicity", String.valueOf(this.maxMultiplicity));
return rootElement; return rootElement;
} }

View File

@ -13,7 +13,6 @@ public class DatasetProfile implements PropertiesModelBuilder {
private String description; private String description;
private String language; private String language;
private String type; private String type;
private boolean enablePrefilling;
private List<Section> sections; private List<Section> sections;
private List<Rule> rules; private List<Rule> rules;
private List<Page> pages; private List<Page> pages;
@ -43,14 +42,6 @@ public class DatasetProfile implements PropertiesModelBuilder {
this.type = type; this.type = type;
} }
public boolean isEnablePrefilling() {
return enablePrefilling;
}
public void setEnablePrefilling(boolean enablePrefilling) {
this.enablePrefilling = enablePrefilling;
}
public List<Section> getSections() { public List<Section> getSections() {
return sections; return sections;
} }
@ -85,7 +76,6 @@ public class DatasetProfile implements PropertiesModelBuilder {
} }
public void buildProfile(eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewStyle) { public void buildProfile(eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewStyle) {
this.enablePrefilling = viewStyle.isEnablePrefilling();
this.sections = new ModelBuilder().fromViewStyleDefinition(viewStyle.getSections(), Section.class); this.sections = new ModelBuilder().fromViewStyleDefinition(viewStyle.getSections(), Section.class);
this.pages = new ModelBuilder().fromViewStyleDefinition(viewStyle.getPages(), Page.class); this.pages = new ModelBuilder().fromViewStyleDefinition(viewStyle.getPages(), Page.class);
this.rules = ModelBuilderCollector.collectRules(viewStyle.getSections()); this.rules = ModelBuilderCollector.collectRules(viewStyle.getSections());

View File

@ -52,7 +52,6 @@ public class DatasetRDAMapper {
rda.setTitle(dataset.getLabel()); rda.setTitle(dataset.getLabel());
rda.setDescription(dataset.getDescription()); rda.setDescription(dataset.getDescription());
rda.setAdditionalProperty("template", dataset.getProfile().getId()); rda.setAdditionalProperty("template", dataset.getProfile().getId());
rda.setAdditionalProperty("dmpSectionIndex", dataset.getDmpSectionIndex());
try { try {
JSONObject jObject = new JSONObject(dataset.getProperties()); JSONObject jObject = new JSONObject(dataset.getProperties());
Map<String, Object> templateIdsToValues = jObject.toMap(); Map<String, Object> templateIdsToValues = jObject.toMap();
@ -285,12 +284,6 @@ public class DatasetRDAMapper {
eu.eudat.data.entities.Dataset entity = new eu.eudat.data.entities.Dataset(); eu.eudat.data.entities.Dataset entity = new eu.eudat.data.entities.Dataset();
entity.setLabel(rda.getTitle()); entity.setLabel(rda.getTitle());
entity.setDescription(rda.getDescription()); entity.setDescription(rda.getDescription());
if (rda.getAdditionalProperties().get("dmpSectionIndex") != null) {
entity.setDmpSectionIndex(Integer.parseInt(rda.getAdditionalProperties().get("dmpSectionIndex").toString()));
} else {
entity.setDmpSectionIndex(0);
}
try { try {
DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(rda.getAdditionalProperties().get("template").toString())); DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(rda.getAdditionalProperties().get("template").toString()));
entity.setProfile(profile); entity.setProfile(profile);

View File

@ -1,11 +1,8 @@
package eu.eudat.models.rda.mapper; package eu.eudat.models.rda.mapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.entities.*; import eu.eudat.data.entities.*;
import eu.eudat.logic.managers.DataManagementProfileManager;
import eu.eudat.logic.services.ApiContext; import eu.eudat.logic.services.ApiContext;
import eu.eudat.logic.utilities.helpers.StreamDistinctBy; import eu.eudat.logic.utilities.helpers.StreamDistinctBy;
import eu.eudat.models.data.dmp.AssociatedProfile;
import eu.eudat.models.rda.Dmp; import eu.eudat.models.rda.Dmp;
import eu.eudat.models.rda.DmpId; import eu.eudat.models.rda.DmpId;
import net.minidev.json.JSONObject; import net.minidev.json.JSONObject;
@ -27,13 +24,13 @@ public class DmpRDAMapper {
private DatasetRDAMapper datasetRDAMapper; private DatasetRDAMapper datasetRDAMapper;
private ApiContext apiContext; private ApiContext apiContext;
private DataManagementProfileManager dataManagementProfileManager;
@Autowired @Autowired
public DmpRDAMapper(DatasetRDAMapper datasetRDAMapper, ApiContext apiContext, DataManagementProfileManager dataManagementProfileManager) throws IOException { public DmpRDAMapper(DatasetRDAMapper datasetRDAMapper, ApiContext apiContext) throws IOException {
this.datasetRDAMapper = datasetRDAMapper; this.datasetRDAMapper = datasetRDAMapper;
this.apiContext = apiContext; this.apiContext = apiContext;
this.dataManagementProfileManager = dataManagementProfileManager;
} }
@Transactional @Transactional
@ -119,15 +116,10 @@ public class DmpRDAMapper {
} }
// rda.getContributor().addAll(dmp.getUsers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList())); // rda.getContributor().addAll(dmp.getUsers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList()));
rda.setDataset(dmp.getDataset().stream().filter(dataset -> dataset.getStatus() != eu.eudat.elastic.entities.Dmp.DMPStatus.DELETED.getValue()).map(dataset -> datasetRDAMapper.toRDA(dataset, rda)).collect(Collectors.toList())); rda.setDataset(dmp.getDataset().stream().filter(dataset -> dataset.getStatus() != eu.eudat.elastic.entities.Dmp.DMPStatus.DELETED.getValue()).map(dataset -> datasetRDAMapper.toRDA(dataset, rda)).collect(Collectors.toList()));
rda.setProject(Collections.singletonList(ProjectRDAMapper.toRDA(dmp.getProject(), dmp.getGrant()))); if (dmp.getProject() != null) {
rda.setProject(Collections.singletonList(ProjectRDAMapper.toRDA(dmp.getProject(), dmp.getGrant())));
rda.setAdditionalProperty("templates", dmp.getAssociatedDmps().stream().map(item -> item.getDatasetprofile().getId().toString()).toArray()); }
rda.setAdditionalProperty("blueprintId", dmp.getProfile().getId()); rda.setAdditionalProperty("templates", dmp.getAssociatedDmps().stream().map(datasetProfile -> datasetProfile.getId().toString()).toArray());
rda.setAdditionalProperty("license", extraProperties.get("license"));
rda.setAdditionalProperty("visible", extraProperties.get("visible"));
rda.setAdditionalProperty("publicDate", extraProperties.get("publicDate"));
rda.setAdditionalProperty("contact", extraProperties.get("contact"));
rda.setAdditionalProperty("dmpProperties", dmp.getProperties());
return rda; return rda;
} }
@ -146,46 +138,26 @@ public class DmpRDAMapper {
entity.setDois(new HashSet<>()); entity.setDois(new HashSet<>());
} }
} }
if (((List<String>) rda.getAdditionalProperties().get("templates")) != null && !((List<String>) rda.getAdditionalProperties().get("templates")).isEmpty() && entity.getId() != null) {
String blueprintId = (String) rda.getAdditionalProperties().get("blueprintId"); entity.setAssociatedDmps(((List<String>) rda.getAdditionalProperties().get("templates")).stream().map(x -> this.getProfile(x, entity.getId())).filter(Objects::nonNull).collect(Collectors.toSet()));
DMPProfile blueprint = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(UUID.fromString(blueprintId)); }
entity.setProfile(blueprint); if (entity.getAssociatedDmps() == null) {
entity.setAssociatedDmps(new HashSet<>());
if (((List<String>) rda.getAdditionalProperties().get("templates")) != null && !((List<String>) rda.getAdditionalProperties().get("templates")).isEmpty()) { }
List<DescriptionTemplate> descriptionTemplates = ((List<String>) rda.getAdditionalProperties().get("templates")).stream().map(this::getProfile).filter(Objects::nonNull).collect(Collectors.toList()); if (profiles != null && entity.getId() != null) {
Set<DMPDatasetProfile> dmpDatasetProfiles = new HashSet<>(); for (String profile : profiles) {
for (DescriptionTemplate profile : descriptionTemplates) { entity.getAssociatedDmps().add(this.getProfile(profile, entity.getId()));
DMPDatasetProfile dmpDatasetProfile = new DMPDatasetProfile(); }
dmpDatasetProfile.setDmp(entity);
dmpDatasetProfile.setDatasetprofile(profile);
String indexes = this.dataManagementProfileManager.sectionIndexesForDescriptionTemplate(blueprint, profile.getId()).stream()
.map(String::valueOf) // convert each int to a string
.collect(Collectors.joining(","));
dmpDatasetProfile.setData("{\"dmpSectionIndex\":[" + indexes + "]}");
dmpDatasetProfiles.add(dmpDatasetProfile);
}
entity.setAssociatedDmps(dmpDatasetProfiles);
} }
// if (entity.getAssociatedDmps() == null) {
// entity.setAssociatedDmps(new HashSet<>());
// }
// if (profiles != null && entity.getId() != null) {
// for (String profile : profiles) {
// entity.getAssociatedDmps().add(this.getProfile(profile, entity.getId()));
// }
// }
if (rda.getContributor() != null && !rda.getContributor().isEmpty() && rda.getContributor().get(0).getContributorId() != null) { if (rda.getContributor() != null && !rda.getContributor().isEmpty() && rda.getContributor().get(0).getContributorId() != null) {
entity.setResearchers(rda.getContributor().stream().filter(r -> r.getContributorId() != null).map(ContributorRDAMapper::toEntity).filter(StreamDistinctBy.distinctByKey(Researcher::getReference)).collect(Collectors.toSet())); entity.setResearchers(rda.getContributor().stream().filter(r -> r.getContributorId() != null).map(ContributorRDAMapper::toEntity).filter(StreamDistinctBy.distinctByKey(Researcher::getReference)).collect(Collectors.toSet()));
} }
entity.setCreated(rda.getCreated()); entity.setCreated(rda.getCreated());
entity.setModified(rda.getModified()); entity.setModified(rda.getModified());
entity.setDescription(rda.getDescription()); entity.setDescription(rda.getDescription());
if(entity.getAssociatedDmps().size() > 0) { DescriptionTemplate defaultProfile = ((DescriptionTemplate)entity.getAssociatedDmps().toArray()[0]);
DescriptionTemplate defaultProfile = entity.getAssociatedDmps().stream().findFirst().get().getDatasetprofile(); entity.setDataset(rda.getDataset().stream().map(rda1 -> datasetRDAMapper.toEntity(rda1, defaultProfile)).collect(Collectors.toSet()));
entity.setDataset(rda.getDataset().stream().map(rda1 -> datasetRDAMapper.toEntity(rda1, defaultProfile)).collect(Collectors.toSet())); if (rda.getProject().size() > 0) {
}
if (rda.getProject() != null && rda.getProject().size() > 0) {
Map<String, Object> result = ProjectRDAMapper.toEntity(rda.getProject().get(0), apiContext); Map<String, Object> result = ProjectRDAMapper.toEntity(rda.getProject().get(0), apiContext);
entity.setProject((Project) result.get("project")); entity.setProject((Project) result.get("project"));
result.entrySet().stream().filter(entry -> entry.getKey().startsWith("grant")).forEach(entry -> entity.setGrant((Grant) entry.getValue())); result.entrySet().stream().filter(entry -> entry.getKey().startsWith("grant")).forEach(entry -> entity.setGrant((Grant) entry.getValue()));
@ -193,19 +165,16 @@ public class DmpRDAMapper {
Map<String, Object> extraProperties = new HashMap<>(); Map<String, Object> extraProperties = new HashMap<>();
extraProperties.put("language", LanguageRDAMapper.mapRDAIsoToLanguageIso(rda.getLanguage())); extraProperties.put("language", LanguageRDAMapper.mapRDAIsoToLanguageIso(rda.getLanguage()));
if (rda.getAdditionalProperties().get("license") != null) extraProperties.put("license", rda.getAdditionalProperties().get("license"));
if (rda.getAdditionalProperties().get("visible") != null) extraProperties.put("visible", rda.getAdditionalProperties().get("visible"));
if (rda.getAdditionalProperties().get("publicDate") != null) extraProperties.put("publicDate", rda.getAdditionalProperties().get("publicDate"));
if (rda.getAdditionalProperties().get("contact") != null) extraProperties.put("contact", rda.getAdditionalProperties().get("contact"));
entity.setExtraProperties(JSONObject.toJSONString(extraProperties)); entity.setExtraProperties(JSONObject.toJSONString(extraProperties));
if (rda.getAdditionalProperties().get("dmpProperties") != null) entity.setProperties(rda.getAdditionalProperties().get("dmpProperties").toString());
return entity; return entity;
} }
private DescriptionTemplate getProfile(String id) { private DMPDatasetProfile getProfile(String descriptionTemplateId, UUID dmpId) {
return apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().asQueryable().where(((builder, root) -> builder.equal(root.get("id"), UUID.fromString(id)))).getSingleOrDefault(); return apiContext.getOperationsContext().getDatabaseRepository().getDmpDatasetProfileDao().asQueryable().where(((builder, root) -> builder.and(
builder.equal(root.get("datasetprofile"), UUID.fromString(descriptionTemplateId)),
builder.equal(root.get("dmp"), dmpId))
)).getSingleOrDefault();
} }
} }

View File

@ -17,13 +17,13 @@ public class ProjectRDAMapper {
public static Project toRDA(eu.eudat.data.entities.Project project, Grant grant) { public static Project toRDA(eu.eudat.data.entities.Project project, Grant grant) {
Project rda = new Project(); Project rda = new Project();
try { try {
rda.setTitle(grant.getLabel()); rda.setTitle(project.getLabel());
rda.setDescription(grant.getDescription()); rda.setDescription(project.getDescription());
if (grant.getStartdate() != null) { if (project.getStartdate() != null) {
rda.setStart(grant.getStartdate().toString()); rda.setStart(project.getStartdate().toString());
} }
if (grant.getEnddate() != null) { if (project.getEnddate() != null) {
rda.setEnd(grant.getEnddate().toString()); rda.setEnd(project.getEnddate().toString());
} }
rda.setFunding(Collections.singletonList(FundingRDAMapper.toRDA(grant))); rda.setFunding(Collections.singletonList(FundingRDAMapper.toRDA(grant)));

View File

@ -13,7 +13,7 @@ ADD COLUMN "Type" uuid;
INSERT INTO public."DescriptionTemplateType" ("ID", "Name", "Status") INSERT INTO public."DescriptionTemplateType" ("ID", "Name", "Status")
VALUES ('709a8400-10ca-11ee-be56-0242ac120002', 'Dataset', 1); VALUES ('709a8400-10ca-11ee-be56-0242ac120002', 'Dataset', 1);
UPDATE public."DescriptionTemplate" SET "Type" = '709a8400-10ca-11ee-be56-0242ac120002'; UPDATE public."DescriptionTemplate" SET ("Type") = '709a8400-10ca-11ee-be56-0242ac120002';
ALTER TABLE public."DescriptionTemplate" ALTER TABLE public."DescriptionTemplate"
ALTER COLUMN "Type" SET NOT NULL; ALTER COLUMN "Type" SET NOT NULL;

View File

@ -4,7 +4,7 @@ BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version; PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF; IF FOUND THEN RETURN; END IF;
INSERT INTO public."DMPProfile" VALUES ('86635178-36a6-484f-9057-a934e4eeecd5', 'Dmp Default Blueprint', '<root><sections><section id="f94e50e0-cb97-4c65-8b88-e5db6badd41d" label="Main Info" description="" ordinal="1" hasTemplates="false"><systemFields><systemField id="e62c3fa2-4cbe-41bf-a00e-ad722c7c7da1" type="0" label="Title of DMP" placeholder="Title of DMP" description="" required="true" ordinal="1"></systemField><systemField id="eed2871d-5201-401e-8453-87afbeac77e3" type="1" label="Description" placeholder="Fill with description" description="Briefly describe the context and purpose of the DMP" required="true" ordinal="2"></systemField><systemField id="41a0b1db-b186-467d-8edf-7d3b2456f95e" type="2" label="Researchers" placeholder="Select researchers" description="Add here the names of people that have produced, processed, analysed the data described in the DMP." required="false" ordinal="3"></systemField><systemField id="0f0afb55-a11b-41db-a4d0-67ebb74d8685" type="3" label="Organizations" placeholder="Select organization" description="Add here the names of the organizations contributing to the creation and revision of the DMPs" required="false" ordinal="4"></systemField><systemField id="db493026-3130-4730-9b93-da6b77d2eea4" type="4" label="Language" placeholder="Language" description="Select the language of your DMP" required="true" ordinal="5"></systemField><systemField id="22deb104-1c46-4ea8-8261-8fdc9500dca2" type="5" label="Contact" placeholder="Contact" description="" required="true" ordinal="6"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="3c2608e5-9320-4d94-9ed7-1eab9500d84b" label="Funding" description="" ordinal="2" hasTemplates="false"><systemFields><systemField id="527af8fe-27b0-4715-9e1e-35a2fce834a1" type="6" label="Funding organizations" placeholder="Funder" description="Select a funder of your research or add new" required="true" ordinal="1"></systemField><systemField id="4d12904e-2501-4d57-8d2b-1ac795c297e7" type="7" label="Grants" placeholder="Grant" description="Find the grant of your research or add new" required="true" ordinal="2"></systemField><systemField id="82f235c8-98fc-48d1-8245-36ab08f01036" type="8" label="Project" placeholder="Project" description="Projects in Argos are perceived as distinct activities falling under a grant or common activities under different grants in collaborative schemas, eg open call for contributions. Please complete it for the grant associated to your organization if your project falls under this category. In all other cases, please leave blank and it will be autocompleted." required="false" ordinal="3"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="2a77e1f6-9989-4aeb-acd9-48e911a92abd" label="License" description="" ordinal="3" hasTemplates="false"><systemFields><systemField id="75c31705-6731-45dd-9853-75c5d0627439" type="9" label="License" placeholder="License" description="Assign a license to your DMP by selecting the most appropriate from the list." required="false" ordinal="1"></systemField><systemField id="990df932-eae6-44ca-85da-5378b010f439" type="10" label="Access Rights" placeholder="Access Rights" description="Choose how the DMP is displayed after is published on Zenodo. By choosing Open Access, the DMP will be open on Zenodo after the Publication Date. By choosing Restricted Access, the DMP will be restricted after the publication is made." required="false" ordinal="2"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="0db7845b-0e7c-41df-8d91-cbca97995fd5" label="Templates" description="" ordinal="4" hasTemplates="true"><systemFields></systemFields><descriptionTemplates></descriptionTemplates></section></sections></root>',1, now(),now()); INSERT INTO public."DMPProfile" VALUES ('86635178-36a6-484f-9057-a934e4eeecd5', 'Dmp Default Blueprint', '<root><sections><section id="f94e50e0-cb97-4c65-8b88-e5db6badd41d" label="Main Info" description="A DMP in Argos consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities." ordinal="1" hasTemplates="false"><systemFields><systemField id="e62c3fa2-4cbe-41bf-a00e-ad722c7c7da1" type="0" label="Title of DMP" placeholder="Title of DMP" description="" required="true" ordinal="1"></systemField><systemField id="eed2871d-5201-401e-8453-87afbeac77e3" type="1" label="Description" placeholder="Fill with description" description="Briefly describe the context and purpose of the DMP" required="true" ordinal="2"></systemField><systemField id="41a0b1db-b186-467d-8edf-7d3b2456f95e" type="2" label="Researchers" placeholder="Select researchers" description="Add here the names of people that have produced, processed, analysed the data described in the DMP." required="false" ordinal="3"></systemField><systemField id="0f0afb55-a11b-41db-a4d0-67ebb74d8685" type="3" label="Organizations" placeholder="Select organization" description="Add here the names of the organizations contributing to the creation and revision of the DMPs" required="false" ordinal="4"></systemField><systemField id="db493026-3130-4730-9b93-da6b77d2eea4" type="4" label="Language" placeholder="Language" description="Select the language of your DMP" required="true" ordinal="5"></systemField><systemField id="22deb104-1c46-4ea8-8261-8fdc9500dca2" type="5" label="Contact" placeholder="Contact" description="" required="true" ordinal="6"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="3c2608e5-9320-4d94-9ed7-1eab9500d84b" label="Funding" description="Add here information about the scope, funding, actors of your DMP and decide on access and re-use issues for the DMP output that you are creating." ordinal="2" hasTemplates="false"><systemFields><systemField id="527af8fe-27b0-4715-9e1e-35a2fce834a1" type="6" label="Funding organizations" placeholder="Funder" description="Select a funder of your research or add new" required="true" ordinal="1"></systemField><systemField id="4d12904e-2501-4d57-8d2b-1ac795c297e7" type="7" label="Grants" placeholder="Grant" description="Find the grant of your research or add new" required="true" ordinal="2"></systemField><systemField id="82f235c8-98fc-48d1-8245-36ab08f01036" type="8" label="Project" placeholder="Project" description="Projects in Argos are perceived as distinct activities falling under a grant or common activities under different grants in collaborative schemas, eg open call for contributions. Please complete it for the grant associated to your organization if your project falls under this category. In all other cases, please leave blank and it will be autocompleted." required="false" ordinal="3"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="2a77e1f6-9989-4aeb-acd9-48e911a92abd" label="License" description="Each DMP can contain specific license informatation over how much open and available it is, that way you can determine who can see your dataset and for how long that data will be private." ordinal="3" hasTemplates="false"><systemFields><systemField id="75c31705-6731-45dd-9853-75c5d0627439" type="9" label="License" placeholder="License" description="Assign a license to your DMP by selecting the most appropriate from the list." required="false" ordinal="1"></systemField><systemField id="990df932-eae6-44ca-85da-5378b010f439" type="10" label="Access Rights" placeholder="Access Rights" description="Choose how the DMP is displayed after is published on Zenodo. By choosing Open Access, the DMP will be open on Zenodo after the Publication Date. By choosing Restricted Access, the DMP will be restricted after the publication is made." required="false" ordinal="2"></systemField></systemFields><descriptionTemplates></descriptionTemplates></section><section id="0db7845b-0e7c-41df-8d91-cbca97995fd5" label="Dataset Info" description="Datasets are documented following pre-defined templates which set the content of dataset descriptions. In Argos, a DMP can contain as many dataset descriptions as the datasets it documents." ordinal="4" hasTemplates="true"><systemFields></systemFields><descriptionTemplates></descriptionTemplates></section></sections></root>',1, now(),now());
UPDATE public."DMP" SET "Profile" = '86635178-36a6-484f-9057-a934e4eeecd5' WHERE "Profile" IS NULL; UPDATE public."DMP" SET "Profile" = '86635178-36a6-484f-9057-a934e4eeecd5' WHERE "Profile" IS NULL;
UPDATE public."Dataset" SET "DmpSectionIndex" = '3' WHERE "DmpSectionIndex" IS NULL; UPDATE public."Dataset" SET "DmpSectionIndex" = '3' WHERE "DmpSectionIndex" IS NULL;
UPDATE public."DMPDatasetProfile" SET "data" = '{"dmpSectionIndex":[3]}' WHERE "data" IS NULL; UPDATE public."DMPDatasetProfile" SET "data" = '{"dmpSectionIndex":[3]}' WHERE "data" IS NULL;

View File

@ -25,4 +25,7 @@
<app-notification *ngIf="!onlySplash"></app-notification> <app-notification *ngIf="!onlySplash"></app-notification>
<router-outlet *ngIf="onlySplash"></router-outlet> <router-outlet *ngIf="onlySplash"></router-outlet>
<ngx-guided-tour [skipText]="'DASHBOARD.TOUR-GUIDE.LEAVE-TOUR'| translate" [nextText]="'DASHBOARD.TOUR-GUIDE.GOT-IT'| translate"></ngx-guided-tour> <ngx-guided-tour
[skipText]="'DASHBOARD.TOUR-GUIDE.LEAVE-TOUR'| translate"
[nextText]="'DASHBOARD.TOUR-GUIDE.GOT-IT'| translate"
></ngx-guided-tour>

View File

@ -40,70 +40,3 @@
::ng-deep .mat-chip { ::ng-deep .mat-chip {
height: auto !important; height: auto !important;
} }
.notification-header {
height: 64px;
background: var(--unnamed-color-var(--primary-color)) 0% 0% no-repeat padding-box;
background: var(--primary-color) 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 6px #00000029;
padding: 0.6rem;
margin: 30px 0px 0px 0px;
border-radius: 4px;
opacity: 1;
.info {
flex: 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.notification-discard-btn {
background: transparent;
border: 1px solid #ffffff;
color: white;
border-radius: 30px;
opacity: 1;
width: 110px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.notification-title {
text-align: left;
font-weight: 400;
font-size: 14px;
color: #ffffff;
opacity: 0.75;
}
.notification-subtitle {
text-align: left;
color: #ffffff;
font-weight: 700;
font-size: 16px;
opacity: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.notification-link {
color: #ffffff;
text-decoration: underline;
}
.notification-save-btn {
background: #ffffff 0% 0% no-repeat padding-box !important;
border-radius: 30px;
opacity: 1;
width: 110px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
font-weight: 700;
color: var(--primary-color);
}

View File

@ -20,8 +20,6 @@ import { MatomoInjector } from 'ngx-matomo';
import { MatomoService } from './core/services/matomo/matomo-service'; import { MatomoService } from './core/services/matomo/matomo-service';
import { SideNavService } from './core/services/sidenav/side-nav.sevice'; import { SideNavService } from './core/services/sidenav/side-nav.sevice';
import { MatSidenav } from '@angular/material/sidenav'; import { MatSidenav } from '@angular/material/sidenav';
import { runInThisContext } from 'vm';
import * as moment from 'moment';
declare const gapi: any; declare const gapi: any;
@ -41,7 +39,7 @@ export class AppComponent implements OnInit, AfterViewInit {
private statusChangeSubscription: Subscription; private statusChangeSubscription: Subscription;
onlySplash = true; onlySplash = true;
@ViewChild('sidenav') sidenav: MatSidenav; @ViewChild('sidenav') sidenav:MatSidenav;
constructor( constructor(
private router: Router, private router: Router,
@ -54,7 +52,7 @@ export class AppComponent implements OnInit, AfterViewInit {
private cookieService: CookieService, private cookieService: CookieService,
private ccService: NgcCookieConsentService, private ccService: NgcCookieConsentService,
private language: LanguageService, private language: LanguageService,
public configurationService: ConfigurationService, private configurationService: ConfigurationService,
private location: Location, private location: Location,
private matomoService: MatomoService, private matomoService: MatomoService,
private sidenavService: SideNavService private sidenavService: SideNavService
@ -65,34 +63,34 @@ export class AppComponent implements OnInit, AfterViewInit {
} }
ngAfterViewInit(): void { ngAfterViewInit(): void {
setTimeout(() => { setTimeout(() => {
this.sideNavSubscription = this.sidenavService.status().subscribe(isopen => { this.sideNavSubscription = this.sidenavService.status().subscribe(isopen=>{
const hamburger = document.getElementById('hamburger'); const hamburger = document.getElementById('hamburger');
if (isopen) { if(isopen){
//update value of hamburfer //update value of hamburfer
if (!hamburger) {//try later if(!hamburger){//try later
setTimeout(() => { setTimeout(() => {
const hamburger = document.getElementById('hamburger'); const hamburger = document.getElementById('hamburger');
if (hamburger) { if(hamburger){
hamburger.classList.add('change'); hamburger.classList.add('change');
} }
}, 300); }, 300);
} else { }else{
hamburger.classList.add('change'); hamburger.classList.add('change');
} }
this.sidenav.open() this.sidenav.open()
} else {//closed }else{//closed
if (!hamburger) {//try later if(!hamburger){//try later
setTimeout(() => { setTimeout(() => {
const hamburger = document.getElementById('hamburger'); const hamburger = document.getElementById('hamburger');
if (hamburger) { if(hamburger){
hamburger.classList.remove('change'); hamburger.classList.remove('change');
} }
}, 300); }, 300);
} else { }else{
hamburger.classList.remove('change'); hamburger.classList.remove('change');
} }
this.sidenav.close(); this.sidenav.close();
} }
}); });
}); });
@ -122,8 +120,8 @@ export class AppComponent implements OnInit, AfterViewInit {
} }
if (!this.cookieService.check("cookiesConsent")) { if (!this.cookieService.check("cookiesConsent")) {
// this.cookieService.set("cookiesConsent", "false", 356); // this.cookieService.set("cookiesConsent", "false", 356);
this.cookieService.set("cookiesConsent", "false", 356, null, null, false, 'Lax'); this.cookieService.set("cookiesConsent", "false", 356,null,null,false, 'Lax');
} }
this.hasBreadCrumb = this.router.events.pipe( this.hasBreadCrumb = this.router.events.pipe(
@ -157,7 +155,7 @@ export class AppComponent implements OnInit, AfterViewInit {
this.statusChangeSubscription = this.ccService.statusChange$.subscribe((event: NgcStatusChangeEvent) => { this.statusChangeSubscription = this.ccService.statusChange$.subscribe((event: NgcStatusChangeEvent) => {
if (event.status == "dismiss") { if (event.status == "dismiss") {
// this.cookieService.set("cookiesConsent", "true", 365); // this.cookieService.set("cookiesConsent", "true", 365);
this.cookieService.set("cookiesConsent", "true", 356, null, null, false, 'Lax'); this.cookieService.set("cookiesConsent", "true", 356,null,null,false, 'Lax');
} }
}); });
@ -179,7 +177,7 @@ export class AppComponent implements OnInit, AfterViewInit {
} }
this.ccService.destroy(); this.ccService.destroy();
this.ccService.init(this.ccService.getConfig()); this.ccService.init(this.ccService.getConfig());
}); });
} }
translateTitle(ttl: string) { translateTitle(ttl: string) {
@ -198,7 +196,7 @@ export class AppComponent implements OnInit, AfterViewInit {
ngOnDestroy() { ngOnDestroy() {
this.statusChangeSubscription.unsubscribe(); this.statusChangeSubscription.unsubscribe();
if (this.sideNavSubscription) { if(this.sideNavSubscription){
this.sideNavSubscription.unsubscribe(); this.sideNavSubscription.unsubscribe();
} }
} }

View File

@ -4,7 +4,6 @@ import { UserInfoListingModel } from "../../user/user-info-listing";
export interface DatasetProfile { export interface DatasetProfile {
label: string; label: string;
type: string; type: string;
enablePrefilling: boolean;
sections: Section[]; sections: Section[];
pages: Page[]; pages: Page[];
status: number; status: number;

View File

@ -1,3 +0,0 @@
export enum AuthType {
BEARER = 'Bearer'
}

View File

@ -12,22 +12,11 @@ export interface AutoCompleteFieldData extends FieldData {
multiAutoComplete: boolean; multiAutoComplete: boolean;
} }
export interface AuthAutoCompleteData extends FieldData {
url: string;
method: string;
body: string;
path: string;
type: string;
}
export interface AutoCompleteSingleData extends FieldData { export interface AutoCompleteSingleData extends FieldData {
url: string; url: string;
optionsRoot: string; optionsRoot: string;
autoCompleteOptions: FieldDataOption; autoCompleteOptions: FieldDataOption;
autocompleteType: number; autocompleteType: number;
hasAuth: boolean;
method: string;
auth: AuthAutoCompleteData;
} }
export interface CheckBoxFieldData extends FieldData { export interface CheckBoxFieldData extends FieldData {

View File

@ -1,6 +0,0 @@
export enum HtmlMethod {
GET = 'GET',
POST = 'POST',
PUT = 'PUT',
PATCH = 'PATCH'
}

View File

@ -5,12 +5,6 @@ export interface DatasetProfileModel {
description: string; description: string;
} }
export interface DatasetProfileWithPrefillingModel {
id: string;
label: string;
enablePrefilling: boolean;
}
// export class DatasetProfileModel implements Serializable<DatasetProfileModel> { // export class DatasetProfileModel implements Serializable<DatasetProfileModel> {
// public id: String; // public id: String;
// public label: String; // public label: String;

View File

@ -3,7 +3,6 @@ import { BaseCriteria } from "../base-criteria";
export class DatasetProfileCriteria extends BaseCriteria { export class DatasetProfileCriteria extends BaseCriteria {
public id: String; public id: String;
public groupIds: string[]; public groupIds: string[];
public ids: string[];
public allVersions: boolean; public allVersions: boolean;
public finalized: boolean = true; public finalized: boolean = true;
public status: number; public status: number;

View File

@ -101,21 +101,6 @@ export class ConfigurationService extends BaseComponent {
return this._maxFileSizeInMB; return this._maxFileSizeInMB;
} }
private _newReleaseNotificationLink: number;
get newReleaseNotificationLink(): number {
return this._newReleaseNotificationLink;
}
private _newReleaseNotificationExpires: number;
get newReleaseNotificationExpires(): number {
return this._newReleaseNotificationExpires;
}
private _newReleaseNotificationVersionCode: number;
get newReleaseNotificationVersionCode(): number {
return this._newReleaseNotificationVersionCode;
}
public loadConfiguration(): Promise<any> { public loadConfiguration(): Promise<any> {
return new Promise((r, e) => { return new Promise((r, e) => {
@ -161,9 +146,6 @@ export class ConfigurationService extends BaseComponent {
this._matomoSiteId = config.matomo.siteId; this._matomoSiteId = config.matomo.siteId;
} }
this._maxFileSizeInMB = config.maxFileSizeInMB; this._maxFileSizeInMB = config.maxFileSizeInMB;
this._newReleaseNotificationExpires = config.newReleaseNotification?.expires;
this._newReleaseNotificationLink = config.newReleaseNotification?.link;
this._newReleaseNotificationVersionCode = config.newReleaseNotification?.versionCode;
} }
} }

View File

@ -1,9 +1,10 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { DataTableData } from '../../model/data-table/data-table-data'; import { DataTableData } from '../../model/data-table/data-table-data';
import { DataTableRequest } from '../../model/data-table/data-table-request'; import { DataTableRequest } from '../../model/data-table/data-table-request';
import { DatasetListingModel } from '../../model/dataset/dataset-listing'; import { DatasetListingModel } from '../../model/dataset/dataset-listing';
import { DatasetProfileModel, DatasetProfileWithPrefillingModel } from '../../model/dataset/dataset-profile'; import { DatasetProfileModel } from '../../model/dataset/dataset-profile';
import { DatasetCriteria } from '../../query/dataset/dataset-criteria'; import { DatasetCriteria } from '../../query/dataset/dataset-criteria';
import { ExploreDatasetCriteriaModel } from '../../query/explore-dataset/explore-dataset-criteria'; import { ExploreDatasetCriteriaModel } from '../../query/explore-dataset/explore-dataset-criteria';
import { BaseHttpService } from '../http/base-http.service'; import { BaseHttpService } from '../http/base-http.service';
@ -42,10 +43,6 @@ export class DatasetService {
return this.http.post<DatasetProfileModel[]>(this.configurationSevice.server + 'datasetprofiles/getAll', dataTableRequest); return this.http.post<DatasetProfileModel[]>(this.configurationSevice.server + 'datasetprofiles/getAll', dataTableRequest);
} }
getDatasetProfilesWithPrefilling(dataTableRequest: DataTableRequest<DatasetProfileCriteria>): Observable<DatasetProfileWithPrefillingModel[]> {
return this.http.post<DatasetProfileWithPrefillingModel[]>(this.configurationSevice.server + 'datasetprofiles/getAllWithPrefilling', dataTableRequest);
}
getDatasetProfilesUsedPaged(dataTableRequest: DataTableRequest<DatasetProfileCriteria>) { getDatasetProfilesUsedPaged(dataTableRequest: DataTableRequest<DatasetProfileCriteria>) {
return this.http.post<DataTableData<DatasetListingModel>>(this.actionUrl + 'datasetProfilesUsedByDatasets/paged', dataTableRequest); return this.http.post<DataTableData<DatasetListingModel>>(this.actionUrl + 'datasetProfilesUsedByDatasets/paged', dataTableRequest);
} }

View File

@ -20,10 +20,10 @@ export class PrefillingService {
} }
public getPrefillingDataset(pid: string, profileId: string, configId: string): Observable<DatasetWizardModel> { public getPrefillingDataset(pid: string, profileId: string, configId: string): Observable<DatasetWizardModel> {
return this.http.get<DatasetWizardModel>(this.actionUrl + 'generate/' + encodeURIComponent(pid) + '?configId=' + encodeURIComponent(configId) + '&profileId=' + encodeURIComponent(profileId), { headers: this.headers }); return this.http.get<DatasetWizardModel>(this.actionUrl + '/generate/' + encodeURIComponent(pid) + '?configId=' + encodeURIComponent(configId) + '&profileId=' + encodeURIComponent(profileId), { headers: this.headers });
} }
public getPrefillingDatasetUsingData(data: any, profileId: string, configId: string): Observable<DatasetWizardModel> { public getPrefillingDatasetUsingData(data: any, profileId: string, configId: string): Observable<DatasetWizardModel> {
return this.http.post<DatasetWizardModel>(this.actionUrl + 'generateUsingData' + '?configId=' + encodeURIComponent(configId) + '&profileId=' + encodeURIComponent(profileId), data, { headers: this.headers }); return this.http.post<DatasetWizardModel>(this.actionUrl + '/generateUsingData' + '?configId=' + encodeURIComponent(configId) + '&profileId=' + encodeURIComponent(profileId), data, { headers: this.headers });
} }
} }

View File

@ -37,6 +37,5 @@ export interface MultipleAutoCompleteConfiguration {
autoSelectFirstOptionOnBlur?: boolean; autoSelectFirstOptionOnBlur?: boolean;
appendClassToItem?: {class: string, applyFunc: (item:any) => boolean}[]; appendClassToItem?: {class: string, applyFunc: (item:any) => boolean}[];
canRemoveItem?: (selectedItem: any) => boolean;
} }

View File

@ -220,9 +220,6 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
if (changes['configuration'] && changes['configuration'].isFirstChange) { if (changes['configuration'] && changes['configuration'].isFirstChange) {
this.getSelectedItems(this.value); this.getSelectedItems(this.value);
}
if (changes['value'] && !changes['value'].isFirstChange()) {
this.getSelectedItems(this.value);
} }
} }
@ -483,10 +480,6 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
if (event != null) { if (event != null) {
event.stopPropagation(); event.stopPropagation();
} }
if (this.configuration.canRemoveItem != null && !this.configuration.canRemoveItem(item)) {
event.stopPropagation();
return;
}
const valueToDelete = this._valueToAssign(item); const valueToDelete = this._valueToAssign(item);
this.value = this.value.filter(x => this.stringify(x) !== this.stringify(valueToDelete)); //TODO, maybe we need to implement equality here differently. this.value = this.value.filter(x => this.stringify(x) !== this.stringify(valueToDelete)); //TODO, maybe we need to implement equality here differently.
this.optionRemoved.emit(item); this.optionRemoved.emit(item);

View File

@ -47,8 +47,7 @@ export class RichTextEditorComponent {
{ name: 'H3 header', class: '', tag: 'h3' }, { name: 'H3 header', class: '', tag: 'h3' },
{ name: 'H4 header', class: '', tag: 'h4' }, { name: 'H4 header', class: '', tag: 'h4' },
{ name: 'H5 header', class: '', tag: 'h5'}, { name: 'H5 header', class: '', tag: 'h5'},
{ name: 'H6 header', class: '', tag: 'h6'}, { name: 'H6 header', class: '', tag: 'h6'}
{ name: 'Highlight', class: 'highlight', tag: ''}
], ],
toolbarHiddenButtons: [ toolbarHiddenButtons: [
[ [
@ -57,7 +56,7 @@ export class RichTextEditorComponent {
], ],
[ [
'fontSize', 'fontSize',
'backgroundColor', // 'backgroundColor',
// 'customClasses', // 'customClasses',
'insertImage', 'insertImage',
'insertVideo', 'insertVideo',

View File

@ -1,35 +0,0 @@
import { FormGroup, Validators } from "@angular/forms";
import { FieldDataEditorModel } from "./field-data-editor-model";
import { AuthAutoCompleteData, AutoCompleteSingleData } from "@app/core/model/dataset-profile-definition/field-data/field-data";
export class AuthFieldEditorModel extends FieldDataEditorModel<AuthFieldEditorModel> {
url: string;
method: string;
body: string;
path: string;
type: string;
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
const formGroup = this.formBuilder.group({
method: [{ value: this.method, disabled: (disabled && !skipDisable.includes('AuthFieldEditorModel.method')) }],
url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AuthFieldEditorModel.url')) }, [Validators.required]],
body: [{ value: this.body, disabled: (disabled && !skipDisable.includes('AuthFieldEditorModel.body')) }],
path: [{ value: this.path, disabled: (disabled && !skipDisable.includes('AuthFieldEditorModel.path')) }, [Validators.required]],
type: [{ value: this.type, disabled: (disabled && !skipDisable.includes('AuthFieldEditorModel.type')) }, [Validators.required]]
});
return formGroup;
}
fromModel(item: AuthAutoCompleteData): AuthFieldEditorModel {
if (item) {
this.url = item.url;
this.method = item.method;
this.body = item.body;
this.path = item.path;
this.type = item.type;
}
return this;
}
}

View File

@ -3,7 +3,6 @@ import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profil
import { FieldDataOptionEditorModel } from './field-data-option-editor-model'; import { FieldDataOptionEditorModel } from './field-data-option-editor-model';
import { FormGroup, Validators } from '@angular/forms'; import { FormGroup, Validators } from '@angular/forms';
import { AutoCompleteFieldData, AutoCompleteSingleData } from '@app/core/model/dataset-profile-definition/field-data/field-data'; import { AutoCompleteFieldData, AutoCompleteSingleData } from '@app/core/model/dataset-profile-definition/field-data/field-data';
import { AuthFieldEditorModel } from './auto-complete-auth-field-data.model';
export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<AutoCompleteSingleDataEditorModel> { export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<AutoCompleteSingleDataEditorModel> {
@ -12,9 +11,6 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<Auto
public autoCompleteOptions: FieldDataOptionEditorModel = new FieldDataOptionEditorModel(); public autoCompleteOptions: FieldDataOptionEditorModel = new FieldDataOptionEditorModel();
public autoCompleteType: number; public autoCompleteType: number;
public method: string;
public hasAuth: boolean;
public auth: AuthFieldEditorModel = new AuthFieldEditorModel();
//public multiAutoCompleteOptions: FieldDataOptionEditorModel = new FieldDataOptionEditorModel(); //public multiAutoCompleteOptions: FieldDataOptionEditorModel = new FieldDataOptionEditorModel();
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup { buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
@ -22,12 +18,9 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<Auto
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.label')) }], label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.label')) }],
url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) },[Validators.required]], url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) },[Validators.required]],
optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }, [Validators.required]], optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }, [Validators.required]],
autoCompleteType: [{ value: this.autoCompleteType, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.autoCompleteType')) }], autoCompleteType: [{ value: this.autoCompleteType, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.autoCompleteType')) }]
hasAuth: [{ value: this.hasAuth, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.hasAuth')) }],
method: [{ value: this.method, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.method')) }]
}); });
formGroup.addControl('autoCompleteOptions', this.autoCompleteOptions.buildForm(disabled, skipDisable)); formGroup.addControl('autoCompleteOptions', this.autoCompleteOptions.buildForm(disabled, skipDisable));
formGroup.addControl('auth', this.auth.buildForm(disabled, skipDisable));
return formGroup; return formGroup;
} }
@ -37,10 +30,7 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<Auto
this.label = item.label; this.label = item.label;
this.optionsRoot = item.optionsRoot; this.optionsRoot = item.optionsRoot;
this.autoCompleteType = item.autocompleteType; this.autoCompleteType = item.autocompleteType;
this.hasAuth = item.hasAuth;
this.method = item.method ? item.method : 'GET';
this.autoCompleteOptions = new FieldDataOptionEditorModel().fromModel(item.autoCompleteOptions); this.autoCompleteOptions = new FieldDataOptionEditorModel().fromModel(item.autoCompleteOptions);
this.auth = new AuthFieldEditorModel().fromModel(item.auth);
return this; return this;
} }
} }

View File

@ -11,47 +11,41 @@
[formControl]="form.get('data').get('label')"> [formControl]="form.get('data').get('label')">
</mat-form-field> </mat-form-field>
<h6 class="col-12" style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE-TITLE' | translate}}</h6> <h6 class="col-12" style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE-TITLE' | translate}}</h6>
<div class="col-12 d-flex align-items-center" style="margin-bottom: 1em;"> <div class="col-12 d-flex align-items-center" style="margin-bottom: 1em;">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
(click)="addSource()" (click)="addSource()"
style="margin-right: 2em;" style="margin-right: 2em;"
> >
<!-- [ngClass]="{'text-danger':form.get('data').errors?.emptyArray && form.touched}" --> <!-- [ngClass]="{'text-danger':form.get('data').errors?.emptyArray && form.touched}" -->
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-ADD_SOURCE' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-ADD_SOURCE' | translate}}
</button> </button>
<!-- *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched" --> <!-- *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched" -->
<div class="d-flex" *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched"> <div class="d-flex" *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched">
<mat-icon <mat-icon
class="text-danger" class="text-danger"
matTooltip="At least one source must be provided." matTooltip="At least one source must be provided."
>warning_amber</mat-icon> >warning_amber</mat-icon>
<small class="text-danger">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.ERROR-MESSAGES.FIELD-OTHER-SOURCES-REQUIRED'| translate}}</small> <small class="text-danger">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.ERROR-MESSAGES.FIELD-OTHER-SOURCES-REQUIRED'| translate}}</small>
</div> </div>
</div> </div>
</div> </div>
<div *ngFor="let singleForm of multiForm.controls; let i = index" class="row"> <div *ngFor="let singleForm of multiForm.controls; let i = index" class="row">
<!-- <mat-form-field class="col-12"> <mat-form-field class="col-12">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE' | translate}}</mat-label>
<mat-select [formControl]="singleForm.get('autoCompleteType')"> <mat-select [formControl]="singleForm.get('autoCompleteType')">
<mat-option [value]="0">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-UNCACHED' | translate}}</mat-option> <mat-option [value]="0">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-UNCACHED' | translate}}</mat-option>
<mat-option [value]="1">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-CACHED' | translate}}</mat-option> <mat-option [value]="1">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-CACHED' | translate}}</mat-option>
</mat-select> </mat-select>
</mat-form-field> -->
<mat-form-field class="col-md-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-METHOD' | translate}}</mat-label>
<mat-select [formControl]="singleForm.get('method')">
<mat-option *ngFor="let method of htmlMethods | keyvalue" [value]="method.value">{{method.value}}</mat-option>
</mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field class="col-md-6"> <mat-form-field class="col-md-12">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label>
<input matInput [formControl]="singleForm.get('url')"> <input matInput [formControl]="singleForm.get('url')">
<mat-error *ngIf="singleForm.get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="singleForm.get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
@ -76,37 +70,6 @@
<input matInput [formControl]="singleForm.get('autoCompleteOptions').get('source')"> <input matInput [formControl]="singleForm.get('autoCompleteOptions').get('source')">
<mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-checkbox class="col-12" [formControl]="singleForm.get('hasAuth')">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-HAS-AUTH' | translate}}</mat-checkbox>
<div *ngIf="singleForm.get('hasAuth').value === true" class="row">
<mat-form-field class="col-md-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-METHOD' | translate}}</mat-label>
<mat-select [formControl]="singleForm.get('auth').get('method')">
<mat-option *ngFor="let method of htmlMethods | keyvalue" [value]="method.value">{{method.value}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="col-md-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label>
<input matInput [formControl]="singleForm.get('auth').get('url')">
<mat-error *ngIf="singleForm.get('auth').get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
<mat-form-field class="col-md-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-TYPE' | translate}}</mat-label>
<mat-select [formControl]="singleForm.get('auth').get('type')">
<mat-option *ngFor="let type of authTypes | keyvalue" [value]="type.value">{{type.value}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="col-md-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}}</mat-label>
<input matInput [formControl]="singleForm.get('auth').get('path')">
<mat-error *ngIf="singleForm.get('auth').get('path').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
<mat-form-field class="col-md-12">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-BODY' | translate}}</mat-label>
<textarea matInput [formControl]="singleForm.get('auth').get('body')"></textarea>
<mat-error *ngIf="singleForm.get('auth').get('body').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<button mat-button type="button" (click)="removeSource(i)"><mat-icon>delete</mat-icon></button> <button mat-button type="button" (click)="removeSource(i)"><mat-icon>delete</mat-icon></button>
</div> </div>

View File

@ -3,8 +3,6 @@ import { FormGroup, FormArray, AbstractControl } from '@angular/forms';
import { DatasetProfileComboBoxType } from '../../../../../../../core/common/enum/dataset-profile-combo-box-type'; import { DatasetProfileComboBoxType } from '../../../../../../../core/common/enum/dataset-profile-combo-box-type';
import { AutoCompleteFieldDataEditorModel } from '../../../../admin/field-data/auto-complete-field-data-editor-model'; import { AutoCompleteFieldDataEditorModel } from '../../../../admin/field-data/auto-complete-field-data-editor-model';
import { AutoCompleteSingleDataEditorModel } from '@app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data'; import { AutoCompleteSingleDataEditorModel } from '@app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data';
import { HtmlMethod } from '@app/core/model/dataset-profile-definition/html-method.enum';
import { AuthType } from '@app/core/model/dataset-profile-definition/auth-type.enum';
@Component({ @Component({
selector: 'app-dataset-profile-editor-auto-complete-field-component', selector: 'app-dataset-profile-editor-auto-complete-field-component',
@ -13,9 +11,6 @@ import { AuthType } from '@app/core/model/dataset-profile-definition/auth-type.e
}) })
export class DatasetProfileEditorAutoCompleteFieldComponent implements OnInit { export class DatasetProfileEditorAutoCompleteFieldComponent implements OnInit {
public htmlMethods = HtmlMethod;
public authTypes = AuthType;
@Input() form: FormGroup; @Input() form: FormGroup;
private data: AutoCompleteFieldDataEditorModel = new AutoCompleteFieldDataEditorModel(); private data: AutoCompleteFieldDataEditorModel = new AutoCompleteFieldDataEditorModel();
multiForm: FormArray; multiForm: FormArray;

View File

@ -30,7 +30,7 @@
<input matInput [formControl]="form.get('data').get('options').get(''+i).get('value')"> <input matInput [formControl]="form.get('data').get('options').get(''+i).get('value')">
</mat-form-field> </mat-form-field>
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button" <button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"
[disabled]="form.get('data').get('options').get(''+i).get('label').disabled || form.get('data').get('options').get(''+i).get('value').disabled"> [disabled]="this.form.disabled">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div> </div>

View File

@ -16,7 +16,6 @@ export class DatasetProfileEditorModel extends BaseFormModel {
public version: number; public version: number;
private description: string; private description: string;
private type: string; private type: string;
public enablePrefilling: boolean;
private language: string; private language: string;
private users: UserInfoListingModel[] = []; private users: UserInfoListingModel[] = [];
@ -25,7 +24,6 @@ export class DatasetProfileEditorModel extends BaseFormModel {
if (item.pages) { this.pages = item.pages.map(x => new PageEditorModel().fromModel(x)); } if (item.pages) { this.pages = item.pages.map(x => new PageEditorModel().fromModel(x)); }
this.label = item.label; this.label = item.label;
this.type = item.type; this.type = item.type;
this.enablePrefilling = item.enablePrefilling;
this.status = item.status; this.status = item.status;
this.version = item.version; this.version = item.version;
this.description = item.description; this.description = item.description;
@ -39,7 +37,6 @@ export class DatasetProfileEditorModel extends BaseFormModel {
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.label')) }, [Validators.required]], label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.label')) }, [Validators.required]],
description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.description')) }, [Validators.required]], description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.description')) }, [Validators.required]],
type: [{ value: this.type, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.type')) }, [Validators.required]], type: [{ value: this.type, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.type')) }, [Validators.required]],
enablePrefilling: [{ value: this.enablePrefilling, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.enablePrefilling')) }, []],
language: [{ value: this.language, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.language')) }, [Validators.required]], language: [{ value: this.language, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.language')) }, [Validators.required]],
status: [{ value: this.status, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.status')) }], status: [{ value: this.status, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.status')) }],
version: [{ value: this.version, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.version')) }], version: [{ value: this.version, disabled: (disabled && !skipDisable.includes('DatasetProfileEditorModel.version')) }],

View File

@ -170,15 +170,7 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="heading">1.5 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-PREFILLING'| translate}}</div> <div class="heading">1.5 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
<div class="full-width basic-info-input">
<mat-checkbox [formControl]="form.get('enablePrefilling')">
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-ENABLE-PREFILLING'| translate}}
</mat-checkbox>
</div>
</div>
<div class="col-12">
<div class="heading">1.6 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS-HINT'| translate}}</div> <div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS-HINT'| translate}}</div>
<div class="full-width basic-info-input"> <div class="full-width basic-info-input">
<table class="col-12 user-table"> <table class="col-12 user-table">

View File

@ -214,7 +214,6 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
); );
} else { } else {
this.dataModel = new DatasetProfileEditorModel(); this.dataModel = new DatasetProfileEditorModel();
this.dataModel.enablePrefilling = true;
this.form = this.dataModel.buildForm(); this.form = this.dataModel.buildForm();
// this.form.setValidators([EditorCustomValidators.atLeastOneElementListValidator('pages'), EditorCustomValidators.pagesHaveAtLeastOneSection('pages', 'sections')]); // this.form.setValidators([EditorCustomValidators.atLeastOneElementListValidator('pages'), EditorCustomValidators.pagesHaveAtLeastOneSection('pages', 'sections')]);

View File

@ -5,15 +5,15 @@ import { ValidationErrorModel } from "@common/forms/validation/error-model/valid
import { ValidationContext } from "@common/forms/validation/validation-context"; import { ValidationContext } from "@common/forms/validation/validation-context";
export class DmpBlueprintEditor { export class DmpBlueprintEditor {
public id: string; public id: string;
public label: string; public label: string;
public definition: DmpBlueprintDefinitionEditor = new DmpBlueprintDefinitionEditor(); public definition: DmpBlueprintDefinitionEditor = new DmpBlueprintDefinitionEditor();
public status: number; public status: number;
public created: Date; public created: Date;
public modified: Date; public modified: Date;
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
fromModel(item: DmpBlueprint): DmpBlueprintEditor { fromModel(item: DmpBlueprint): DmpBlueprintEditor {
this.id = item.id; this.id = item.id;
this.label = item.label; this.label = item.label;
this.definition = new DmpBlueprintDefinitionEditor().fromModel(item.definition); this.definition = new DmpBlueprintDefinitionEditor().fromModel(item.definition);
@ -51,9 +51,9 @@ export class DmpBlueprintEditor {
export class DmpBlueprintDefinitionEditor { export class DmpBlueprintDefinitionEditor {
public sections: SectionDmpBlueprintEditor[] = new Array<SectionDmpBlueprintEditor>(); public sections: SectionDmpBlueprintEditor[] = new Array<SectionDmpBlueprintEditor>();
fromModel(item: DmpBlueprintDefinition): DmpBlueprintDefinitionEditor { fromModel(item: DmpBlueprintDefinition): DmpBlueprintDefinitionEditor {
if (item.sections) { item.sections.map(x => this.sections.push(new SectionDmpBlueprintEditor().fromModel(x))); } if (item.sections) { item.sections.map(x => this.sections.push(new SectionDmpBlueprintEditor().fromModel(x))); }
return this; return this;
} }
@ -62,7 +62,7 @@ export class DmpBlueprintDefinitionEditor {
const formBuilder = new FormBuilder(); const formBuilder = new FormBuilder();
const formGroup = formBuilder.group({}); const formGroup = formBuilder.group({});
const sectionsFormArray = new Array<FormGroup>(); const sectionsFormArray = new Array<FormGroup>();
this.sections.sort((a, b) => a.ordinal - b.ordinal).forEach(item => { this.sections.forEach(item => {
const form: FormGroup = item.buildForm(); const form: FormGroup = item.buildForm();
sectionsFormArray.push(form); sectionsFormArray.push(form);
}); });
@ -72,23 +72,23 @@ export class DmpBlueprintDefinitionEditor {
} }
export class SectionDmpBlueprintEditor { export class SectionDmpBlueprintEditor {
public id: string; public id: string;
public label: string; public label: string;
public description: string; public description: string;
public ordinal: number; public ordinal: number;
public fields: FieldInSectionEditor[] = new Array<FieldInSectionEditor>(); public fields: FieldInSectionEditor[] = new Array<FieldInSectionEditor>();
public hasTemplates: boolean; public hasTemplates: boolean;
public descriptionTemplates: DescriptionTemplatesInSectionEditor[] = new Array<DescriptionTemplatesInSectionEditor>(); public descriptionTemplates: DescriptionTemplatesInSectionEditor[] = new Array<DescriptionTemplatesInSectionEditor>();
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
fromModel(item: SectionDmpBlueprint): SectionDmpBlueprintEditor { fromModel(item: SectionDmpBlueprint): SectionDmpBlueprintEditor {
this.id = item.id; this.id = item.id;
this.label = item.label; this.label = item.label;
this.description = item.description; 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))); } if (item.fields) { item.fields.map(x => this.fields.push(new FieldInSectionEditor().fromModel(x))); }
this.hasTemplates = item.hasTemplates; 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; return this;
} }
@ -101,14 +101,14 @@ export class SectionDmpBlueprintEditor {
ordinal: [{ value: this.ordinal, disabled: disabled }, context.getValidation('ordinal')], ordinal: [{ value: this.ordinal, disabled: disabled }, context.getValidation('ordinal')],
hasTemplates: [{ value: this.hasTemplates, disabled: disabled }, context.getValidation('hasTemplates')] hasTemplates: [{ value: this.hasTemplates, disabled: disabled }, context.getValidation('hasTemplates')]
}); });
const formBuilder = new FormBuilder(); const formBuilder = new FormBuilder();
const fieldsFormArray = new Array<FormGroup>(); const fieldsFormArray = new Array<FormGroup>();
this.fields.sort((a, b) => a.ordinal - b.ordinal).forEach(item => { this.fields.forEach(item => {
const form: FormGroup = item.buildForm(); const form: FormGroup = item.buildForm();
fieldsFormArray.push(form); fieldsFormArray.push(form);
}); });
formGroup.addControl('fields', formBuilder.array(fieldsFormArray)); formGroup.addControl('fields', formBuilder.array(fieldsFormArray));
const descriptionTemplatesFormArray = new Array<FormGroup>(); const descriptionTemplatesFormArray = new Array<FormGroup>();
this.descriptionTemplates.forEach(item => { this.descriptionTemplates.forEach(item => {
const form: FormGroup = item.buildForm(); const form: FormGroup = item.buildForm();
descriptionTemplatesFormArray.push(form); descriptionTemplatesFormArray.push(form);
@ -130,25 +130,25 @@ export class SectionDmpBlueprintEditor {
} }
export class FieldInSectionEditor { export class FieldInSectionEditor {
public id: string; public id: string;
public category: FieldCategory; public category: FieldCategory;
public type: number; public type: number;
public label: string; public label: string;
public placeholder: string; public placeholder: string;
public description: string; public description: string;
public required: boolean; public required: boolean;
public ordinal: number; public ordinal: number;
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
fromModel(item: FieldInSection): FieldInSectionEditor { fromModel(item: FieldInSection): FieldInSectionEditor {
this.id = item.id; this.id = item.id;
this.category = item.category; this.category = item.category;
this.type = item.type; this.type = item.type;
this.label = item.label; this.label = item.label;
this.placeholder = item.placeholder; this.placeholder = item.placeholder;
this.description = item.description; this.description = item.description;
this.required = item.required; this.required = item.required;
this.ordinal = item.ordinal; this.ordinal = item.ordinal;
return this; return this;
} }
@ -182,19 +182,19 @@ export class FieldInSectionEditor {
} }
export class DescriptionTemplatesInSectionEditor { export class DescriptionTemplatesInSectionEditor {
public id: string; public id: string;
public descriptionTemplateId: string; public descriptionTemplateId: string;
public label: string; public label: string;
public minMultiplicity: number; public minMultiplicity: number;
public maxMultiplicity: number; public maxMultiplicity: number;
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
fromModel(item: DescriptionTemplatesInSection): DescriptionTemplatesInSectionEditor { fromModel(item: DescriptionTemplatesInSection): DescriptionTemplatesInSectionEditor {
this.id = item.id; this.id = item.id;
this.descriptionTemplateId = item.descriptionTemplateId; this.descriptionTemplateId = item.descriptionTemplateId;
this.label = item.label; this.label = item.label;
this.minMultiplicity = item.minMultiplicity; this.minMultiplicity = item.minMultiplicity;
this.maxMultiplicity = item.maxMultiplicity; this.maxMultiplicity = item.maxMultiplicity;
return this; return this;
} }
@ -253,4 +253,4 @@ export class DescriptionTemplatesInSectionEditor {
// }); // });
// return formGroup; // return formGroup;
// } // }
// } // }

View File

@ -222,7 +222,7 @@
<div class="col-12"> <div class="col-12">
<mat-form-field> <mat-form-field>
<mat-label>Description Templates</mat-label> <mat-label>Description Templates</mat-label>
<app-multiple-auto-complete placeholder="Description Templates" [disabled]="viewOnly" [value]="descriptionTemplatesPerSection[sectionIndex]" [hidePlaceholder]="true" required='false' [configuration]="profilesAutoCompleteConfiguration" (optionRemoved)="onRemoveTemplate($event, sectionIndex)" (optionActionClicked)="onPreviewTemplate($event, sectionIndex)" (optionSelected)="onOptionSelected($event, sectionIndex)"> <app-multiple-auto-complete placeholder="Description Templates" [disabled]="viewOnly" [value]="descriptionTemplatesPerSection[sectionIndex]" [hidePlaceholder]="true" required='false' [configuration]="profilesAutoCompleteConfiguration" (optionRemoved)="onRemoveTemplate($event, sectionIndex)" (optionSelected)="onOptionSelected($event, sectionIndex)">
</app-multiple-auto-complete> </app-multiple-auto-complete>
<!-- <button matSuffix class="input-btn" (click)="allAvailableProfiles($event)"> <!-- <button matSuffix class="input-btn" (click)="allAvailableProfiles($event)">
<mat-icon class="icon-btn">view_list</mat-icon> <mat-icon class="icon-btn">view_list</mat-icon>

View File

@ -141,7 +141,6 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
data => { data => {
this.dmpBlueprintModel = new DmpBlueprintEditor().fromModel(data); this.dmpBlueprintModel = new DmpBlueprintEditor().fromModel(data);
this.dmpBlueprintModel.id = null; this.dmpBlueprintModel.id = null;
this.dmpBlueprintModel.created = null;
this.dmpBlueprintModel.status = DmpProfileStatus.Draft; this.dmpBlueprintModel.status = DmpProfileStatus.Draft;
this.formGroup = this.dmpBlueprintModel.buildForm(); this.formGroup = this.dmpBlueprintModel.buildForm();
this.buildSystemFields(); this.buildSystemFields();
@ -219,12 +218,10 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
section.hasTemplates = false; section.hasTemplates = false;
this.sectionsArray().push(section.buildForm()); this.sectionsArray().push(section.buildForm());
this.systemFieldListPerSection.push(new Array()); this.systemFieldListPerSection.push(new Array());
this.descriptionTemplatesPerSection.push(new Array());
} }
removeSection(sectionIndex: number): void { removeSection(sectionIndex: number): void {
this.systemFieldListPerSection.splice(sectionIndex, 1); this.systemFieldListPerSection.splice(sectionIndex, 1);
this.descriptionTemplatesPerSection.splice(sectionIndex, 1);
this.sectionsArray().removeAt(sectionIndex); this.sectionsArray().removeAt(sectionIndex);
this.sectionsArray().controls.forEach((section, index) => { this.sectionsArray().controls.forEach((section, index) => {
section.get('ordinal').setValue(index + 1); section.get('ordinal').setValue(index + 1);
@ -249,9 +246,6 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
removeField(sectionIndex: number, fieldIndex: number): void { removeField(sectionIndex: number, fieldIndex: number): void {
this.fieldsArray(sectionIndex).removeAt(fieldIndex); this.fieldsArray(sectionIndex).removeAt(fieldIndex);
this.fieldsArray(sectionIndex).controls.forEach((field, index) => {
field.get('ordinal').setValue(index + 1);
});
} }
systemFieldsArray(sectionIndex: number): FormArray { systemFieldsArray(sectionIndex: number): FormArray {
@ -279,7 +273,6 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
} }
selectedFieldType(type: SystemFieldType, sectionIndex: number): void { selectedFieldType(type: SystemFieldType, sectionIndex: number): void {
if (this.systemFieldDisabled(type, sectionIndex)) return;
let index = this.systemFieldListPerSection[sectionIndex].indexOf(type); let index = this.systemFieldListPerSection[sectionIndex].indexOf(type);
if (index == -1) { if (index == -1) {
this.systemFieldListPerSection[sectionIndex].push(type); this.systemFieldListPerSection[sectionIndex].push(type);
@ -369,9 +362,6 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
drop(event: CdkDragDrop<string[]>, sectionIndex: number) { drop(event: CdkDragDrop<string[]>, sectionIndex: number) {
moveItemInArray(this.fieldsArray(sectionIndex).controls, event.previousIndex, event.currentIndex); moveItemInArray(this.fieldsArray(sectionIndex).controls, event.previousIndex, event.currentIndex);
moveItemInArray(this.fieldsArray(sectionIndex).value, 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<string[]>) { dropSections(event: CdkDragDrop<string[]>) {
@ -380,8 +370,6 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
this.sectionsArray().controls.forEach((section, index) => { this.sectionsArray().controls.forEach((section, index) => {
section.get('ordinal').setValue(index + 1); section.get('ordinal').setValue(index + 1);
}); });
moveItemInArray(this.systemFieldListPerSection, event.previousIndex, event.currentIndex);
moveItemInArray(this.descriptionTemplatesPerSection, event.previousIndex, event.currentIndex);
} }
moveItemInFormArray(formArray: FormArray, fromIndex: number, toIndex: number): void { moveItemInFormArray(formArray: FormArray, fromIndex: number, toIndex: number): void {
@ -405,30 +393,36 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
foundIndex !== -1 && this.descriptionTemplatesArray(sectionIndex).removeAt(foundIndex); foundIndex !== -1 && this.descriptionTemplatesArray(sectionIndex).removeAt(foundIndex);
} }
onPreviewTemplate(event, sectionIndex: number) { // onPreviewTemplate(event, sectionIndex: number) {
const dialogRef = this.dialog.open(DatasetPreviewDialogComponent, { // const dialogRef = this.dialog.open(DatasetPreviewDialogComponent, {
width: '590px', // width: '590px',
minHeight: '200px', // minHeight: '200px',
restoreFocus: false, // restoreFocus: false,
data: { // data: {
template: event // template: event
}, // },
panelClass: 'custom-modalbox' // panelClass: 'custom-modalbox'
}); // });
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { // dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) { // if (result) {
const profile: DescriptionTemplatesInSectionEditor = new DescriptionTemplatesInSectionEditor(); // let profiles = this.sectionsArray().at(sectionIndex).get('descriptionTemplates').value;//this.formGroup.get('profiles').value;
profile.id = Guid.create().toString(); // const profile: DescriptionTemplatesInSectionEditor = new DescriptionTemplatesInSectionEditor();
profile.descriptionTemplateId = event.id; // profile.id = Guid.create().toString();
profile.label = event.label; // profile.descriptionTemplateId = event.id;
this.descriptionTemplatesArray(sectionIndex).push(profile.buildForm()); // profile.label = event.label;
// profiles.push(profile.buildForm());
const items = this.descriptionTemplatesPerSection[sectionIndex]; // this.sectionsArray().at(sectionIndex).get('descriptionTemplates').setValue(profiles);//this.formGroup.get('profiles').setValue(profiles);
items.push({id: event.id, label: event.label, description: ""}); // this.profilesAutoCompleteConfiguration = {
this.descriptionTemplatesPerSection[sectionIndex] = [...items]; // filterFn: this.filterProfiles.bind(this),
} // initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
}); // displayFn: (item) => item['label'],
} // titleFn: (item) => item['label'],
// subtitleFn: (item) => item['description'],
// popupItemActionIcon: 'visibility'
// };
// }
// });
// }
onOptionSelected(item, sectionIndex){ onOptionSelected(item, sectionIndex){
const profile: DescriptionTemplatesInSectionEditor = new DescriptionTemplatesInSectionEditor(); const profile: DescriptionTemplatesInSectionEditor = new DescriptionTemplatesInSectionEditor();

View File

@ -1,28 +1,8 @@
<div class="main-content dashboard-main-container h-100" [class.non-auth-main-container]="!this.isAuthenticated()"> <div class="main-content dashboard-main-container h-100" [class.non-auth-main-container]="!this.isAuthenticated()">
<div *ngIf="this.isAuthenticated()" class="container-fluid"> <div *ngIf="this.isAuthenticated()" class="container-fluid">
<div *ngIf="this.dashboardStatisticsData"> <div *ngIf="this.dashboardStatisticsData">
<div class="main-content"> <div class="main-content">
<div class="col"> <div class="col">
<div class="row">
<div *ngIf="newReleaseNotificationVisible" class="new-releases-card col-auto mt-0 mr-4" [style.display]="isVisible ? 'block' : 'none'">
<a class="col-auto d-flex" (click)="dismissNewReleaseNotification()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div class="row new-releases-hint-container m-0">
<p class="new-releases-chip mb-0 col-auto">{{'NEW-RELEASE-NOTIFICATION.HINT' | translate}}</p>
</div>
<p class="new-releases-title mb-0 pt-4">{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}</p>
<p class="new-releases-content mb-0">{{'NEW-RELEASE-NOTIFICATION.BODY' | translate}}</p>
<div class="row d-flex align-items-center mt-4" *ngIf="this.configurationService.newReleaseNotificationLink">
<div class="col-auto d-flex">
<a class="notification-link" href="{{this.configurationService.newReleaseNotificationLink}}" target="_blank">
<button mat-raised-button type="button" class="col-auto align-self-center new-releases-btn">{{'NEW-RELEASE-NOTIFICATION.ACTIONS.LEARN-MORE' | translate}}</button>
</a>
</div>
<span class="new-releases-logo">
<img src="../../../assets/images/new-releases-logo.png">
</span>
</div>
</div>
<div class="card col-auto mt-0" [style.display]="isVisible ? 'block' : 'none'"> <div class="card col-auto mt-0" [style.display]="isVisible ? 'block' : 'none'">
<a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a> <a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
@ -49,156 +29,158 @@
</span> </span>
</div> </div>
</div> </div>
<div *ngIf="this.hasDmps()" class="col">
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom"
[selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
<!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">-->
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<!-- <mat-tab aria-label="draft" label="{{'DASHBOARD.DRAFTS' | translate}} ({{totalDraftDatasets}})">-->
<mat-tab aria-label="drafts" label="{{'DASHBOARD.DRAFTS' | translate}}">
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)" [isActive]="currentType == 'drafts'"></app-drafts>
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>>
<!-- <mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}} ({{totalDmps}})">-->
<mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}}">
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}} ({{totalDatasets}})">-->
<mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}">
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'datasets'"></app-recent-edited-dataset-activity>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" (click)="addNewDataset()">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div>
</mat-tab>
</mat-tab-group>
</div>
</div> </div>
<div *ngIf="this.hasDmps()" class="col"> <!-- Right Sidebar -->
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div> <div *ngIf="!this.hasDmps()" class="col-auto ml-auto stats">
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom" [selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel"> <div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">--> <div class="counter-zero">0</div>
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}"> <a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity> <div class="counter-zero">0</div>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> <a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
</mat-tab> <div class="counter-zero">0</div>
<!-- <mat-tab aria-label="draft" label="{{'DASHBOARD.DRAFTS' | translate}} ({{totalDraftDatasets}})">--> <a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<mat-tab aria-label="drafts" label="{{'DASHBOARD.DRAFTS' | translate}}"> <div class="counter-zero">0</div>
<app-drafts (totalCountDraftDatasets)="onCountDraftDatasets($event)" [isActive]="currentType == 'drafts'"></app-drafts> <a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> </div>
</mat-tab>>
<!-- <mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}} ({{totalDmps}})">--> <div *ngIf="this.hasDmps()" class="col-auto stats">
<mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}}"> <div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity> <div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> {{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
</mat-tab> <a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}} ({{totalDatasets}})">--> <div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
<mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}"> {{dashboardStatisticsData?.totalDataSetCount}}</div>
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'datasets'"></app-recent-edited-dataset-activity> <a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> <div [ngClass]="{'counter': dashboardStatisticsData?.totalGrantCount != 0, 'counter-zero': dashboardStatisticsData?.totalGrantCount == 0}">
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center"> {{dashboardStatisticsData?.totalGrantCount}}</div>
<button mat-raised-button class="add-dataset" (click)="addNewDataset()"> <a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}} <div [ngClass]="{'counter': dashboardStatisticsData?.totalOrganisationCount != 0, 'counter-zero': dashboardStatisticsData?.totalOrganisationCount == 0}">
</button> {{dashboardStatisticsData?.totalOrganisationCount}}</div>
</div> <a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</mat-tab>
</mat-tab-group>
</div> </div>
</div> </div>
<!-- Right Sidebar -->
<div *ngIf="!this.hasDmps()" class="col-auto ml-auto stats">
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<div class="counter-zero">0</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div class="counter-zero">0</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div class="counter-zero">0</div>
<a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<div class="counter-zero">0</div>
<a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
<div *ngIf="this.hasDmps()" class="col-auto stats">
<div class="personal-usage">{{'DASHBOARD.PERSONAL-USAGE' | translate}}</div>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
{{dashboardStatisticsData?.totalDataSetCount}}</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalGrantCount != 0, 'counter-zero': dashboardStatisticsData?.totalGrantCount == 0}">
{{dashboardStatisticsData?.totalGrantCount}}</div>
<a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalOrganisationCount != 0, 'counter-zero': dashboardStatisticsData?.totalOrganisationCount == 0}">
{{dashboardStatisticsData?.totalOrganisationCount}}</div>
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
</div> </div>
</div> <div>
<div class="main-content">
<div>
<div class="main-content">
</div>
</div> </div>
</div> </div>
</div>
<!-- Home screen on log out --> <!-- Home screen on log out -->
<div class="col p-0" *ngIf="!this.isAuthenticated()"> <div class="col p-0" *ngIf="!this.isAuthenticated()">
<div class="col-auto"> <div class="col-auto">
<!-- <div class="row"> <!-- <div class="row">
<div class="col header-text-container"> <div class="col header-text-container">
<h3>{{ 'ABOUT.WELCOME' | translate }}</h3> <h3>{{ 'ABOUT.WELCOME' | translate }}</h3>
<h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4> <h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4>
</div> </div>
</div> --> </div> -->
<div class="main-content"> <div class="main-content">
<div class="col"> <div class="col">
<div class="row"> <div class="row">
<div class="col d-flex flex-column"> <div class="col d-flex flex-column">
<div class="card non-auth-card" [style.display]="isVisible ? 'block' : 'none'"> <div class="card non-auth-card" [style.display]="isVisible ? 'block' : 'none'">
<a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a> <a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div class="d-flex flex-column align-items-center non-auth-title-container"> <div class="d-flex flex-column align-items-center non-auth-title-container">
<h4 class="pt-4">{{'DASHBOARD.TITLE' | translate}}</h4> <h4 class="pt-4">{{'DASHBOARD.TITLE' | translate}}</h4>
<p class="col-auto app-info">{{'DASHBOARD.INFO-TEXT' | translate}}</p> <p class="col-auto app-info">{{'DASHBOARD.INFO-TEXT' | translate}}</p>
</div>
<div class="d-flex">
<!-- <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 laptop-img" src="../../../assets/images/dashboard-popup.png">
<!-- <img class="col-auto ml-auto laptop-img"> -->
</div>
</div> </div>
<div class="d-flex"> <div *ngIf="hasDmps()" class="col activity">
<!-- <button type="button" class="col-auto align-self-center normal-btn" (click)="openNewDmpDialog()">{{'DASHBOARD.START-YOUR-FIRST-DMP' | translate}}</button> --> <div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<img class="col-auto ml-auto laptop-img" src="../../../assets/images/dashboard-popup.png"> <mat-tab-group mat-align-tabs="start" class="remove-border-bottom" (
<!-- <img class="col-auto ml-auto laptop-img"> --> [selectedIndex]="indexFromCurrentType" selectedTabChange)="currentType = $event.tab.ariaLabel">
</div> <!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">-->
</div> <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<div *ngIf="hasDmps()" class="col activity"> <app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div> <div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom" ( [selectedIndex]="indexFromCurrentType" selectedTabChange)="currentType = $event.tab.ariaLabel"> </mat-tab>
<!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">--> <!-- <mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}} ({{totalDmps}})">-->
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}"> <mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity> <app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity>
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> <div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab> </mat-tab>
<!-- <mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}} ({{totalDmps}})">--> <!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.PUBLIC-DATASETS' | translate}} ({{totalDatasets}})">-->
<mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}}"> <mat-tab aria-label="datasets" label="{{'DASHBOARD.PUBLIC-DATASETS' | translate}}">
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity> <app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'datasets'"></app-recent-edited-dataset-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div> <div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab> <!-- <div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.PUBLIC-DATASETS' | translate}} ({{totalDatasets}})">-->
<mat-tab aria-label="datasets" label="{{'DASHBOARD.PUBLIC-DATASETS' | translate}}">
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'datasets'"></app-recent-edited-dataset-activity>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<!-- <div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" [routerLink]="['/datasets/new']"> <button mat-raised-button class="add-dataset" [routerLink]="['/datasets/new']">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}} <mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button> </button>
</div> --> </div> -->
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</div>
</div> </div>
</div> <div class="col-auto">
<div class="col-auto"> <div *ngIf="!hasDmps()" class="ml-auto pl-4 personal-usage-block">
<div *ngIf="!hasDmps()" class="ml-auto pl-4 personal-usage-block"> <div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div> <div class="counter-zero">0</div>
<div class="counter-zero">0</div> <a>{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<a>{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a> <div class="counter-zero">0</div>
<div class="counter-zero">0</div> <a>{{'DASHBOARD.PUBLIC-DATASETS' | translate}}</a>
<a>{{'DASHBOARD.PUBLIC-DATASETS' | translate}}</a> <div class="counter-zero">0</div>
<div class="counter-zero">0</div> <a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a> <div class="counter-zero">0</div>
<div class="counter-zero">0</div> <a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
<a class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a> </div>
</div> <div *ngIf="hasDmps()" class="ml-auto stats">
<div *ngIf="hasDmps()" class="ml-auto stats"> <div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div> <div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}"> {{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div> <a [routerLink]="['/plans']" class="link">{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a> <div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}"> {{dashboardStatisticsData?.totalDataSetCount}}</div>
{{dashboardStatisticsData?.totalDataSetCount}}</div> <a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.PUBLIC-DATASETS' | translate}}</a>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.PUBLIC-DATASETS' | translate}}</a> <div [ngClass]="{'counter': dashboardStatisticsData?.totalGrantCount != 0, 'counter-zero': dashboardStatisticsData?.totalGrantCount == 0}">
<div [ngClass]="{'counter': dashboardStatisticsData?.totalGrantCount != 0, 'counter-zero': dashboardStatisticsData?.totalGrantCount == 0}"> {{dashboardStatisticsData?.totalGrantCount}}</div>
{{dashboardStatisticsData?.totalGrantCount}}</div> <a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a> <div [ngClass]="{'counter': dashboardStatisticsData?.totalOrganisationCount != 0, 'counter-zero': dashboardStatisticsData?.totalOrganisationCount == 0}">
<div [ngClass]="{'counter': dashboardStatisticsData?.totalOrganisationCount != 0, 'counter-zero': dashboardStatisticsData?.totalOrganisationCount == 0}"> {{dashboardStatisticsData?.totalOrganisationCount}}</div>
{{dashboardStatisticsData?.totalOrganisationCount}}</div> <a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a> </div>
</div> </div>
</div> </div>
</div> </div>
@ -206,11 +188,10 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- <div class="header-image"> <!-- <div class="header-image">
<div class="header-text-container"> <div class="header-text-container">
<h3>{{ 'ABOUT.WELCOME' | translate }}</h3> <h3>{{ 'ABOUT.WELCOME' | translate }}</h3>
<h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4> <h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4>
@ -310,4 +291,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> --> </div> -->

View File

@ -396,7 +396,7 @@ input[type="text"] {
.add-dataset-btn { .add-dataset-btn {
height: 40px; height: 40px;
margin-left: 40px; margin-left: 40px;
} }
:host ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar, :host ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar,
@ -425,87 +425,6 @@ input[type="text"] {
padding: 0.3rem 0rem 0.6rem 0rem !important; padding: 0.3rem 0rem 0.6rem 0rem !important;
} }
.new-releases-hint-container {
padding-left: 40px;
/* padding-top: 40px; */
padding-right: 55px;
}
.new-releases-card {
box-shadow: 0px 3px 6px #00000029;
max-width: 712px;
min-width: 17.5rem;
margin-top: 0rem;
margin-bottom: 3.75rem;
background: transparent linear-gradient(127deg, #EDAEB3 0%, #E1368A 100%) 0% 0% no-repeat padding-box;
border-radius: 6px;
opacity: 1;
padding-bottom: 2em;
}
.new-releases-btn {
height: 40px;
margin-left: 40px;
background: var(--primary-color) 0% 0% no-repeat padding-box;
border-radius: 30px;
opacity: 1;
color: #FFFFFF;
padding-right: 2em;
padding-left: 2em;
}
.new-releases-chip {
// margin-bottom: 1em;
// margin-left: 2.5em;
// margin-right: 2.5em;
color: #fff;
/* text-transform: uppercase; */
text-align: center;
font-weight: 500;
/* max-width: 160px; */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
background: #EAEAEA 0% 0% no-repeat padding-box;
border-radius: 30px;
opacity: 0.7;
/* font: normal normal bold 12px/21px Aileron; */
letter-spacing: 0.12px;
color: #6E6E6E;
}
.new-releases-title {
text-align: left;
font: Bold 30px/34px Roboto;
letter-spacing: 0px;
color: #212121;
padding-left: 40px;
/* padding-top: 40px; */
padding-right: 55px;
opacity: 1;
}
.new-releases-content {
text-align: left;
font-weight: 300;
font-size: 1rem;
letter-spacing: 0px;
color: #212121;
padding-left: 40px;
font: normal normal normal 16px/24px Roboto;
padding-top: 36px;
padding-right: 55px;
opacity: 1;
}
.new-releases-logo {
position: absolute;
right: 0;
bottom: 0;
}
/* ::ng-deep .mat-tab-group { /* ::ng-deep .mat-tab-group {
height: 100%; height: 100%;
} }

View File

@ -35,9 +35,6 @@ import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/serv
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service'; import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants'; import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
import { MatomoService } from '@app/core/services/matomo/matomo-service'; import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import * as moment from 'moment';
import { CookieService } from 'ngx-cookie-service';
@Component({ @Component({
@ -76,7 +73,6 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
importFileText: string; importFileText: string;
startWizardText: string; startWizardText: string;
currentType: string = "recent"; currentType: string = "recent";
newReleaseNotificationVisible = false;
constructor( constructor(
private router: Router, private router: Router,
@ -93,9 +89,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
private language: TranslateService, private language: TranslateService,
private uiNotificationService: UiNotificationService, private uiNotificationService: UiNotificationService,
private guidedTourService: GuidedTourService, private guidedTourService: GuidedTourService,
private matomoService: MatomoService, private matomoService: MatomoService
private cookieService: CookieService,
public configurationService: ConfigurationService
) { ) {
super(); super();
// this.dashboardStatisticsData.totalDataManagementPlanCount = 0; // this.dashboardStatisticsData.totalDataManagementPlanCount = 0;
@ -160,8 +154,6 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
this.filteredOptions = this.searchControl.valueChanges.pipe(mergeMap(x => { this.filteredOptions = this.searchControl.valueChanges.pipe(mergeMap(x => {
return this.searchBarService.search(x); return this.searchBarService.search(x);
})); }));
this.newReleaseNotificationVisible = this.isNewReleaseNotificationVisible();
} }
public get indexFromCurrentType() { public get indexFromCurrentType() {
@ -408,26 +400,4 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
// viewAllPublicDatasetsClicked() { // viewAllPublicDatasetsClicked() {
// this.router.navigate(['explore']); // this.router.navigate(['explore']);
// } // }
dismissNewReleaseNotification() {
this.cookieService.set('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode, 'true', 5000, null, null, false, 'Lax');
this.newReleaseNotificationVisible = false;
}
isNewReleaseNotificationVisible() {
if (this.configurationService.newReleaseNotificationVersionCode == null) {
return false;
}
if (this.configurationService.newReleaseNotificationExpires == null && this.configurationService.newReleaseNotificationLink == null) {
return false;
}
if (this.configurationService.newReleaseNotificationExpires != null && moment(this.configurationService.newReleaseNotificationExpires).tz('UTC') < moment.utc()) {
return false;
}
if (this.cookieService.get('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode) === 'true') {
return false;
}
return true;
}
} }

View File

@ -74,7 +74,7 @@ export class DatasetCopyDialogueComponent {
map(result => { map(result => {
this.dmpModel = result this.dmpModel = result
this.dmpModel.profiles.forEach((element) => { this.dmpModel.profiles.forEach((element) => {
if (element.descriptionTemplateId == this.data.datasetProfileId) { if (element.id == this.data.datasetProfileId) {
this.data.datasetProfileExist = true; this.data.datasetProfileExist = true;
} }
}) })

View File

@ -64,7 +64,7 @@
<mat-form-field> <mat-form-field>
<mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile"> <mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile">
<mat-option *ngFor="let profile of availableProfiles" [value]="profile"> <mat-option *ngFor="let profile of availableProfiles" [value]="profile">
<div> <div (click)="checkMinMax($event, profile)">
{{profile.label}} {{profile.label}}
</div> </div>
</mat-option> </mat-option>

View File

@ -49,40 +49,43 @@ export class DatasetEditorComponent extends BaseComponent {
] ]
}; };
ngOnInit() { checkMinMax(event, profile: DatasetProfileModel) {
this.formGroup.get('profile').valueChanges.pipe(takeUntil(this._destroyed)).subscribe(x => { event.stopPropagation();
this.checkMinMax(x);
});
}
checkMinMax(profile: DatasetProfileModel) {
const dmpSectionIndex = this.formGroup.get('dmpSectionIndex').value; const dmpSectionIndex = this.formGroup.get('dmpSectionIndex').value;
const blueprintId = this.formGroup.get('dmp').value.profile.id; const blueprintId = this.formGroup.get('dmp').value.profile.id;
this.dmpProfileService.getSingleBlueprint(blueprintId) this.dmpProfileService.getSingleBlueprint(blueprintId)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
const section = result.definition.sections[dmpSectionIndex]; const section = result.definition.sections[dmpSectionIndex];
if (section.hasTemplates) { if(section.hasTemplates){
const foundTemplate = section.descriptionTemplates.find(template => template.descriptionTemplateId === profile.id); const foundTemplate = section.descriptionTemplates.find(template => template.descriptionTemplateId === profile.id);
if (foundTemplate !== undefined) { if (foundTemplate !== undefined) {
let count = 0; let count = 0;
if (this.formGroup.get('dmp').value.datasets != null) { if(this.formGroup.get('dmp').value.datasets != null){
for (let dataset of this.formGroup.get('dmp').value.datasets) { for(let dataset of this.formGroup.get('dmp').value.datasets){
if (dataset.dmpSectionIndex === dmpSectionIndex && dataset.profile.id === foundTemplate.descriptionTemplateId) { if(dataset.dmpSectionIndex === dmpSectionIndex && dataset.profile.id === foundTemplate.descriptionTemplateId){
count++; count++;
} }
} }
if (count === foundTemplate.maxMultiplicity) { if(count === foundTemplate.maxMultiplicity){
this.dialog.open(PopupNotificationDialogComponent, { this.dialog.open(PopupNotificationDialogComponent, {
data: { data: {
title: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.TITLE'), title: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.TITLE'),
message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE') message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE')
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
this.formGroup.get('profile').reset(); }
else{
this.formGroup.get('profile').setValue(profile);
} }
} }
} }
else {
this.formGroup.get('profile').setValue(profile);
}
}
else {
this.formGroup.get('profile').setValue(profile);
} }
}); });
} }

View File

@ -1,71 +1,68 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms'; import {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';
import { MatDialog } from '@angular/material/dialog'; import {MatDialog} from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar'; import {MatSnackBar} from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import { DatasetStatus } from '@app/core/common/enum/dataset-status'; import {DatasetStatus} from '@app/core/common/enum/dataset-status';
import { DmpStatus } from '@app/core/common/enum/dmp-status'; import {DmpStatus} from '@app/core/common/enum/dmp-status';
import { DataTableRequest } from '@app/core/model/data-table/data-table-request'; import {DataTableRequest} from '@app/core/model/data-table/data-table-request';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile'; import {DatasetProfileModel} from '@app/core/model/dataset/dataset-profile';
import { DmpModel } from '@app/core/model/dmp/dmp'; import {DmpModel} from '@app/core/model/dmp/dmp';
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing'; import {DmpListingModel} from '@app/core/model/dmp/dmp-listing';
import { DatasetProfileCriteria } from '@app/core/query/dataset-profile/dataset-profile-criteria'; import {DatasetProfileCriteria} from '@app/core/query/dataset-profile/dataset-profile-criteria';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria'; import {DmpCriteria} from '@app/core/query/dmp/dmp-criteria';
import { RequestItem } from '@app/core/query/request-item'; import {RequestItem} from '@app/core/query/request-item';
import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service'; import {DatasetWizardService} from '@app/core/services/dataset-wizard/dataset-wizard.service';
import { DmpService } from '@app/core/services/dmp/dmp.service'; import {DmpService} from '@app/core/services/dmp/dmp.service';
import { import {
ExternalSourcesConfigurationService ExternalSourcesConfigurationService
} from '@app/core/services/external-sources/external-sources-configuration.service'; } from '@app/core/services/external-sources/external-sources-configuration.service';
import { ExternalSourcesService } from '@app/core/services/external-sources/external-sources.service'; import {ExternalSourcesService} from '@app/core/services/external-sources/external-sources.service';
import { import {
SnackBarNotificationLevel, SnackBarNotificationLevel,
UiNotificationService UiNotificationService
} from '@app/core/services/notification/ui-notification-service'; } from '@app/core/services/notification/ui-notification-service';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; import {SingleAutoCompleteConfiguration} from '@app/library/auto-complete/single/single-auto-complete-configuration';
import { import {
DatasetCopyDialogueComponent DatasetCopyDialogueComponent
} from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component'; } from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component';
import { DatasetWizardEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model'; import {DatasetWizardEditorModel} from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model';
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item'; import {BreadcrumbItem} from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent'; import {IBreadCrumbComponent} from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
import { DatasetDescriptionFormEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model'; import {DatasetDescriptionFormEditorModel} from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { import {
Link, Link,
LinkToScroll, LinkToScroll,
TableOfContents TableOfContents
} from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents'; } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents';
import { FormService } from '@common/forms/form-service'; import {FormService} from '@common/forms/form-service';
import { import {
FormValidationErrorsDialogComponent FormValidationErrorsDialogComponent
} from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component'; } from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; import {ValidationErrorModel} from '@common/forms/validation/error-model/validation-error-model';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component'; import {ConfirmationDialogComponent} from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core'; import {TranslateService} from '@ngx-translate/core';
import * as FileSaver from 'file-saver'; import * as FileSaver from 'file-saver';
import { interval, Observable, of as observableOf } from 'rxjs'; import {interval, Observable, of as observableOf} from 'rxjs';
import { catchError, debounceTime, filter, map, takeUntil } from 'rxjs/operators'; import {catchError, debounceTime, filter, map, takeUntil} from 'rxjs/operators';
import { LockService } from '@app/core/services/lock/lock.service'; import {LockService} from '@app/core/services/lock/lock.service';
import { Location } from '@angular/common'; import {Location} from '@angular/common';
import { LockModel } from '@app/core/model/lock/lock.model'; import {LockModel} from '@app/core/model/lock/lock.model';
import { Guid } from '@common/types/guid'; import {Guid} from '@common/types/guid';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils'; import {isNullOrUndefined} from '@app/utilities/enhancers/utils';
import { AuthService } from '@app/core/services/auth/auth.service'; import {AuthService} from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service'; import {ConfigurationService} from '@app/core/services/configuration/configuration.service';
import { SaveType } from '@app/core/common/enum/save-type'; import {SaveType} from '@app/core/common/enum/save-type';
import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard'; import {DatasetWizardModel} from '@app/core/model/dataset/dataset-wizard';
import { MatomoService } from '@app/core/services/matomo/matomo-service'; import {MatomoService} from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import { VisibilityRulesService } from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service'; import {VisibilityRulesService} from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service';
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component'; import {PopupNotificationDialogComponent} from '@app/library/notification/popup/popup-notification.component';
import { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.component'; import {CheckDeactivateBaseComponent} from '@app/library/deactivate/deactivate.component';
import { PrefillDatasetComponent } from "@app/ui/dataset/dataset-wizard/prefill-dataset/prefill-dataset.component"; import {PrefillDatasetComponent} from "@app/ui/dataset/dataset-wizard/prefill-dataset/prefill-dataset.component";
import { ToCEntry, ToCEntryType } from "@app/ui/misc/dataset-description-form/dataset-description.component"; import {ToCEntry, ToCEntryType} from "@app/ui/misc/dataset-description-form/dataset-description.component";
import { dispatchFakeEvent } from "@angular/cdk/testing/testbed/fake-events"; import {dispatchFakeEvent} from "@angular/cdk/testing/testbed/fake-events";
import { DmpDatasetProfile } from '@app/core/model/dmp/dmp-dataset-profile/dmp-dataset-profile'; import { DmpDatasetProfile } from '@app/core/model/dmp/dmp-dataset-profile/dmp-dataset-profile';
import { DmpProfileService } from '@app/core/services/dmp/dmp-profile.service';
import { DatasetService } from '@app/core/services/dataset/dataset.service';
import { DatasetCriteria } from '@app/core/query/dataset/dataset-criteria';
@Component({ @Component({
selector: 'app-dataset-wizard-component', selector: 'app-dataset-wizard-component',
@ -101,7 +98,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
dmpId: string; dmpId: string;
dmpSectionIndex: number; dmpSectionIndex: number;
availableDescriptionTemplates: DatasetProfileModel[] = []; availableDescriptionTemplates: DatasetProfileModel[] = [];
availableDescriptionTemplatesForPrefilling: DatasetProfileModel[] = [];
newDmpId: string; newDmpId: string;
publicId: string; publicId: string;
profileUpdateId: string; profileUpdateId: string;
@ -131,14 +127,12 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
constructor( constructor(
private datasetWizardService: DatasetWizardService, private datasetWizardService: DatasetWizardService,
private datasetService: DatasetService,
private route: ActivatedRoute, private route: ActivatedRoute,
public snackBar: MatSnackBar, public snackBar: MatSnackBar,
public router: Router, public router: Router,
public language: TranslateService, public language: TranslateService,
public externalSourcesService: ExternalSourcesService, public externalSourcesService: ExternalSourcesService,
public dmpService: DmpService, public dmpService: DmpService,
private dmpProfileService: DmpProfileService,
public dialog: MatDialog, public dialog: MatDialog,
public externalSourcesConfigurationService: ExternalSourcesConfigurationService, public externalSourcesConfigurationService: ExternalSourcesConfigurationService,
private uiNotificationService: UiNotificationService, private uiNotificationService: UiNotificationService,
@ -202,63 +196,63 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.getSingle(this.itemId) this.datasetWizardService.getSingle(this.itemId)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => { this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus; this.lockStatus = lockStatus;
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data); this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex; this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex;
this.needsUpdate(); this.needsUpdate();
this.breadCrumbs = observableOf([ this.breadCrumbs = observableOf([
{ {
parentComponentName: null, parentComponentName: null,
label: this.datasetWizardModel.label, label: this.datasetWizardModel.label,
url: '/datasets/edit/' + this.datasetWizardModel.id, url: '/datasets/edit/' + this.datasetWizardModel.id,
notFoundResolver: [ notFoundResolver: [
{ {
parentComponentName: null, parentComponentName: null,
label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS').toUpperCase(), label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS').toUpperCase(),
url: '/datasets' url: '/datasets'
}, },
] ]
}]); }]);
this.formGroup = this.datasetWizardModel.buildForm(); this.formGroup = this.datasetWizardModel.buildForm();
let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.datasetWizardModel.dmpSectionIndex)); let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.datasetWizardModel.dmpSectionIndex));
for (var profile of profiles) { for(var profile of profiles){
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplates, { id: profile.descriptionTemplateId, label: profile.label, description: "" }); this.availableDescriptionTemplates.push({id: profile.descriptionTemplateId, label: profile.label, description: ""})
} }
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft; this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
if (this.datasetWizardModel.status === DatasetStatus.Finalized || lockStatus) { if (this.datasetWizardModel.status === DatasetStatus.Finalized || lockStatus) {
this.formGroup.disable(); this.formGroup.disable();
this.viewOnly = true; this.viewOnly = true;
} }
if (!lockStatus && !isNullOrUndefined(this.authService.current())) { if (!lockStatus && !isNullOrUndefined(this.authService.current())) {
this.lock = new LockModel(data.id, this.authService.current()); this.lock = new LockModel(data.id, this.authService.current());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => { this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result); this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock()); interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
}); });
} }
// if (this.viewOnly) { this.formGroup.disable(); } // For future use, to make Dataset edit like DMP. // if (this.viewOnly) { this.formGroup.disable(); } // For future use, to make Dataset edit like DMP.
this.loadDatasetProfiles(); this.loadDatasetProfiles();
this.registerFormListeners(); this.registerFormListeners();
if (lockStatus) { if (lockStatus) {
this.dialog.open(PopupNotificationDialogComponent, { this.dialog.open(PopupNotificationDialogComponent, {
data: { data: {
title: this.language.instant('DATASET-WIZARD.LOCKED.TITLE'), title: this.language.instant('DATASET-WIZARD.LOCKED.TITLE'),
message: this.language.instant('DATASET-WIZARD.LOCKED.MESSAGE') message: this.language.instant('DATASET-WIZARD.LOCKED.MESSAGE')
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
} }
if (this.finalize && !this.lockStatus && !this.viewOnly) { if(this.finalize && !this.lockStatus && !this.viewOnly) {
setTimeout(() => { setTimeout(() => {
this.saveFinalize(); this.saveFinalize();
}, 0); }, 0);
} }
// this.availableProfiles = this.datasetWizardModel.dmp.profiles; // this.availableProfiles = this.datasetWizardModel.dmp.profiles;
}); });
}, },
error => { error => {
switch (error.status) { switch (error.status) {
case 403: case 403:
@ -284,53 +278,34 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardModel.dmpSectionIndex = this.dmpSectionIndex; this.datasetWizardModel.dmpSectionIndex = this.dmpSectionIndex;
this.formGroup = this.datasetWizardModel.buildForm(); this.formGroup = this.datasetWizardModel.buildForm();
let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.dmpSectionIndex)); let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.dmpSectionIndex));
for (var profile of profiles) { for(var profile of profiles){
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplates, { id: profile.descriptionTemplateId, label: profile.label, description: "" }); this.availableDescriptionTemplates.push({id: profile.descriptionTemplateId, label: profile.label, description: ""})
} }
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft; this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
this.formGroup.get('dmp').disable(); this.formGroup.get('dmp').disable();
this.dmpProfileService.getSingleBlueprint(data.profile.id) const dialogRef = this.dialog.open(PrefillDatasetComponent, {
.pipe(takeUntil(this._destroyed)) width: '590px',
.subscribe(result => { minHeight: '200px',
const request: DataTableRequest<DatasetProfileCriteria> = new DataTableRequest<DatasetProfileCriteria>(null, null, null); restoreFocus: false,
request.criteria = new DatasetProfileCriteria(); data: {
request.criteria.ids = []; availableProfiles: this.availableDescriptionTemplates,
this.availableDescriptionTemplates.forEach(template => request.criteria.ids.push(template.id)); datasetFormGroup: this.formGroup
this.datasetService.getDatasetProfilesWithPrefilling(request) },
.pipe(takeUntil(this._destroyed)) panelClass: 'custom-modalbox'
.subscribe(items => { });
items.forEach(template => { dialogRef.afterClosed().subscribe(result => {
if (template.enablePrefilling) { if(result) {
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplatesForPrefilling, { id: template.id, label: template.label, description: '' }); this.datasetWizardModel = this.datasetWizardModel.fromModel(result);
} this.datasetWizardModel.dmp = data;
}) this.datasetWizardModel.dmpSectionIndex = this.dmpSectionIndex;
if (this.availableDescriptionTemplatesForPrefilling.length > 0) { this.formGroup = this.datasetWizardModel.buildForm();
const dialogRef = this.dialog.open(PrefillDatasetComponent, { this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
width: '590px', this.formGroup.get('dmp').disable();
minHeight: '200px', this.loadDatasetProfiles();
restoreFocus: false, this.registerFormListeners();
data: { }
availableProfiles: this.availableDescriptionTemplatesForPrefilling, })
datasetFormGroup: this.formGroup
},
panelClass: 'custom-modalbox'
});
dialogRef.afterClosed().subscribe(result => {
if (result) {
this.datasetWizardModel = this.datasetWizardModel.fromModel(result);
this.datasetWizardModel.dmp = data;
this.datasetWizardModel.dmpSectionIndex = this.dmpSectionIndex;
this.formGroup = this.datasetWizardModel.buildForm();
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.formGroup.get('dmp').disable();
this.loadDatasetProfiles();
this.registerFormListeners();
}
})
}
});
});
this.loadDatasetProfiles(); this.loadDatasetProfiles();
this.registerFormListeners(); this.registerFormListeners();
// this.availableProfiles = data.profiles; // this.availableProfiles = data.profiles;
@ -363,6 +338,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => { this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus; this.lockStatus = lockStatus;
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data); this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex;
this.datasetWizardModel.status = 0; this.datasetWizardModel.status = 0;
this.formGroup = this.datasetWizardModel.buildForm(); this.formGroup = this.datasetWizardModel.buildForm();
this.formGroup.get('id').setValue(null); this.formGroup.get('id').setValue(null);
@ -373,10 +349,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardModel.dmp = data; this.datasetWizardModel.dmp = data;
this.formGroup.get('dmp').setValue(this.datasetWizardModel.dmp); this.formGroup.get('dmp').setValue(this.datasetWizardModel.dmp);
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
const descipptionTemplateiNNewDmp:DmpDatasetProfile = this.datasetWizardModel.dmp?.profiles?.find(x => x.descriptionTemplateId === this.datasetWizardModel.profile.id);
this.dmpSectionIndex = descipptionTemplateiNNewDmp?.data?.dmpSectionIndex?.length > 0 ? descipptionTemplateiNNewDmp?.data?.dmpSectionIndex[0] : 0;
this.formGroup.get('dmpSectionIndex').setValue(this.dmpSectionIndex);
this.loadDatasetProfiles(); this.loadDatasetProfiles();
this.breadCrumbs = observableOf([ this.breadCrumbs = observableOf([
@ -421,11 +393,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.isNew = false; this.isNew = false;
this.datasetWizardService.getSinglePublic(this.publicId) this.datasetWizardService.getSinglePublic(this.publicId)
.pipe(takeUntil(this._destroyed)).pipe( .pipe(takeUntil(this._destroyed)).pipe(
catchError((error: any) => { catchError((error: any) => {
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error); this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
this.router.navigate(['/datasets/publicEdit/' + this.publicId]); this.router.navigate(['/datasets/publicEdit/' + this.publicId]);
return observableOf(null); return observableOf(null);
})) }))
.subscribe(data => { .subscribe(data => {
if (data) { if (data) {
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data); this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
@ -508,13 +480,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
} }
} }
addToAvailableDescriptionTemplates(list: DatasetProfileModel[], item: DatasetProfileModel) {
if (list.some(x => x.id === item.id)) {
list.splice(list.findIndex(x => x.id === item.id), 1)
}
list.push(item);
}
// private _listenersSubscription:Subscription = new Subscription(); // private _listenersSubscription:Subscription = new Subscription();
registerFormListeners() { registerFormListeners() {
// const dmpSubscription = // const dmpSubscription =
@ -602,7 +567,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
searchDmp(query: string): Observable<DmpListingModel[]> { searchDmp(query: string): Observable<DmpListingModel[]> {
const fields: Array<string> = new Array<string>(); const fields: Array<string> = new Array<string>();
fields.push('-created'); fields.push('-created');
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields }); const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, {fields: fields});
dmpDataTableRequest.criteria = new DmpCriteria(); dmpDataTableRequest.criteria = new DmpCriteria();
dmpDataTableRequest.criteria.like = query; dmpDataTableRequest.criteria.like = query;
dmpDataTableRequest.criteria.status = DmpStatus.Draft; dmpDataTableRequest.criteria.status = DmpStatus.Draft;
@ -733,12 +698,12 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.hasChanges = false; this.hasChanges = false;
this.datasetIsOnceSaved = true; this.datasetIsOnceSaved = true;
this.onCallbackSuccess(data, saveType); this.onCallbackSuccess(data, saveType);
if (onSuccess) { if(onSuccess) {
onSuccess(); onSuccess();
} }
}, },
error => { error => {
if (onError) { if(onError) {
onError(); onError();
} }
this.onCallbackError(error) this.onCallbackError(error)
@ -756,9 +721,9 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
else if (key === 'email') { else if (key === 'email') {
errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.EMAIL')); errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.EMAIL'));
} else if (key === 'min') { } else if (key === 'min') {
errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.MIN-VALUE', { 'min': formControl.getError('min').min })); errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.MIN-VALUE', {'min': formControl.getError('min').min}));
} else if (key === 'max') { } else if (key === 'max') {
errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.MAX-VALUE', { 'max': formControl.getError('max').max })); errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.MAX-VALUE', {'max': formControl.getError('max').max}));
} else { } else {
errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + formControl.errors[key].message); errors.push(this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.THIS-FIELD') + ' "' + name + '" ' + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.HAS-ERROR') + ', ' + formControl.errors[key].message);
} }
@ -913,27 +878,27 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
filter(x => x), filter(x => x),
takeUntil(this._destroyed) takeUntil(this._destroyed)
).subscribe(result => { ).subscribe(result => {
if (result) { if (result) {
// if (!this.isFormValid()) { return; } // if (!this.isFormValid()) { return; }
this.formGroup.get('status').setValue(DatasetStatus.Draft); this.formGroup.get('status').setValue(DatasetStatus.Draft);
this.submit(SaveType.finalize, () => { this.submit(SaveType.finalize, () => {
this.viewOnly = false; this.viewOnly = false;
this.datasetWizardModel.status = DatasetStatus.Draft; this.datasetWizardModel.status = DatasetStatus.Draft;
setTimeout(x => { setTimeout(x => {
this.formGroup = null; this.formGroup = null;
});
setTimeout(x => {
this.formGroup = this.datasetWizardModel.buildForm();
this.registerFormListeners();
});
}, () => {
this.formGroup.get('status').setValue(DatasetStatus.Finalized);
this.viewOnly = true;
}); });
} else { setTimeout(x => {
this.saving = false; this.formGroup = this.datasetWizardModel.buildForm();
} this.registerFormListeners();
}); });
}, () => {
this.formGroup.get('status').setValue(DatasetStatus.Finalized);
this.viewOnly = true;
});
} else {
this.saving = false;
}
});
} }
@ -1018,7 +983,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
document.getElementById('stepper-options').scrollTop = this.tocScrollTop; document.getElementById('stepper-options').scrollTop = this.tocScrollTop;
}, 500); }, 500);
this.saving = false; this.saving = false;
if (this.isNew) { if(this.isNew) {
this.reloadDateset(this.datasetWizardModel.id); this.reloadDateset(this.datasetWizardModel.id);
} }
// this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); }); // this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); });
@ -1049,7 +1014,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadPDF(id) this.datasetWizardService.downloadPDF(id)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(response => { .subscribe(response => {
const blob = new Blob([response.body], { type: 'application/pdf' }); const blob = new Blob([response.body], {type: 'application/pdf'});
const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition')); const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition'));
FileSaver.saveAs(blob, filename); FileSaver.saveAs(blob, filename);
@ -1061,7 +1026,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadDOCX(id) this.datasetWizardService.downloadDOCX(id)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(response => { .subscribe(response => {
const blob = new Blob([response.body], { type: 'application/msword' }); const blob = new Blob([response.body], {type: 'application/msword'});
const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition')); const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition'));
FileSaver.saveAs(blob, filename); FileSaver.saveAs(blob, filename);
@ -1074,7 +1039,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadXML(id) this.datasetWizardService.downloadXML(id)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(response => { .subscribe(response => {
const blob = new Blob([response.body], { type: 'application/xml' }); const blob = new Blob([response.body], {type: 'application/xml'});
const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition')); const filename = this.getFilenameFromContentDispositionHeader(response.headers.get('Content-Disposition'));
FileSaver.saveAs(blob, filename); FileSaver.saveAs(blob, filename);
@ -1195,7 +1160,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
.subscribe(result => { .subscribe(result => {
if (result && result.datasetProfileExist) { if (result && result.datasetProfileExist) {
const newDmpId = result.formControl.value.id const newDmpId = result.formControl.value.id
this.router.navigate(['/datasets/copy/' + result.datasetId], { queryParams: { newDmpId: newDmpId } }); this.router.navigate(['/datasets/copy/' + result.datasetId], {queryParams: {newDmpId: newDmpId}});
} }
}); });
} }
@ -1247,9 +1212,9 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
getEntryVisibleFieldSets(entry: ToCEntry): ToCEntry[] { getEntryVisibleFieldSets(entry: ToCEntry): ToCEntry[] {
let fieldSets = []; let fieldSets = [];
if (entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)) { if(entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)) {
fieldSets.push(entry); fieldSets.push(entry);
} else if (entry.type !== ToCEntryType.FieldSet) { } else if(entry.type !== ToCEntryType.FieldSet) {
entry.subEntries.forEach(subEntry => { entry.subEntries.forEach(subEntry => {
fieldSets = fieldSets.concat(this.getEntryVisibleFieldSets(subEntry)); fieldSets = fieldSets.concat(this.getEntryVisibleFieldSets(subEntry));
}); });
@ -1257,13 +1222,13 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
return fieldSets; return fieldSets;
} }
get visibleFieldSets(): ToCEntry[] { get visibleFieldSets(): ToCEntry[]{
let fieldSets = []; let fieldSets = [];
let arrays = this.table0fContents ? this.table0fContents.tocentries. let arrays= this.table0fContents?this.table0fContents.tocentries.
filter(entry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)).map(entry => { filter(entry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)).map(entry => {
return this.getEntryVisibleFieldSets(entry); return this.getEntryVisibleFieldSets(entry);
}) })
: []; :[];
arrays.forEach(array => { arrays.forEach(array => {
fieldSets = fieldSets.concat(array); fieldSets = fieldSets.concat(array);
}); });
@ -1271,11 +1236,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
} }
getFirstFieldSet(entry: ToCEntry): ToCEntry { getFirstFieldSet(entry: ToCEntry): ToCEntry {
if (entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)) { if(entry.type === ToCEntryType.FieldSet && !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)) {
return entry; return entry;
} else { } else {
let subEntries = entry.subEntries.filter(subEntry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === subEntry.id)); let subEntries = entry.subEntries.filter(subEntry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === subEntry.id));
if (subEntries.length > 0) { if(subEntries.length > 0) {
return this.getFirstFieldSet(subEntries[0]); return this.getFirstFieldSet(subEntries[0]);
} else { } else {
return null; return null;
@ -1284,11 +1249,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
} }
public changeStep(selected: ToCEntry = null, execute: boolean = true) { public changeStep(selected: ToCEntry = null, execute: boolean = true) {
if (execute) { if(execute) {
if (selected) { if(selected) {
let fieldSet = this.getFirstFieldSet(selected); let fieldSet = this.getFirstFieldSet(selected);
let index = this.visibleFieldSets.findIndex(entry => entry.id === fieldSet.id); let index = this.visibleFieldSets.findIndex(entry => entry.id === fieldSet.id);
this.step = index + (selected.type === ToCEntryType.FieldSet ? 1 : 0.5); this.step = index + (selected.type === ToCEntryType.FieldSet?1:0.5);
} else { } else {
this.step = 0; this.step = 0;
this.resetScroll(); this.resetScroll();
@ -1312,7 +1277,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
public previousStep() { public previousStep() {
if (this.step > 0) { if (this.step > 0) {
this.step = Math.ceil(this.step - 1); this.step = Math.ceil(this.step - 1);
if (this.step >= 1) { if(this.step >= 1) {
let entry = this.visibleFieldSets[this.step - 1]; let entry = this.visibleFieldSets[this.step - 1];
this.table0fContents.onToCentrySelected(entry, false); this.table0fContents.onToCentrySelected(entry, false);
this.scroll(entry); this.scroll(entry);

View File

@ -27,7 +27,7 @@
<mat-form-field class="col-md-12"> <mat-form-field class="col-md-12">
<mat-select placeholder="{{'DATASET-CREATE-WIZARD.PREFILL-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile"> <mat-select placeholder="{{'DATASET-CREATE-WIZARD.PREFILL-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile">
<mat-option *ngFor="let profile of data.availableProfiles" [value]="profile"> <mat-option *ngFor="let profile of data.availableProfiles" [value]="profile">
<div> <div (click)="checkMinMax($event, profile)">
{{profile.label}} {{profile.label}}
</div> </div>
</mat-option> </mat-option>

View File

@ -55,10 +55,6 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
titleFn: (item) => item['name'], titleFn: (item) => item['name'],
subtitleFn: (item) => item['pid'] subtitleFn: (item) => item['pid']
}; };
this.prefillForm.get('profile').valueChanges.pipe(takeUntil(this._destroyed)).subscribe(x => {
this.checkMinMax(x);
});
} }
addProfileIfUsedLessThanMax(profile: DatasetProfileModel) { addProfileIfUsedLessThanMax(profile: DatasetProfileModel) {
@ -93,7 +89,8 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
}); });
} }
checkMinMax(profile: DatasetProfileModel) { checkMinMax(event, profile: DatasetProfileModel) {
event.stopPropagation();
const dmpSectionIndex = this.data.datasetFormGroup.get('dmpSectionIndex').value; const dmpSectionIndex = this.data.datasetFormGroup.get('dmpSectionIndex').value;
const blueprintId = this.data.datasetFormGroup.get('dmp').value.profile.id; const blueprintId = this.data.datasetFormGroup.get('dmp').value.profile.id;
this.dmpProfileService.getSingleBlueprint(blueprintId) this.dmpProfileService.getSingleBlueprint(blueprintId)
@ -117,10 +114,18 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE') message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE')
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
this.prefillForm.get('profile').reset(); }
else{
this.prefillForm.get('profile').setValue(profile);
} }
} }
} }
else {
this.prefillForm.get('profile').setValue(profile);
}
}
else {
this.prefillForm.get('profile').setValue(profile);
} }
}); });
} }

View File

@ -51,9 +51,9 @@
</div> </div>
</li> </li>
</ol> </ol>
<ul *ngIf="dmp?.id && hasProfile(i)" class="add-dataset-option"> <ul *ngIf="hasProfile(i)" class="add-dataset-option">
<li> <li>
<a class="add-dataset-action" [routerLink]="['/datasets/new/' + dmp.id + '/' + i]"> <a class="add-dataset-action" (click)="addDataset(i)">
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}} <mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
</a> </a>
</li> </li>
@ -83,8 +83,8 @@
</div> </div>
<div class="col-auto formForStep0" id="editor-form" *ngIf="this.step === 0 && this.isNew"> <div class="col-auto formForStep0" id="editor-form" *ngIf="this.step === 0 && this.isNew">
<div class="col-12 blueprint-section" [hidden]="this.step !== 0"> <div class="col-12 blueprint-section" [hidden]="this.step !== 0">
<div class=""> <div class="input-form">
<div class="heading2">Title of DMP *</div> <div class="heading2">0.1 Title of DMP *</div>
<mat-form-field> <mat-form-field>
<mat-label>Title</mat-label> <mat-label>Title</mat-label>
<input matInput type="text" name="label" [formControl]="formGroup.get('label')" required> <input matInput type="text" name="label" [formControl]="formGroup.get('label')" required>
@ -94,14 +94,14 @@
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> --> {{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
</mat-form-field> </mat-form-field>
</div> </div>
<div class=""> <div class="input-form">
<div class="heading2">Description of DMP *</div> <div class="heading2">0.2 Description of DMP *</div>
<rich-text-editor-component [parentFormGroup]="formGroup" [controlName]="'description'" <rich-text-editor-component [parentFormGroup]="formGroup" [controlName]="'description'"
[placeholder]="'Fill with description'" [required]="true"> [placeholder]="'Fill with description'" [required]="true">
</rich-text-editor-component> </rich-text-editor-component>
</div> </div>
<div class="" style="margin-top: 3%;"> <div class="dmp-blueprint-form" style="margin-top: 3%;">
<div class="heading2">Blueprint of DMP *</div> <div class="heading2">0.3 Blueprint of DMP *</div>
<mat-form-field> <mat-form-field>
<mat-label>Select blueprint</mat-label> <mat-label>Select blueprint</mat-label>
<app-single-auto-complete [required]="false" [formControl]="formGroup.get('profile')" placeholder="Select blueprint" [configuration]="dmpBlueprintAutoCompleteConfiguration"> <app-single-auto-complete [required]="false" [formControl]="formGroup.get('profile')" placeholder="Select blueprint" [configuration]="dmpBlueprintAutoCompleteConfiguration">
@ -110,7 +110,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-5"> <div class="col-5">
<button mat-button class="action-btn" [disabled]="selectedDmpBlueprintDefinition == null || !(formGroup.get('label').valid && formGroup.get('description').valid)" (click)="selectBlueprint()">Next</button> <button mat-button class="action-btn" [disabled]="selectedDmpBlueprintDefinition == null" (click)="selectBlueprint()">Next</button>
</div> </div>
<div class="col-7" *ngIf="formGroup.get('profile').value == null || (formGroup.get('profile').value && formGroup.get('profile').value.id !== defaultBlueprintId)"> <div class="col-7" *ngIf="formGroup.get('profile').value == null || (formGroup.get('profile').value && formGroup.get('profile').value.id !== defaultBlueprintId)">
<div class="row"> <div class="row">
@ -138,11 +138,11 @@
<div *ngFor="let field of section.fields; let j=index"> <div *ngFor="let field of section.fields; let j=index">
<div class="heading">{{i + 1}}.{{j + 1}} {{field.label}}<span *ngIf="field.required">*</span></div> <div class="heading">{{i + 1}}.{{j + 1}} {{field.label}}<span *ngIf="field.required">*</span></div>
<div *ngIf="field.description != null && field.description.length > 0" class="hint">{{field.description}}</div> <div *ngIf="field.description != null && field.description.length > 0" class="hint">{{field.description}}</div>
<div class=""> <div class="input-form">
<div *ngIf="field.category === 'SYSTEM'"> <div *ngIf="field.category === 'SYSTEM'">
<div *ngIf="field.type == 0"> <div *ngIf="field.type == 0">
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.NAME' | translate)}}" type="text" name="label" [formControl]="formGroup.get('label')" required> <input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" [formControl]="formGroup.get('label')" required>
<mat-error *ngIf="formGroup.get('label').hasError('backendError')"> <mat-error *ngIf="formGroup.get('label').hasError('backendError')">
{{formGroup.get('label').getError('backendError').message}}</mat-error> {{formGroup.get('label').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('label').hasError('required')"> <mat-error *ngIf="formGroup.get('label').hasError('required')">
@ -151,12 +151,12 @@
</div> </div>
<div *ngIf="field.type == 1"> <div *ngIf="field.type == 1">
<rich-text-editor-component [parentFormGroup]="formGroup" [controlName]="'description'" <rich-text-editor-component [parentFormGroup]="formGroup" [controlName]="'description'"
[placeholder]="field?.placeholder?.length > 0 ? field.placeholder : 'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [required]="field.required"> [placeholder]="'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [required]="field.required">
</rich-text-editor-component> </rich-text-editor-component>
</div> </div>
<div *ngIf="field.type == 2"> <div *ngIf="field.type == 2">
<mat-form-field> <mat-form-field>
<mat-label>{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.PLACEHOLDER.RESEARCHERS' | translate)}}</mat-label> <mat-label>{{'DMP-EDITOR.PLACEHOLDER.RESEARCHERS' | translate}}</mat-label>
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')" [configuration]="researchersAutoCompleteConfiguration"> <app-multiple-auto-complete [formControl]="formGroup.get('researchers')" [configuration]="researchersAutoCompleteConfiguration">
</app-multiple-auto-complete> </app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')"> <mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
@ -174,7 +174,7 @@
</div> </div>
<div *ngIf="field.type == 3"> <div *ngIf="field.type == 3">
<mat-form-field> <mat-form-field>
<mat-label>{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.PLACEHOLDER.ORGANIZATION' | translate)}}</mat-label> <mat-label>{{'DMP-EDITOR.PLACEHOLDER.ORGANIZATION' | translate}}</mat-label>
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')" [configuration]="organisationsAutoCompleteConfiguration"> <app-multiple-auto-complete [formControl]="formGroup.get('organisations')" [configuration]="organisationsAutoCompleteConfiguration">
</app-multiple-auto-complete> </app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')"> <mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
@ -191,7 +191,7 @@
</div> </div>
<div *ngIf="field.type == 4"> <div *ngIf="field.type == 4">
<mat-form-field> <mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.LANGUAGE' | translate)}}" required> <mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code"> <mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
{{ lang.name }} {{ lang.name }}
</mat-option> </mat-option>
@ -205,7 +205,7 @@
<div *ngIf="field.type == 5"> <div *ngIf="field.type == 5">
<div class="contact-form"> <div class="contact-form">
<mat-form-field> <mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('contact')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.CONTACT' | translate)}}"> <mat-select [formControl]="formGroup.get('extraProperties').get('contact')" placeholder="{{'DMP-EDITOR.FIELDS.CONTACT' | translate}}">
<mat-option *ngFor="let vis of getAssociates()" [value]="vis.id"> <mat-option *ngFor="let vis of getAssociates()" [value]="vis.id">
{{vis.name | translate}} {{vis.name | translate}}
</mat-option> </mat-option>
@ -218,17 +218,17 @@
</div> </div>
</div> </div>
<div *ngIf="field.type == 6"> <div *ngIf="field.type == 6">
<funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [field]="field" [type]="1" (onFormChanged)="formChanged()"></funding-info> <funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [type]="1" (onFormChanged)="formChanged()"></funding-info>
</div> </div>
<div *ngIf="field.type == 7"> <div *ngIf="field.type == 7">
<funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [field]="field" [type]="2" (onFormChanged)="formChanged()"></funding-info> <funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [type]="2" (onFormChanged)="formChanged()"></funding-info>
</div> </div>
<div *ngIf="field.type == 8"> <div *ngIf="field.type == 8">
<funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [field]="field" [type]="3" (onFormChanged)="formChanged()"></funding-info> <funding-info [formGroup]="formGroup" [grantformGroup]="formGroup.get('grant')" [projectFormGroup]="formGroup.get('project')" [funderFormGroup]="formGroup.get('funder')" [isFinalized]="isFinalized" [isNew]="isNew" [isUserOwner]="isUserOwner" [isRequired]="field.required" [type]="3" (onFormChanged)="formChanged()"></funding-info>
</div> </div>
<div *ngIf="field.type == 9"> <div *ngIf="field.type == 9">
<mat-form-field> <mat-form-field>
<app-single-auto-complete [formControl]="formGroup.get('extraProperties').get('license')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.LICENSE' | translate)}}" [configuration]="licenseAutoCompleteConfiguration"> <app-single-auto-complete [formControl]="formGroup.get('extraProperties').get('license')" placeholder="{{'DMP-EDITOR.FIELDS.LICENSE' | translate}}" [configuration]="licenseAutoCompleteConfiguration">
</app-single-auto-complete> </app-single-auto-complete>
<mat-error *ngIf="formGroup.get('extraProperties').get('license').hasError('backendError')"> <mat-error *ngIf="formGroup.get('extraProperties').get('license').hasError('backendError')">
{{formGroup.get('extraProperties').get('license').getError('backendError').message}}</mat-error> {{formGroup.get('extraProperties').get('license').getError('backendError').message}}</mat-error>
@ -238,7 +238,7 @@
</div> </div>
<div *ngIf="field.type == 10"> <div *ngIf="field.type == 10">
<mat-form-field> <mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.VISIBILITY' | translate)}}"> <mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}">
<mat-option *ngFor="let vis of visibles" [value]="vis.value"> <mat-option *ngFor="let vis of visibles" [value]="vis.value">
{{vis.name | translate}} {{vis.name | translate}}
</mat-option> </mat-option>
@ -267,7 +267,7 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<div *ngIf="field.category === 'EXTRA' && formGroup.get('extraFields')?.controls?.length > 0"> <div *ngIf="field.category === 'EXTRA'">
<div *ngIf="field.type === extraFieldTypesEnum.TEXT"> <div *ngIf="field.type === extraFieldTypesEnum.TEXT">
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{field.placeholder}}" type="text" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required"> <input matInput placeholder="{{field.placeholder}}" type="text" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required">
@ -305,11 +305,11 @@
<div class="col-12 card" *ngIf="section.hasTemplates"> <div class="col-12 card" *ngIf="section.hasTemplates">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class=""> <div class="input-form">
<div class="heading">Description templates</div> <div class="heading">Description templates</div>
<mat-form-field> <mat-form-field>
<mat-label>{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}</mat-label> <mat-label>{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}</mat-label>
<app-multiple-auto-complete placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate)}}" [hidePlaceholder]="true" required='true' [value]="sectionTemplates[section.ordinal - 1]" [configuration]="profilesAutoCompleteConfiguration" (optionRemoved)="onRemoveTemplate($event, i)" (optionActionClicked)="onPreviewTemplate($event, i)" (optionSelected)="onOptionSelected($event, i)"> <app-multiple-auto-complete placeholder="{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}" [hidePlaceholder]="true" required='true' [value]="sectionTemplates[section.ordinal - 1]" [configuration]="profilesAutoCompleteConfiguration" (optionRemoved)="onRemoveTemplate($event, i)" (optionActionClicked)="onPreviewTemplate($event, i)" (optionSelected)="onOptionSelected($event, i)">
</app-multiple-auto-complete> </app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')"> <mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
{{formGroup.get('profiles').getError('backendError').message}}</mat-error> {{formGroup.get('profiles').getError('backendError').message}}</mat-error>

View File

@ -357,13 +357,13 @@ a:hover {
} }
.input-form { .input-form {
// text-align: left; text-align: left;
// font-weight: 400; font-weight: 400;
// font-size: 16px; font-size: 16px;
// letter-spacing: 0.15px; letter-spacing: 0.15px;
// color: #7d7d7d; color: #7d7d7d;
// opacity: 1; opacity: 1;
// margin-bottom: 1rem; margin-bottom: 1rem;
} }
.insert-manually { .insert-manually {
@ -425,13 +425,5 @@ a:hover {
::ng-deep .input-form .mat-form-field-appearance-outline .mat-form-field-infix { ::ng-deep .input-form .mat-form-field-appearance-outline .mat-form-field-infix {
font-size: 1rem; font-size: 1rem;
// padding: 0.6em 0 1em 0 !important; 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;
// }

View File

@ -57,7 +57,6 @@ import { GrantEditorModel } from '@app/ui/grant/editor/grant-editor.model';
import { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.component'; import { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.component';
import { DmpProfileStatus } from '@app/core/common/enum/dmp-profile-status'; import { DmpProfileStatus } from '@app/core/common/enum/dmp-profile-status';
import { DatasetService } from '@app/core/services/dataset/dataset.service'; import { DatasetService } from '@app/core/services/dataset/dataset.service';
import { runInThisContext } from 'vm';
interface Visible { interface Visible {
value: boolean; value: boolean;
@ -65,9 +64,9 @@ interface Visible {
} }
@Component({ @Component({
selector: 'app-dmp-editor-blueprint', selector: 'app-dmp-editor-blueprint',
templateUrl: './dmp-editor-blueprint.component.html', templateUrl: './dmp-editor-blueprint.component.html',
styleUrls: ['./dmp-editor-blueprint.component.scss'] styleUrls: ['./dmp-editor-blueprint.component.scss']
}) })
export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent implements OnInit { export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent implements OnInit {
@ -85,7 +84,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
hasChanges = false; hasChanges = false;
isDiscarded = false; isDiscarded = false;
isCreateNew = false; isCreateNew = false;
isCreateNewProject = false; isCreateNewProject = false;
isCreateNewFunder = false; isCreateNewFunder = false;
@ -149,11 +148,11 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
private dialog: MatDialog, private dialog: MatDialog,
private lockService: LockService, private lockService: LockService,
private matomoService: MatomoService private matomoService: MatomoService
) { ) {
super(); super();
} }
ngOnInit(): void { ngOnInit(): void {
this.matomoService.trackPageView('DMP Editor'); this.matomoService.trackPageView('DMP Editor');
this.route.params this.route.params
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
@ -162,7 +161,81 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
if (itemId != null) { if (itemId != null) {
this.isNew = false; this.isNew = false;
this.getItem(itemId); this.dmpService.getSingle(itemId).pipe(map(data => data as DmpModel))
.pipe(takeUntil(this._destroyed))
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.extraProperties = new ExtraPropertiesFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.datasets = this.formGroup.get('datasets') as FormArray;
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
if (!isNullOrUndefined(this.formGroup.get('profile').value)) {
this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.step = 1;
this.addProfiles(this.dmp.profiles);
});
}
this.maxStep = this.formGroup.get('datasets') ? this.maxStep + this.formGroup.get('datasets').value.length - 1 : this.maxStep;
this.setIsUserOwner();
if (!this.isUserOwner) {
if(this.isUserMember()){
this.router.navigate(['plans', 'overview', itemId]);
return;
}
this.isFinalized = true;
this.formGroup.disable();
}
if (this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
if (this.authService.current() != null) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
}
}
this.associatedUsers = data.associatedUsers;
this.people = data.users;
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});
if(this.lockStatus){
this.dialog.open(PopupNotificationDialogComponent,{data:{
title:this.language.instant('DMP-EDITOR.LOCKED.TITLE'),
message:this.language.instant('DMP-EDITOR.LOCKED.MESSAGE')
}, maxWidth:'30em'});
}
});
});
} }
else { else {
this.dmp = new DmpEditorModel(); this.dmp = new DmpEditorModel();
@ -215,107 +288,25 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.formGroup.get('extraProperties').get('language').patchValue('en'); this.formGroup.get('extraProperties').get('language').patchValue('en');
} }
try { try{
const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[]; const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
profiles.sort((a, b) => a.label.localeCompare(b.label)); profiles.sort((a,b)=>a.label.localeCompare(b.label));
} catch { }catch{
console.info('Could not sort profiles'); console.info('Could not sort profiles');
} }
} }
}); });
this.profilesAutoCompleteConfiguration = { this.profilesAutoCompleteConfiguration = {
filterFn: this.filterProfiles.bind(this), filterFn: this.filterProfiles.bind(this),
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))), initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => item['label'], displayFn: (item) => item['label'],
titleFn: (item) => item['label'], titleFn: (item) => item['label'],
subtitleFn: (item) => item['description'], subtitleFn: (item) => item['description'],
popupItemActionIcon: 'visibility', popupItemActionIcon: 'visibility'
canRemoveItem: (item) => this.canRemoveItem(item)
}; };
} }
private getItem(itemId: String) {
this.dmpService.getSingle(itemId).pipe(map(data => data as DmpModel))
.pipe(takeUntil(this._destroyed))
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.extraProperties = new ExtraPropertiesFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.datasets = this.formGroup.get('datasets') as FormArray;
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
if (!isNullOrUndefined(this.formGroup.get('profile').value)) {
this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.step = 1;
this.sectionTemplates = new Array<Array<DatasetProfileModel>>();
this.addProfiles(this.dmp.profiles);
});
}
this.maxStep = this.formGroup.get('datasets') ? this.maxStep + this.formGroup.get('datasets').value.length - 1 : this.maxStep;
this.setIsUserOwner();
if (!this.isUserOwner) {
if (this.isUserMember()) {
this.router.navigate(['plans', 'overview', itemId]);
return;
}
this.isFinalized = true;
this.formGroup.disable();
}
if (this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
if (this.authService.current() != null) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
}
}
this.associatedUsers = data.associatedUsers;
this.people = data.users;
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});
if (this.lockStatus) {
this.dialog.open(PopupNotificationDialogComponent, {
data: {
title: this.language.instant('DMP-EDITOR.LOCKED.TITLE'),
message: this.language.instant('DMP-EDITOR.LOCKED.MESSAGE')
}, maxWidth: '30em'
});
}
});
});
}
extraFieldsArray(): FormArray { extraFieldsArray(): FormArray {
return this.formGroup.get('extraFields') as FormArray; return this.formGroup.get('extraFields') as FormArray;
@ -324,15 +315,15 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
setIsUserOwner() { setIsUserOwner() {
if (this.dmp) { if (this.dmp) {
const principal: Principal = this.authService.current(); const principal: Principal = this.authService.current();
this.isUserOwner = !!this.dmp.users.find(x => (x.role === Role.Owner) && (x.id === principal.id)); this.isUserOwner = !!this.dmp.users.find(x => (x.role === Role.Owner) && (x.id === principal.id) );
} }
} }
isUserMember(): boolean { isUserMember(): boolean{
try { try{
const principal: Principal = this.authService.current(); const principal: Principal = this.authService.current();
return !!this.dmp.users.find(x => (x.role === Role.Member) && (x.id === principal.id)); return !!this.dmp.users.find(x => (x.role === Role.Member) && (x.id === principal.id) );
} catch { }catch{
return false; return false;
} }
} }
@ -425,7 +416,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.saving = true; this.saving = true;
this.formService.touchAllFormFields(this.formGroup); this.formService.touchAllFormFields(this.formGroup);
if (!this._isDMPDescriptionValid()) { if(!this._isDMPDescriptionValid()){
const errmess = this._buildDMPDescriptionErrorMessages(); const errmess = this._buildDMPDescriptionErrorMessages();
this.showValidationErrorsDialog(undefined, errmess); this.showValidationErrorsDialog(undefined, errmess);
this.hintErrors = true; this.hintErrors = true;
@ -443,15 +434,13 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
selectDefaultBlueprint() { selectDefaultBlueprint() {
this.dmpProfileService.getSingleBlueprint(this.defaultBlueprintId) this.dmpProfileService.getSingleBlueprint(this.defaultBlueprintId)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition; this.selectedDmpBlueprintDefinition = result.definition;
this.formGroup.get('profile').setValue(result); this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length; this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
if (this.formGroup.get('label').valid && this.formGroup.get('description').valid) { this.nextStep();
this.nextStep(); });
}
});
} }
selectBlueprint() { selectBlueprint() {
@ -486,13 +475,13 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
hasProfile(sectionIndex: number): boolean { hasProfile(sectionIndex: number): boolean {
return this.formGroup.get('profiles') && this.formGroup.get('profiles').value && this.formGroup.get('profiles').value.some(x => x.data?.dmpSectionIndex?.includes(sectionIndex)); return this.formGroup.get('profiles') && this.formGroup.get('profiles').value && this.formGroup.get('profiles').value.some(x => x.data.dmpSectionIndex.includes(sectionIndex));
} }
addDataset(dmpSectionIndex: number) { addDataset(dmpSectionIndex: number) {
this.saving = true; this.saving = true;
if (!this._isDMPDescriptionValid()) { if(!this._isDMPDescriptionValid()){
const errmess = this._buildDMPDescriptionErrorMessages(); const errmess = this._buildDMPDescriptionErrorMessages();
this.showValidationErrorsDialog(undefined, errmess); this.showValidationErrorsDialog(undefined, errmess);
this.hintErrors = true; this.hintErrors = true;
@ -522,9 +511,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
onSubmit(addNew?: boolean, showAddDatasetDialog?: boolean): void { onSubmit(addNew?: boolean, showAddDatasetDialog?: boolean): void {
this.scrollTop = document.getElementById('editor-form').scrollTop; this.scrollTop = document.getElementById('editor-form').scrollTop;
// return; // return;
const rawvalue = this.formGroup.getRawValue(); this.dmpService.createDmp(this.formGroup.getRawValue())
if (rawvalue.profile instanceof Object) rawvalue.profile = rawvalue.profile.id;
this.dmpService.createDmp(rawvalue)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
complete => { complete => {
@ -588,10 +575,27 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
// On save keep editor position // On save keep editor position
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
if (dmp) { if (dmp) {
if (this.isNew) { if(this.isNew){
this.router.navigate(['/plans', 'edit', dmp.id]); this.router.navigate(['/plans', 'edit', dmp.id]);
} }
this.getItem(dmp.id); let dmpEditorModel: DmpEditorModel;
dmpEditorModel = new DmpEditorModel();
dmpEditorModel.grant = new GrantTabModel();
dmpEditorModel.project = new ProjectFormModel();
dmpEditorModel.funder = new FunderFormModel();
dmpEditorModel.extraProperties = new ExtraPropertiesFormModel();
dmpEditorModel.fromModel(dmp);
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.associatedUsers = dmp.associatedUsers;
this.people = dmp.users;
setTimeout(() => { this.formGroup = null; });
setTimeout(() => {
this.formGroup = dmpEditorModel.buildForm();
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});});
setTimeout(() => { document.getElementById('editor-form').scrollTop = this.scrollTop; }); setTimeout(() => { document.getElementById('editor-form').scrollTop = this.scrollTop; });
this.saving = false; this.saving = false;
this.isNew = false; this.isNew = false;
@ -626,10 +630,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.saving = false; this.saving = false;
} }
editDataset(id: string, isNew: boolean, showModal: boolean = false) { editDataset(id: string, isNew: boolean, showModal:boolean = false) {
if (showModal) { if(showModal){
const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, { const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, {
width: '500px', width: '500px',
autoFocus: false, autoFocus: false,
@ -644,7 +648,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
} }
}); });
} else { }else{
if (isNew) { if (isNew) {
this.router.navigate(['/datasets', 'new', id, this.dmpSectionIndex]); this.router.navigate(['/datasets', 'new', id, this.dmpSectionIndex]);
} else { } else {
@ -695,38 +699,38 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
//checks if the dpm is valid not taking into account the datasets validity //checks if the dpm is valid not taking into account the datasets validity
private _isDMPDescriptionValid(): boolean { private _isDMPDescriptionValid():boolean{
const form: FormGroup = this.formGroup; const form: FormGroup = this.formGroup;
if (form.controls) { if(form.controls){
return Object.keys(form.controls) return Object.keys(form.controls)
.map(controlName => {//get validity of each control .map(controlName=>{//get validity of each control
if (controlName === 'datasets') {//we dont care if datasets are valid if(controlName === 'datasets'){//we dont care if datasets are valid
return true; return true;
} }
return !form.get(controlName).invalid;//!! in case the control is disabled, we consider it valid return !form.get(controlName).invalid;//!! in case the control is disabled, we consider it valid
}) })
.reduce((isFormValid, isControlValid) => {//aggregate validities .reduce((isFormValid,isControlValid)=>{//aggregate validities
return isControlValid && isFormValid; return isControlValid && isFormValid;
}, true); }, true);
} }
return true; return true;
} }
private showValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) { private showValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) {
if (errmess) { if(errmess){
const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, { const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, {
disableClose: true, disableClose: true,
autoFocus: false, autoFocus: false,
restoreFocus: false, restoreFocus: false,
data: { data: {
errorMessages: errmess, errorMessages:errmess,
projectOnly: projectOnly projectOnly: projectOnly
}, },
}); });
} else { }else{
const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, { const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, {
disableClose: true, disableClose: true,
autoFocus: false, autoFocus: false,
@ -740,10 +744,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
private _buildDMPDescriptionErrorMessages(): string[] {//not including datasets private _buildDMPDescriptionErrorMessages(): string[]{//not including datasets
const errmess: string[] = []; const errmess: string[] = [];
Object.keys(this.formGroup.controls).forEach(controlName => { Object.keys(this.formGroup.controls).forEach(controlName=>{
if (controlName != 'datasets' && this.formGroup.get(controlName).invalid) { if(controlName != 'datasets' && this.formGroup.get(controlName).invalid){
errmess.push(...this._buildErrorMessagesForAbstractControl(this.formGroup.get(controlName), controlName)); errmess.push(...this._buildErrorMessagesForAbstractControl(this.formGroup.get(controlName), controlName));
} }
}) })
@ -752,16 +756,16 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
// takes as an input an abstract control and gets its error messages[] // takes as an input an abstract control and gets its error messages[]
private _buildErrorMessagesForAbstractControl(aControl: AbstractControl, controlName: string): string[] { private _buildErrorMessagesForAbstractControl(aControl: AbstractControl, controlName: string):string[]{
const errmess: string[] = []; const errmess:string[] = [];
if (aControl.invalid) { if(aControl.invalid){
if (aControl.errors) { if(aControl.errors){
//check if has placeholder //check if has placeholder
if ((<any>aControl).nativeElement !== undefined && (<any>aControl).nativeElement !== null) { if( (<any>aControl).nativeElement !== undefined && (<any>aControl).nativeElement !== null){
const placeholder = this._getPlaceHolder(aControl); const placeholder = this._getPlaceHolder(aControl);
if (placeholder) { if(placeholder){
controlName = placeholder; controlName = placeholder;
} }
} }
@ -772,19 +776,19 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
/*in case the aControl is FormControl then the it should have provided its error messages above. /*in case the aControl is FormControl then the it should have provided its error messages above.
No need to check case of FormControl below*/ No need to check case of FormControl below*/
if (aControl instanceof FormGroup) { if(aControl instanceof FormGroup){
const fg = aControl as FormGroup; const fg = aControl as FormGroup;
//check children //check children
Object.keys(fg.controls).forEach(controlName => { Object.keys(fg.controls).forEach(controlName=>{
errmess.push(...this._buildErrorMessagesForAbstractControl(fg.get(controlName), controlName)); errmess.push(...this._buildErrorMessagesForAbstractControl(fg.get(controlName), controlName));
}); });
} else if (aControl instanceof FormArray) { }else if(aControl instanceof FormArray){
const fa = aControl as FormArray; const fa = aControl as FormArray;
fa.controls.forEach((control, index) => { fa.controls.forEach((control,index)=>{
errmess.push(... this._buildErrorMessagesForAbstractControl(control, `${controlName} --> ${index + 1}`)); errmess.push(... this._buildErrorMessagesForAbstractControl(control, `${controlName} --> ${index+1}`));
}); });
} }
@ -828,23 +832,23 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return this.dmpService.searchDMPProfiles(request); return this.dmpService.searchDMPProfiles(request);
} }
registerFormEventsForDmpBlueprint(): void { registerFormEventsForDmpBlueprint(): void {
this.formGroup.get('profile').valueChanges this.formGroup.get('profile').valueChanges
.pipe( .pipe(
takeUntil(this._destroyed)) takeUntil(this._destroyed))
.subscribe(Option => { .subscribe(Option => {
if (Option instanceof Object) { if (Option instanceof Object) {
this.selectedDmpBlueprintDefinition = Option.definition; this.selectedDmpBlueprintDefinition = Option.definition;
this.checkForGrant(); this.checkForGrant();
this.checkForFunder(); this.checkForFunder();
this.checkForProject(); this.checkForProject();
this.buildExtraFields(); this.buildExtraFields();
this.addProfiles(); this.addProfiles();
} }
else { else {
this.selectedDmpBlueprintDefinition = null; this.selectedDmpBlueprintDefinition = null;
} }
}) })
} }
private buildExtraFields(): void { private buildExtraFields(): void {
@ -855,7 +859,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
extraField.id = field.id; extraField.id = field.id;
if (!isNullOrUndefined(this.dmp.extraFields)) { if (!isNullOrUndefined(this.dmp.extraFields)) {
let found = this.dmp.extraFields.find(f => f.id === field.id); let found = this.dmp.extraFields.find(f => f.id === field.id);
if (found !== undefined) { if(found !== undefined) {
extraField.value = found.value; extraField.value = found.value;
} }
} }
@ -866,7 +870,13 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
getExtraFieldIndex(id: string): string { getExtraFieldIndex(id: string): string {
return (this.formGroup.get('extraFields') as FormArray).controls.findIndex((element) => element.value.id == id).toString(); let foundFieldIndex: number;
(this.formGroup.get('extraFields') as FormArray).controls.forEach((element, index) => {
if(element.value.id === id) {
foundFieldIndex = index;
}
});
return foundFieldIndex.toString();
} }
private checkForGrant() { private checkForGrant() {
@ -912,27 +922,27 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
private addProfiles(profiles?: DmpDatasetProfile[]) { private addProfiles(profiles?: DmpDatasetProfile[]) {
for (let i = 0; i < this.selectedDmpBlueprintDefinition.sections.length; i++) { for(let i = 0; i < this.selectedDmpBlueprintDefinition.sections.length; i++){
this.sectionTemplates.push(new Array<DatasetProfileModel>()); this.sectionTemplates.push(new Array<DatasetProfileModel>());
} }
const templates: Array<DmpDatasetProfile> = new Array<DmpDatasetProfile>(); const templates: Array<DmpDatasetProfile> = new Array<DmpDatasetProfile>();
this.selectedDmpBlueprintDefinition.sections.forEach(section => { this.selectedDmpBlueprintDefinition.sections.forEach(section => {
if (profiles != null) { if (profiles !== undefined) {
profiles.filter(profile => profile.data.dmpSectionIndex.includes(section.ordinal - 1)).forEach(profile => this.sectionTemplates[section.ordinal - 1].push({ id: profile.descriptionTemplateId, label: profile.label, description: "" })); profiles.filter(profile => profile.data.dmpSectionIndex.includes(section.ordinal - 1)).forEach(profile => this.sectionTemplates[section.ordinal - 1].push({id: profile.descriptionTemplateId, label: profile.label, description: ""}));
} }
else { else {
section.descriptionTemplates.forEach(template => { section.descriptionTemplates.forEach(template => {
this.sectionTemplates[section.ordinal - 1].push({ id: template.descriptionTemplateId, label: template.label, description: "" }) this.sectionTemplates[section.ordinal - 1].push({id: template.descriptionTemplateId, label: template.label, description: ""})
let found: DmpDatasetProfile = templates.find(dmpDatasetProfile => dmpDatasetProfile.descriptionTemplateId == template.descriptionTemplateId); let found: DmpDatasetProfile = templates.find(dmpDatasetProfile => dmpDatasetProfile.descriptionTemplateId == template.descriptionTemplateId);
if (found === undefined) { if (found === undefined) {
let data: DmpDatasetProfileSectionsFormModel = new DmpDatasetProfileSectionsFormModel(); let data: DmpDatasetProfileSectionsFormModel= new DmpDatasetProfileSectionsFormModel();
data.dmpSectionIndex.push(section.ordinal - 1); data.dmpSectionIndex.push(section.ordinal - 1);
let id = null; let id = null;
if (profiles !== undefined) { if (profiles !== undefined) {
let existedProfile = profiles.find(profile => profile.descriptionTemplateId == template.descriptionTemplateId); let existedProfile = profiles.find(profile => profile.descriptionTemplateId == template.descriptionTemplateId);
if (existedProfile !== undefined) { if (existedProfile !== undefined) {
id = existedProfile.id; id = existedProfile.id;
} }
} }
let profile: DmpDatasetProfile = { let profile: DmpDatasetProfile = {
id: id, id: id,
@ -949,10 +959,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
}); });
(profiles !== undefined) ? this.formGroup.get('profiles').setValue(profiles) : this.formGroup.get('profiles').setValue(templates); (profiles !== undefined) ? this.formGroup.get('profiles').setValue(profiles) : this.formGroup.get('profiles').setValue(templates);
} }
dmpBlueprintAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { dmpBlueprintAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
filterFn: this.dmpBlueprintSearch.bind(this), filterFn: this.dmpBlueprintSearch.bind(this),
initialItems: (extraData) => this.dmpBlueprintSearch(''), initialItems: (extraData) => this.dmpBlueprintSearch(''),
displayFn: (item) => item['label'], displayFn: (item) => item['label'],
@ -968,7 +978,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return this.dmpProfileService.getPagedBlueprint(request).pipe(map(x => x.data)); return this.dmpProfileService.getPagedBlueprint(request).pipe(map(x => x.data));
} }
getLanguageInfos(): LanguageInfo[] { getLanguageInfos(): LanguageInfo[] {
return this.languageInfoService.getLanguageInfoValues(); return this.languageInfoService.getLanguageInfoValues();
} }
@ -984,7 +994,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return associates; return associates;
} }
organisationsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = { organisationsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
filterFn: this.filterOrganisations.bind(this), filterFn: this.filterOrganisations.bind(this),
initialItems: (excludedItems: any[]) => this.filterOrganisations('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))), initialItems: (excludedItems: any[]) => this.filterOrganisations('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => item['name'], displayFn: (item) => item['name'],
@ -999,7 +1009,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'))
}; };
// Researchers // Researchers
filterResearchers(value: string): Observable<ExternalSourceItemModel[]> { filterResearchers(value: string): Observable<ExternalSourceItemModel[]> {
return this.externalSourcesService.searchDMPResearchers({ criteria: { name: value, like: null } }); return this.externalSourcesService.searchDMPResearchers({ criteria: { name: value, like: null } });
} }
@ -1067,7 +1077,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}); });
} }
showToggleButton() { showToggleButton() {
return (!this.isFinalized && this.isUserOwner) || this.isClone; return (!this.isFinalized && this.isUserOwner) || this.isClone;
} }
@ -1090,40 +1100,49 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return false; return false;
} }
canRemoveItem(item): boolean { onRemoveTemplate(event, sectionIndex: number) {
let found = false; let found = false;
let profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
this.formGroup.get('datasets')['controls'].forEach(element => { this.formGroup.get('datasets')['controls'].forEach(element => {
if ((element.get('profile').value.id === item.id) && (element.get('dmpSectionIndex').value === (this.step - 1))) { if ((element.get('profile').value.id === event.id) && (element.get('dmpSectionIndex').value === sectionIndex)) {
found = true; found = true;
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-REMOVE-TEMPLATE'), SnackBarNotificationLevel.Success); this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-REMOVE-TEMPLATE'), SnackBarNotificationLevel.Success);
} }
}); });
if (found) return false if (found) {
else return true; this.formGroup.get('profiles').setValue(profiles);
} this.profilesAutoCompleteConfiguration = {
filterFn: this.filterProfiles.bind(this),
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => item['label'],
titleFn: (item) => item['label'],
subtitleFn: (item) => item['description'],
popupItemActionIcon: 'visibility'
};
onRemoveTemplate(event, sectionIndex: number) { }
let profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[]; else{
this.sectionTemplates[sectionIndex] = this.sectionTemplates[sectionIndex].filter(sectionProfile => sectionProfile.id !== event.id); this.sectionTemplates[sectionIndex] = this.sectionTemplates[sectionIndex].filter(sectionProfile => sectionProfile.id !== event.id);
profiles = profiles.filter(sectionProfile => sectionProfile.descriptionTemplateId !== event.id || !sectionProfile.data.dmpSectionIndex.includes(sectionIndex)); profiles = profiles.filter(sectionProfile => sectionProfile.descriptionTemplateId !== event.id);
this.formGroup.get('profiles').setValue(profiles); this.formGroup.get('profiles').setValue(profiles);
}
} }
addProfile(event, sectionIndex: number) { addProfile(event, sectionIndex: number) {
const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[]; const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
let found = profiles.find((value) => value.id === event.id); let found = profiles.find((value) => value.id === event.id);
if (found !== undefined) { if(found !== undefined) {
if (found.data.dmpSectionIndex.indexOf(sectionIndex) === -1) { if(found.data.dmpSectionIndex.indexOf(sectionIndex) === -1){
found.data.dmpSectionIndex.push(sectionIndex); found.data.dmpSectionIndex.push(sectionIndex);
} }
else { else{
this.sectionTemplates[sectionIndex].pop(); this.sectionTemplates[sectionIndex].pop();
} }
} }
else { else{
let dmpDatasetProfileSection: DmpDatasetProfileSectionsFormModel = new DmpDatasetProfileSectionsFormModel(); let dmpDatasetProfileSection: DmpDatasetProfileSectionsFormModel = new DmpDatasetProfileSectionsFormModel();
dmpDatasetProfileSection.dmpSectionIndex = [sectionIndex]; dmpDatasetProfileSection.dmpSectionIndex = [sectionIndex];
profiles.push({ id: null, descriptionTemplateId: event.id, label: event.label, data: dmpDatasetProfileSection }); profiles.push({id: null, descriptionTemplateId: event.id, label: event.label, data: dmpDatasetProfileSection});
} }
this.formGroup.get('profiles').setValue(profiles); this.formGroup.get('profiles').setValue(profiles);
} }
@ -1141,14 +1160,19 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) { if (result) {
this.addProfile(event, sectionIndex); this.addProfile(event, sectionIndex);
const items = this.sectionTemplates[sectionIndex]; this.profilesAutoCompleteConfiguration = {
items.push({ id: event.id, label: event.label, description: "" }); filterFn: this.filterProfiles.bind(this),
this.sectionTemplates[sectionIndex] = [...items]; initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => item['label'],
titleFn: (item) => item['label'],
subtitleFn: (item) => item['description'],
popupItemActionIcon: 'visibility'
};
} }
}); });
} }
onOptionSelected(event, sectionIndex: number) { onOptionSelected(event, sectionIndex: number){
try { try{
this.addProfile(event, sectionIndex); this.addProfile(event, sectionIndex);
// const profileCounts: Map<String, number> = new Map<String, number>(); // const profileCounts: Map<String, number> = new Map<String, number>();
// profiles.forEach((value) => profileCounts.set(value.id, (profileCounts.get(value.id) !== undefined ? profileCounts.get(value.id): 0 ) + 1)); // profiles.forEach((value) => profileCounts.set(value.id, (profileCounts.get(value.id) !== undefined ? profileCounts.get(value.id): 0 ) + 1));
@ -1161,7 +1185,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
// }); // });
// duplicateProfiles.forEach((value) => profiles.splice(profiles.lastIndexOf(value), 1)); // duplicateProfiles.forEach((value) => profiles.splice(profiles.lastIndexOf(value), 1));
// profiles.sort((a,b)=> a.label.localeCompare(b.label)); // profiles.sort((a,b)=> a.label.localeCompare(b.label));
} catch { }catch{
console.info('Could not sort Dataset Templates') console.info('Could not sort Dataset Templates')
} }
} }

View File

@ -16,7 +16,7 @@
<div class="funder-form" *ngIf="type == 1"> <div class="funder-form" *ngIf="type == 1">
<div *ngIf="!isCreateNewFunder"> <div *ngIf="!isCreateNewFunder">
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<app-single-auto-complete [required]="isRequired" [formControl]="funderFormGroup.get('existFunder')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.FUNDER' | translate)}}" [configuration]="funderAutoCompleteConfiguration"> <app-single-auto-complete [required]="isRequired" [formControl]="funderFormGroup.get('existFunder')" placeholder="{{'DMP-EDITOR.FIELDS.FUNDER' | translate}}" [configuration]="funderAutoCompleteConfiguration">
</app-single-auto-complete> </app-single-auto-complete>
</mat-form-field> </mat-form-field>
</div> </div>
@ -66,7 +66,7 @@
<div class="grant-form" *ngIf="type == 2"> <div class="grant-form" *ngIf="type == 2">
<div *ngIf="!isCreateNew"> <div *ngIf="!isCreateNew">
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<app-single-auto-complete [required]="isRequired" [formControl]="grantformGroup.get('existGrant')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.GRANT' | translate)}}" [configuration]="grantAutoCompleteConfiguration"> <app-single-auto-complete [required]="isRequired" [formControl]="grantformGroup.get('existGrant')" placeholder="{{'DMP-EDITOR.FIELDS.GRANT' | translate}}" [configuration]="grantAutoCompleteConfiguration">
</app-single-auto-complete> </app-single-auto-complete>
</mat-form-field> </mat-form-field>
</div> </div>
@ -122,7 +122,7 @@
<div class="project-form" *ngIf="type == 3"> <div class="project-form" *ngIf="type == 3">
<div *ngIf="!isCreateNewProject"> <div *ngIf="!isCreateNewProject">
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<app-single-auto-complete [formControl]="projectFormGroup.get('existProject')" placeholder="{{field?.placeholder?.length > 0 ? field.placeholder : ('DMP-EDITOR.FIELDS.PROJECT' | translate)}}" [configuration]="projectAutoCompleteConfiguration" [required]="isRequired"> <app-single-auto-complete [formControl]="projectFormGroup.get('existProject')" placeholder="{{'DMP-EDITOR.FIELDS.PROJECT' | translate}}" [configuration]="projectAutoCompleteConfiguration" [required]="isRequired">
</app-single-auto-complete> </app-single-auto-complete>
</mat-form-field> </mat-form-field>
</div> </div>

View File

@ -14,7 +14,6 @@ import { FunderCriteria } from '@app/core/query/funder/funder-criteria';
import { debounceTime, filter, map, switchMap, takeUntil, tap } from 'rxjs/operators'; import { debounceTime, filter, map, switchMap, takeUntil, tap } from 'rxjs/operators';
import { isNullOrUndefined } from '@swimlane/ngx-datatable'; import { isNullOrUndefined } from '@swimlane/ngx-datatable';
import { FieldInSection } from '@app/core/model/dmp/dmp-blueprint/dmp-blueprint';
@Component({ @Component({
selector: 'funding-info', selector: 'funding-info',
templateUrl: './funding-info.component.html', templateUrl: './funding-info.component.html',
@ -31,7 +30,6 @@ export class FundingInfoComponent extends BaseComponent implements OnInit {
@Input() isRequired: boolean; @Input() isRequired: boolean;
@Input() type: number; @Input() type: number;
@Input() field: FieldInSection;
@Input() formGroup: FormGroup; @Input() formGroup: FormGroup;
@Input() grantformGroup: FormGroup; @Input() grantformGroup: FormGroup;

View File

@ -332,7 +332,7 @@
vertical-align: bottom; vertical-align: bottom;
} }
:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix {
padding: 0rem 0rem 0.4rem 0rem !important; padding: 0rem 0rem 0.4rem 0rem !important;
} }

View File

@ -1,54 +1,54 @@
import { Location } from '@angular/common'; import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import {MatDialog} from '@angular/material/dialog';
import { FormGroup } from '@angular/forms'; import {ActivatedRoute, Params, Router} from '@angular/router';
import { MatDialog } from '@angular/material/dialog'; import {DatasetStatus} from '@app/core/common/enum/dataset-status';
import { ActivatedRoute, Params, Router } from '@angular/router'; import {DmpStatus} from '@app/core/common/enum/dmp-status';
import { DatasetStatus } from '@app/core/common/enum/dataset-status'; import {Principal} from '@app/core/model/auth/principal';
import { DmpStatus } from '@app/core/common/enum/dmp-status'; import {DatasetOverviewModel} from '@app/core/model/dataset/dataset-overview';
import { Role } from "@app/core/common/enum/role"; import {DatasetsToBeFinalized} from '@app/core/model/dataset/datasets-toBeFinalized';
import { Principal } from '@app/core/model/auth/principal'; import {DmpOverviewModel} from '@app/core/model/dmp/dmp-overview';
import { DatasetOverviewModel } from '@app/core/model/dataset/dataset-overview'; import {UserInfoListingModel} from '@app/core/model/user/user-info-listing';
import { DatasetsToBeFinalized } from '@app/core/model/dataset/datasets-toBeFinalized'; import {AuthService} from '@app/core/services/auth/auth.service';
import { DepositConfigurationModel } from '@app/core/model/deposit/deposit-configuration'; import {DmpService} from '@app/core/services/dmp/dmp.service';
import { DmpModel } from '@app/core/model/dmp/dmp';
import { DmpBlueprintDefinition, SystemFieldType } from '@app/core/model/dmp/dmp-blueprint/dmp-blueprint';
import { DmpOverviewModel } from '@app/core/model/dmp/dmp-overview';
import { DoiModel } from '@app/core/model/doi/doi';
import { UserInfoListingModel } from '@app/core/model/user/user-info-listing';
import { VersionListingModel } from '@app/core/model/version/version-listing.model';
import { AuthService } from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { DepositRepositoriesService } from '@app/core/services/deposit-repositories/deposit-repositories.service';
import { DmpProfileService } from '@app/core/services/dmp/dmp-profile.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { import {
SnackBarNotificationLevel, SnackBarNotificationLevel,
UiNotificationService UiNotificationService
} from '@app/core/services/notification/ui-notification-service'; } from '@app/core/services/notification/ui-notification-service';
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component'; import {ConfirmationDialogComponent} from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { import {
DmpFinalizeDialogComponent, DmpFinalizeDialogComponent,
DmpFinalizeDialogInput, DmpFinalizeDialogInput,
DmpFinalizeDialogOutput DmpFinalizeDialogOutput
} from '@app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component'; } from '@app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item'; import {BreadcrumbItem} from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils'; import {BaseComponent} from '@common/base/base.component';
import { BaseComponent } from '@common/base/base.component'; import {TranslateService} from '@ngx-translate/core';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver'; import * as FileSaver from 'file-saver';
import { Observable, of as observableOf } from 'rxjs'; import {Observable, of as observableOf} from 'rxjs';
import { map, takeUntil } from 'rxjs/operators'; import {map, takeUntil} from 'rxjs/operators';
import { CloneDialogComponent } from '../clone/clone-dialog/clone-dialog.component'; import {Role} from "@app/core/common/enum/role";
import { DmpEditorModel } from '../editor/dmp-editor.model'; import {DmpInvitationDialogComponent} from '../invitation/dmp-invitation-dialog.component';
import { ExtraPropertiesFormModel } from '../editor/general-tab/extra-properties-form.model'; import {ConfigurationService} from '@app/core/services/configuration/configuration.service';
import { FunderFormModel } from '../editor/grant-tab/funder-form-model'; import {Location} from '@angular/common';
import { GrantTabModel } from '../editor/grant-tab/grant-tab-model'; import {FormGroup} from '@angular/forms';
import { ProjectFormModel } from '../editor/grant-tab/project-form-model'; import {LockService} from '@app/core/services/lock/lock.service';
import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation-dialog.component'; import {VersionListingModel} from '@app/core/model/version/version-listing.model';
import { StartNewDmpDialogComponent } from '../start-new-dmp-dialogue/start-new-dmp-dialog.component'; import {CloneDialogComponent} from '../clone/clone-dialog/clone-dialog.component';
import {DmpModel} from '@app/core/model/dmp/dmp';
import {DmpEditorModel} from '../editor/dmp-editor.model';
import {FunderFormModel} from '../editor/grant-tab/funder-form-model';
import {ProjectFormModel} from '../editor/grant-tab/project-form-model';
import {GrantTabModel} from '../editor/grant-tab/grant-tab-model';
import {ExtraPropertiesFormModel} from '../editor/general-tab/extra-properties-form.model';
import {StartNewDmpDialogComponent} from '../start-new-dmp-dialogue/start-new-dmp-dialog.component';
import {MatomoService} from '@app/core/services/matomo/matomo-service';
import {PopupNotificationDialogComponent} from '@app/library/notification/popup/popup-notification.component';
import {DepositRepositoriesService} from '@app/core/services/deposit-repositories/deposit-repositories.service';
import {DepositConfigurationModel} from '@app/core/model/deposit/deposit-configuration';
import {DoiModel} from '@app/core/model/doi/doi';
import {isNullOrUndefined} from '@app/utilities/enhancers/utils';
import { DmpBlueprintDefinition, FieldCategory, SystemFieldType } from '@app/core/model/dmp/dmp-blueprint/dmp-blueprint';
import { DmpProfileService } from '@app/core/services/dmp/dmp-profile.service';
@Component({ @Component({
selector: 'app-dmp-overview', selector: 'app-dmp-overview',
@ -113,7 +113,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.dmp = data; this.dmp = data;
if (!this.hasDoi()) { if(!this.hasDoi()) {
this.selectedModel = this.dmp.dois[0]; this.selectedModel = this.dmp.dois[0];
} }
this.checkLockStatus(this.dmp.id); this.checkLockStatus(this.dmp.id);
@ -140,7 +140,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.dmp = data; this.dmp = data;
if (!this.hasDoi()) { if(!this.hasDoi()) {
this.selectedModel = this.dmp.dois[0]; this.selectedModel = this.dmp.dois[0];
} }
// this.checkLockStatus(this.dmp.id); // this.checkLockStatus(this.dmp.id);
@ -160,12 +160,12 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
} }
}); });
this.depositRepositoriesService.getAvailableRepos() this.depositRepositoriesService.getAvailableRepos()
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
repos => { repos => {
this.depositRepos = repos; this.depositRepos = repos;
}, },
error => this.depositRepos = []); error => this.depositRepos = []);
} }
onFetchingDeletedCallbackError(redirectRoot: string) { onFetchingDeletedCallbackError(redirectRoot: string) {
@ -211,7 +211,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.dmpModel.status = DmpStatus.Draft; this.dmpModel.status = DmpStatus.Draft;
this.formGroup = this.dmpModel.buildForm(); this.formGroup = this.dmpModel.buildForm();
if (!isNullOrUndefined(this.formGroup.get('profile').value)) { if (!isNullOrUndefined(this.formGroup.get('profile').value)) {
this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value) this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
@ -220,7 +220,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.checkForProject(result.definition); this.checkForProject(result.definition);
}); });
} }
if (!isNewVersion) { if (!isNewVersion) {
this.formGroup.get('label').setValue(this.dmp.label + " New"); this.formGroup.get('label').setValue(this.dmp.label + " New");
} }
@ -572,7 +572,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
return this.depositRepos.filter(repo => !this.dmp.dois.find(doi => doi.repositoryId === repo.repositoryId)); return this.depositRepos.filter(repo => !this.dmp.dois.find(doi => doi.repositoryId === repo.repositoryId));
} }
moreDeposit() { moreDeposit(){
return (this.dmp.dois.length < this.depositRepos.length); return (this.dmp.dois.length < this.depositRepos.length);
} }
@ -617,17 +617,17 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
complete => { complete => {
if (extraProperties.visible) { if(extraProperties.visible){
//this.publish(this.dmp.id); //this.publish(this.dmp.id);
this.dmpService.publish(this.dmp.id) this.dmpService.publish(this.dmp.id)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(() => { .subscribe(() => {
//this.hasPublishButton = false; //this.hasPublishButton = false;
this.dmp.status = DmpStatus.Finalized; this.dmp.status = DmpStatus.Finalized;
this.onUpdateCallbackSuccess(); this.onUpdateCallbackSuccess();
}); });
} }
else { else{
this.dmp.status = DmpStatus.Finalized; this.dmp.status = DmpStatus.Finalized;
this.onUpdateCallbackSuccess(); this.onUpdateCallbackSuccess();
} }
@ -648,22 +648,22 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
return this.dmpProfileService.getSingleBlueprint(blueprintId) return this.dmpProfileService.getSingleBlueprint(blueprintId)
.pipe(map(result => { .pipe(map(result => {
return result.definition.sections.some(section => { return result.definition.sections.some(section => {
if (!section.hasTemplates) if(!section.hasTemplates)
return false; return false;
return section.descriptionTemplates.some(template => { return section.descriptionTemplates.some(template => {
if (!(template.minMultiplicity > 0)) if(!(template.minMultiplicity > 0))
return false; return false;
let count = 0; let count = 0;
dmpModel.datasets.filter(dataset => dataset.dmpSectionIndex === (section.ordinal - 1)).forEach(dataset => { dmpModel.datasets.filter(dataset => dataset.dmpSectionIndex === (section.ordinal - 1)).forEach(dataset => {
if (dataset.profile.id === template.descriptionTemplateId) { if(dataset.profile.id === template.descriptionTemplateId){
count++; count++;
} }
}) })
if (count < template.minMultiplicity) { if(count < template.minMultiplicity){
this.dialog.open(PopupNotificationDialogComponent, { this.dialog.open(PopupNotificationDialogComponent, {
data: { data: {
title: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.TITLE', { 'minMultiplicity': template.minMultiplicity }), title: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.TITLE', {'minMultiplicity': template.minMultiplicity}),
message: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.MESSAGE',) message: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.MESSAGE', )
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
return true; return true;
@ -735,7 +735,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.router.navigate(['/datasets', 'new', this.dmp.id]); this.router.navigate(['/datasets', 'new', this.dmp.id]);
} }
selectDoi(doiModel: DoiModel) { selectDoi(doiModel: DoiModel){
this.selectedModel = doiModel; this.selectedModel = doiModel;
const foundIdx = this.dmp.dois.findIndex(el => el.id == doiModel.id); const foundIdx = this.dmp.dois.findIndex(el => el.id == doiModel.id);
this.dmp.dois.splice(foundIdx, 1); this.dmp.dois.splice(foundIdx, 1);
@ -744,17 +744,17 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
createDoiLink(doiModel: DoiModel): string { createDoiLink(doiModel: DoiModel): string {
const repository = this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId); const repository = this.depositRepos.find(r => r.repositoryId == doiModel.repositoryId);
if (typeof repository !== "undefined") { if(typeof repository !== "undefined"){
if (doiModel.repositoryId == "Zenodo") { if(doiModel.repositoryId == "Zenodo"){
const doiarr = doiModel.doi.split('.'); const doiarr = doiModel.doi.split('.');
const id = doiarr[doiarr.length - 1]; const id = doiarr[doiarr.length - 1];
return repository.repositoryRecordUrl + id; return repository.repositoryRecordUrl + id;
} }
else { else{
return repository.repositoryRecordUrl + doiModel.doi; return repository.repositoryRecordUrl + doiModel.doi;
} }
} }
else { else{
return ""; return "";
} }
} }
@ -857,13 +857,11 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed)) this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
.subscribe(lockStatus => { .subscribe(lockStatus => {
this.lockStatus = lockStatus this.lockStatus = lockStatus
if (lockStatus) { if(lockStatus){
this.dialog.open(PopupNotificationDialogComponent, { this.dialog.open(PopupNotificationDialogComponent,{data:{
data: { title:this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.TITLE'),
title: this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.TITLE'), message:this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.MESSAGE')
message: this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.MESSAGE') }, maxWidth:'30em'});
}, maxWidth: '30em'
});
} }
}); });
} }

View File

@ -52,7 +52,7 @@
</div> </div>
</div> </div>
<div *ngIf="showDelete" class="col-auto align-self-center"> <div *ngIf="showDelete" class="col-auto align-self-center">
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();" [disabled]="form.disabled"> <button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div> </div>

View File

@ -48,10 +48,6 @@
{ {
"label": "GENERAL.LANGUAGES.POLISH", "label": "GENERAL.LANGUAGES.POLISH",
"value": "pl" "value": "pl"
},
{
"label": "GENERAL.LANGUAGES.BASQUE",
"value": "baq"
} }
], ],
"loginProviders": { "loginProviders": {
@ -105,10 +101,5 @@
"allowOrganizationCreator": true, "allowOrganizationCreator": true,
"useSplash": false, "useSplash": false,
"orcidPath": "https://orcid.org/", "orcidPath": "https://orcid.org/",
"maxFileSizeInMB": 10, "maxFileSizeInMB": 10
"newReleaseNotification": {
"link": "https://www.openaire.eu/gazing-the-future-output-management-plans",
"versionCode": "0",
"expires": "2024-02-15T00:00"
}
} }

View File

@ -1,43 +0,0 @@
var sign_out_google = (function() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out from google.');
});
});
var simple_notifier = (function(type, title, message) {
setTimeout(function() {
$(".alert").remove();
}, 11000);
return notify(type, title, message, null, null, null, null, null, null, null, null, null, null);
});
function notify(type, title, message, delay, icon, url, target, allow_dismiss, offset_x, offset_y, animate_enter, animate_exit, newest_on_top){
var options = {};
if(icon!=null) options.icon = icon;
if(title!=null) options.title = title;
if(message!=null) options.message = message;
if(url!=null) options.url = url;
if(target!=null) options.target = target;
var settings = {};
if(type!=null) settings.type = type;
if(allow_dismiss!=null) settings.allow_dismiss = allow_dismiss;
settings.delay = 5;
if(delay!=null) settings.delay = delay;
return $.notify(options,settings, delay);
}

File diff suppressed because it is too large Load Diff

View File

@ -191,8 +191,7 @@
"SERBIAN": "Serbian", "SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese", "PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Source", "FIELD-AUTOCOMPLETE-SOURCE": "Source",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Date Picker", "FIELD-DATE-PICKER-TITLE": "Date Picker",
"FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text", "FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text",
"FIELD-DATE-PICKER-LABEL": "Label", "FIELD-DATE-PICKER-LABEL": "Label",
@ -871,10 +864,10 @@
"DESCRIPTION": "Description", "DESCRIPTION": "Description",
"SELECT-DESCRIPTIONS-TO-CLONE": "Select which descriptions to include in the new DMP. Selected descriptions will be editable.", "SELECT-DESCRIPTIONS-TO-CLONE": "Select which descriptions to include in the new DMP. Selected descriptions will be editable.",
"SELECT-DESCRIPTIONS-NONE": "Not available Descriptions for this DMP.", "SELECT-DESCRIPTIONS-NONE": "Not available Descriptions for this DMP.",
"TEXT-INFO": "Descriptions are documented following pre-defined templates which set the content of the descriptions. In {{ APP_NAME }}, a DMP can contain as many descriptions as the entities it documents. Browse ", "TEXT-INFO": "Datasets are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents. Browse ",
"TEXT-INFO-REST": " for a look at entities described in {{ APP_NAME }} DMPs", "TEXT-INFO-REST": " for a look at datasets described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Descriptions", "LINK-PUBLIC-DATASETS": "Public Datasets",
"TEXT-INFO-PAR": "New descriptions can be added to existing DMPs at any time and be described with more than one template. Descriptions can also be cloned and re-used in other DMPs as well as be deleted without negatively affecting the DMP as a whole.", "TEXT-INFO-PAR": "New datasets can be added to existing DMPs at any time and be described with more than one template. Datasets can also be cloned and re-used in other DMPs as well as be deleted without negatively affecting the DMP as a whole.",
"COLUMNS": { "COLUMNS": {
"NAME": "Name", "NAME": "Name",
"REFERNCE": "Referenz", "REFERNCE": "Referenz",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Bestehenden DMP auswählen" "PLACEHOLDER": "Bestehenden DMP auswählen"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1760,7 +1753,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Einstellungen", "TITLE": "Einstellungen",

View File

@ -27,7 +27,7 @@
"UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout", "UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout",
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login", "UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete", "SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Descriptions are associated with it", "UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Datasets are associated with it",
"SUCCESSFUL-DMP-BLUEPRINT-DELETE": "Successful Delete", "SUCCESSFUL-DMP-BLUEPRINT-DELETE": "Successful Delete",
"UNSUCCESSFUL-DMP-BLUEPRINT-DELETE": "This blueprint can not deleted, because DMPs are associated with it", "UNSUCCESSFUL-DMP-BLUEPRINT-DELETE": "This blueprint can not deleted, because DMPs are associated with it",
"SUCCESSFUL-DESCRIPTION-TEMPLATE-TYPE-DELETE": "Successful Delete", "SUCCESSFUL-DESCRIPTION-TEMPLATE-TYPE-DELETE": "Successful Delete",
@ -105,7 +105,7 @@
}, },
"DMP-TO-DATASET-DIALOG": { "DMP-TO-DATASET-DIALOG": {
"FROM-DMP": "You have successfully created your", "FROM-DMP": "You have successfully created your",
"DMP": "Plan", "DMP": "DMP",
"TO-DATASET": "You will be transferred to the", "TO-DATASET": "You will be transferred to the",
"DATASET": "Dataset", "DATASET": "Dataset",
"EDITOR": "editor", "EDITOR": "editor",
@ -129,11 +129,11 @@
"GENERAL": "Data Management Plans Creator", "GENERAL": "Data Management Plans Creator",
"ABOUT": "About", "ABOUT": "About",
"PRIVACY": "Privacy Policy", "PRIVACY": "Privacy Policy",
"OPENSOURCE-LICENCES": "Opensource Licenses", "OPENSOURCE-LICENCES": "Opensource Licences",
"TERMS": "Terms Of Service", "TERMS": "Terms Of Service",
"COOKIES-POLICY": "Cookies Policy", "COOKIES-POLICY": "Cookies Policy",
"PLANS": "My Plans", "PLANS": "My DMPs",
"EXPLORE-PLANS": "Published Plans", "EXPLORE-PLANS": "Published DMPs",
"QUICK-WIZARD": "New DMP (Wizard)", "QUICK-WIZARD": "New DMP (Wizard)",
"PLANS-NEW": "New DMP (Expert)", "PLANS-NEW": "New DMP (Expert)",
"DMP-NEW": "New DMP", "DMP-NEW": "New DMP",
@ -142,7 +142,7 @@
"DATASETCREATEWIZARD": "Add Dataset (Wizard)", "DATASETCREATEWIZARD": "Add Dataset (Wizard)",
"GRANTS": "My Grants", "GRANTS": "My Grants",
"DMP-BLUEPRINTS": "DMP Blueprints", "DMP-BLUEPRINTS": "DMP Blueprints",
"DATASET-PROFILES": "Description Templates", "DATASET-PROFILES": "Dataset Templates",
"DESCRIPTION-TYPES": "Description Types", "DESCRIPTION-TYPES": "Description Types",
"USERS": "Users", "USERS": "Users",
"PROFILE": "My Profile", "PROFILE": "My Profile",
@ -159,8 +159,8 @@
"DMP-BLUEPRINT-NEW": "New DMP Blueprint", "DMP-BLUEPRINT-NEW": "New DMP Blueprint",
"DMP-BLUEPRINT-CLONE": "New Clone of DMP Blueprint", "DMP-BLUEPRINT-CLONE": "New Clone of DMP Blueprint",
"DMP-BLUEPRINT-EDIT": "Edit DMP Blueprint", "DMP-BLUEPRINT-EDIT": "Edit DMP Blueprint",
"DATASET-PROFILES-NEW": "New Description Template", "DATASET-PROFILES-NEW": "New Dataset Template",
"DATASET-PROFILES-EDIT": "Edit Description Template", "DATASET-PROFILES-EDIT": "Edit Dataset Template",
"DESCRIPTION-TYPE-NEW": "New Description Type", "DESCRIPTION-TYPE-NEW": "New Description Type",
"DESCRIPTION-TYPE-EDIT": "Edit Description Type", "DESCRIPTION-TYPE-EDIT": "Edit Description Type",
"EXPLORE-PLANS-OVERVIEW": "Published DMP Overview", "EXPLORE-PLANS-OVERVIEW": "Published DMP Overview",
@ -168,8 +168,8 @@
"DMP-PUBLIC-EDIT": "View Published DMP", "DMP-PUBLIC-EDIT": "View Published DMP",
"DATASET-COPY": "Copy Dataset", "DATASET-COPY": "Copy Dataset",
"DATASET-UPDATE": "Update Dataset", "DATASET-UPDATE": "Update Dataset",
"DATASET-PROFILES-NEW-VERSION": "New Version of Description Template", "DATASET-PROFILES-NEW-VERSION": "New Version of Dataset Template",
"DATASET-PROFILES-CLONE": "New Clone of Description Template", "DATASET-PROFILES-CLONE": "New Clone of Dataset Template",
"LANGUAGE-EDITOR": "Language Editor", "LANGUAGE-EDITOR": "Language Editor",
"GUIDE-EDITOR": "User Guide Editor", "GUIDE-EDITOR": "User Guide Editor",
"LANGUAGE": "Language", "LANGUAGE": "Language",
@ -191,8 +191,7 @@
"SERBIAN": "Serbian", "SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese", "PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -224,14 +223,14 @@
"TITLE": "{{ APP_NAME_CAPS }}", "TITLE": "{{ APP_NAME_CAPS }}",
"GRANTS": "Grants", "GRANTS": "Grants",
"GRANT": "Grant", "GRANT": "Grant",
"DMP": "Plan", "DMP": "DMP",
"DMPS": "Plans", "DMPS": "DMPs",
"MY-DMPS": "MY Plans", "MY-DMPS": "MY DMPs",
"DATASETS": "Datasets", "DATASETS": "Datasets",
"DESCRIPTION": "Description", "DESCRIPTION": "Description",
"PUBLIC-DATASETS": "Explore {{ APP_NAME_CAPS }}", "PUBLIC-DATASETS": "Explore {{ APP_NAME_CAPS }}",
"USERS": "Users", "USERS": "Users",
"DATASETS-ADMIN": "Description Templates", "DATASETS-ADMIN": "Dataset Templates",
"DMP-BLUEPRINTS": "DMP Blueprints", "DMP-BLUEPRINTS": "DMP Blueprints",
"ABOUT": "About", "ABOUT": "About",
"MY-DATASET-DESCRIPTIONS": "MY DATASETS", "MY-DATASET-DESCRIPTIONS": "MY DATASETS",
@ -244,13 +243,13 @@
"TEMPLATE": "TEMPLATE", "TEMPLATE": "TEMPLATE",
"DMP-BLUEPRINTS-CAPS": "DMP BLUEPRINTS", "DMP-BLUEPRINTS-CAPS": "DMP BLUEPRINTS",
"USERS-BREADCRUMB": "USERS", "USERS-BREADCRUMB": "USERS",
"START-NEW-DMP": "Start new Plan", "START-NEW-DMP": "Start new DMP",
"START-NEW-DMP-TXT": "Start fresh or continue work in {{ APP_NAME }}! Create a new DMP or upload an existing DMP to {{ APP_NAME }}", "START-NEW-DMP-TXT": "Start fresh or continue work in {{ APP_NAME }}! Create a new DMP or upload an existing DMP to {{ APP_NAME }}",
"START-WIZARD": "Start wizard", "START-WIZARD": "Start wizard",
"IMPORT-FROM-FILE": "Import from file", "IMPORT-FROM-FILE": "Import from file",
"SEARCH": { "SEARCH": {
"DATASET": "Dataset", "DATASET": "Dataset",
"DMP": "Plan", "DMP": "DMP",
"GRANT": "Grant", "GRANT": "Grant",
"PUBLISHED": "Published" "PUBLISHED": "Published"
} }
@ -260,7 +259,7 @@
"ABOUT": "About", "ABOUT": "About",
"DASHBOARD": "Home", "DASHBOARD": "Home",
"DMP": "DATA MANAGEMENT PLANS", "DMP": "DATA MANAGEMENT PLANS",
"MY-DMPS": "My Plans", "MY-DMPS": "My DMPs",
"DATASETS": "DATASETS", "DATASETS": "DATASETS",
"GRANTS": "GRANTS", "GRANTS": "GRANTS",
"NEW DATASET": "New Dataset", "NEW DATASET": "New Dataset",
@ -274,7 +273,7 @@
"HISTORY-VISITED": "LAST VISITED", "HISTORY-VISITED": "LAST VISITED",
"HISTORY-EDITED": "LAST EDITED", "HISTORY-EDITED": "LAST EDITED",
"PUBLIC": "PUBLISHED", "PUBLIC": "PUBLISHED",
"PUBLIC-DMPS": "Public Plans", "PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DESC": "Public Descriptions", "PUBLIC-DESC": "Public Descriptions",
"ACCOUNT": "ACCOUNT", "ACCOUNT": "ACCOUNT",
"ADMIN": "ADMIN", "ADMIN": "ADMIN",
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -328,9 +325,9 @@
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Chapter Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the description chapter.", "PAGE-NAME-HINT": "Set a name for the desciption chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief description of what the chapter is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first chapter", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Section", "CREATE-NEW-SUBSECTION": "Section",
@ -347,7 +344,7 @@
"SECTION-NAME": "Section Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the section.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief description of what the section is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Section" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Source", "FIELD-AUTOCOMPLETE-SOURCE": "Source",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Date Picker", "FIELD-DATE-PICKER-TITLE": "Date Picker",
"FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text", "FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text",
"FIELD-DATE-PICKER-LABEL": "Label", "FIELD-DATE-PICKER-LABEL": "Label",
@ -607,7 +600,7 @@
}, },
"ERRORS": { "ERRORS": {
"INVALID-VISIBILITY-RULES": { "INVALID-VISIBILITY-RULES": {
"MESSAGE-START": "There were invalid visibility rules detected in ", "MESSAGE-START": "There were invalid visibilty rules detected in ",
"MESSAGE-END": ". Would you like to fix them?", "MESSAGE-END": ". Would you like to fix them?",
"CONFIRM-YES": "Yes, remove invalid rules", "CONFIRM-YES": "Yes, remove invalid rules",
"CONFIRM-NO": "No, keep them.", "CONFIRM-NO": "No, keep them.",
@ -623,7 +616,7 @@
} }
}, },
"DMP-LISTING": { "DMP-LISTING": {
"DMP": "Plan", "DMP": "DMP",
"GRANT": "Grant", "GRANT": "Grant",
"TITLE": "Data Management Plans", "TITLE": "Data Management Plans",
"OWNER": "Owner", "OWNER": "Owner",
@ -634,8 +627,8 @@
"PUBLISHED": "Published", "PUBLISHED": "Published",
"VERSION": "Version", "VERSION": "Version",
"CONTAINED-DESCRIPTIONS": "Contained Descriptions", "CONTAINED-DESCRIPTIONS": "Contained Descriptions",
"TEXT-INFO": "Information in a DMP show how descriptions have been collected and/or generated, how they have been processed and analyzed, i.e. using which tools, standards, methodologies etc, but also where and how descriptions 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.",
"TEXT-INFO-QUESTION": "Not sure how a Plan looks in practice? Browse Public Plans and", "TEXT-INFO-QUESTION": "Not sure how a DMP looks in practice? Browse Public DMPs and",
"LINK-ZENODO": "LIBER community in Zenodo", "LINK-ZENODO": "LIBER community in Zenodo",
"GET-IDEA": "to get an idea!", "GET-IDEA": "to get an idea!",
"SORT-BY": "Sort by", "SORT-BY": "Sort by",
@ -691,7 +684,7 @@
}, },
"LEVEL-OF-ACCESS": "Level of Access", "LEVEL-OF-ACCESS": "Level of Access",
"INVOLVED-DATASETS": "Involved Datasets", "INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Description Templates Involved" "TEMPLATES-INVOLVED": "Dataset Templates Involved"
}, },
"VIEW-ALL-VERSIONS": "All versions of", "VIEW-ALL-VERSIONS": "All versions of",
"EMPTY-LIST": "Nothing here yet." "EMPTY-LIST": "Nothing here yet."
@ -705,14 +698,14 @@
"TOOLTIP": { "TOOLTIP": {
"PUBLISHED": "Public access - Closed DMP", "PUBLISHED": "Public access - Closed DMP",
"INVOLVED-DATASETS": "Involved Datasets", "INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Description Templates Involved" "TEMPLATES-INVOLVED": "Dataset Templates Involved"
}, },
"EMPTY-LIST": "Nothing here yet." "EMPTY-LIST": "Nothing here yet."
}, },
"DMP-UPLOAD": { "DMP-UPLOAD": {
"TITLE": "Import Data Management Plan", "TITLE": "Import Data Management Plan",
"UPLOAD-BUTTON": "Upload", "UPLOAD-BUTTON": "Upload",
"UPLOAD-SUCCESS": "Import was Successful", "UPLOAD-SUCCESS": "Import was Successfull",
"ACTIONS": { "ACTIONS": {
"IMPORT": "Import", "IMPORT": "Import",
"CANCEL": "Cancel" "CANCEL": "Cancel"
@ -733,7 +726,7 @@
"FIRST-STEP": { "FIRST-STEP": {
"TITLE": "Dataset Information", "TITLE": "Dataset Information",
"DMP": "Data Management Plan", "DMP": "Data Management Plan",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"SUB-TITLE": "Created At: " "SUB-TITLE": "Created At: "
}, },
"SECOND-STEP": { "SECOND-STEP": {
@ -773,7 +766,7 @@
"MESSAGES": { "MESSAGES": {
"DATASET-NOT-FOUND": "Dataset does not exist", "DATASET-NOT-FOUND": "Dataset does not exist",
"DATASET-NOT-ALLOWED": "You have no access to this Dataset", "DATASET-NOT-ALLOWED": "You have no access to this Dataset",
"SUCCESS-UPDATE-DATASET-PROFILE": "Description Template updated successfully", "SUCCESS-UPDATE-DATASET-PROFILE": "Dataset Template updated successfully",
"MISSING-FIELDS": "There are some required fields left unfilled. Please check the DMP and make sure that all required questions are answered and URLs are provided with valid input. (Missing fields are marked in red color)", "MISSING-FIELDS": "There are some required fields left unfilled. Please check the DMP and make sure that all required questions are answered and URLs are provided with valid input. (Missing fields are marked in red color)",
"NO-FILES-SELECTED": "There is no selected file to upload", "NO-FILES-SELECTED": "There is no selected file to upload",
"LARGE-FILE-OR-UNACCEPTED-TYPE": "The file is too large or its type is not supported.", "LARGE-FILE-OR-UNACCEPTED-TYPE": "The file is too large or its type is not supported.",
@ -782,8 +775,8 @@
}, },
"UPLOAD": { "UPLOAD": {
"UPLOAD-XML": "Import", "UPLOAD-XML": "Import",
"UPLOAD-XML-FILE-TITLE": "Import Description Template", "UPLOAD-XML-FILE-TITLE": "Import Dataset Template",
"UPLOAD-XML-NAME": "Name Of Description Template", "UPLOAD-XML-NAME": "Name Of Dataset Template",
"UPLOAD-XML-IMPORT": "File", "UPLOAD-XML-IMPORT": "File",
"UPLOAD-XML-FILE-CANCEL": "Cancel" "UPLOAD-XML-FILE-CANCEL": "Cancel"
}, },
@ -801,7 +794,7 @@
"COPY": "Copy", "COPY": "Copy",
"CANCEL": "Cancel", "CANCEL": "Cancel",
"NEXT": "Next", "NEXT": "Next",
"ERROR-MESSAGE": "Does not contain this Description Template" "ERROR-MESSAGE": "Does not contain this Dataset Template"
}, },
"LOCKED":{ "LOCKED":{
"TITLE":"Dataset is locked", "TITLE":"Dataset is locked",
@ -823,7 +816,7 @@
"TOOLTIP": { "TOOLTIP": {
"LEVEL-OF-ACCESS": "Level of Access", "LEVEL-OF-ACCESS": "Level of Access",
"INVOLVED-DATASETS": "Involved Datasets", "INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Description Templates Involved" "TEMPLATES-INVOLVED": "Dataset Templates Involved"
}, },
"ERROR": { "ERROR": {
"DELETED-DMP": "The requested DMP is deleted", "DELETED-DMP": "The requested DMP is deleted",
@ -867,14 +860,14 @@
} }
}, },
"DATASET-LISTING": { "DATASET-LISTING": {
"TITLE": "Datensatzbeschreibungen", "TITLE": "Datasets",
"DESCRIPTION": "Description", "DESCRIPTION": "Description",
"SELECT-DESCRIPTIONS-TO-CLONE": "Select which descriptions to include in the new DMP. Selected descriptions will be editable.", "SELECT-DESCRIPTIONS-TO-CLONE": "Select which descriptions to include in the new DMP. Selected descriptions will be editable.",
"SELECT-DESCRIPTIONS-NONE": "Not available Descriptions for this DMP.", "SELECT-DESCRIPTIONS-NONE": "Not available Descriptions for this DMP.",
"TEXT-INFO": "Descriptions are documented following pre-defined templates which set the content of the descriptions. In {{ APP_NAME }}, a DMP can contain as many descriptions as the entities it documents. Browse ", "TEXT-INFO": "Datasets are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents. Browse ",
"TEXT-INFO-REST": " for a look at entities described in {{ APP_NAME }} DMPs", "TEXT-INFO-REST": " for a look at datasets described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Descriptions", "LINK-PUBLIC-DATASETS": "Public Datasets",
"TEXT-INFO-PAR": "New descriptions can be added to existing DMPs at any time and be described with more than one template. Descriptions can also be cloned and re-used in other DMPs as well as be deleted without negatively affecting the DMP as a whole.", "TEXT-INFO-PAR": "New datasets can be added to existing DMPs at any time and be described with more than one template. Datasets can also be cloned and re-used in other DMPs as well as be deleted without negatively affecting the DMP as a whole.",
"COLUMNS": { "COLUMNS": {
"NAME": "Name", "NAME": "Name",
"REFERNCE": "Reference", "REFERNCE": "Reference",
@ -887,7 +880,7 @@
"FINALIZED": "Finalized", "FINALIZED": "Finalized",
"LAST-EDITED": "Last Edited", "LAST-EDITED": "Last Edited",
"ACTIONS": "Actions", "ACTIONS": "Actions",
"DMP": "Plan", "DMP": "DMP",
"PROFILE": "Template", "PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories", "DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries", "REGISTRIES": "Registries",
@ -914,9 +907,9 @@
"DRAFT": "Private access - Editable Dataset", "DRAFT": "Private access - Editable Dataset",
"FINALIZED": "Private access - Closed Dataset" "FINALIZED": "Private access - Closed Dataset"
}, },
"DMP": "Plan", "DMP": "DMP",
"GRANT": "Grant", "GRANT": "Grant",
"TEMPLATES-INVOLVED": "Description Template", "TEMPLATES-INVOLVED": "Dataset Template",
"VERSION": "DMP Version", "VERSION": "DMP Version",
"PART-OF": "Part of", "PART-OF": "Part of",
"TO-DMP": "To DMP", "TO-DMP": "To DMP",
@ -928,9 +921,9 @@
"TITLE": "Published Datasets", "TITLE": "Published Datasets",
"TOOLTIP": { "TOOLTIP": {
"FINALIZED": "Private access - Closed Dataset", "FINALIZED": "Private access - Closed Dataset",
"DMP": "Plan", "DMP": "DMP",
"GRANT": "Grant", "GRANT": "Grant",
"TEMPLATES-INVOLVED": "Description Template" "TEMPLATES-INVOLVED": "Dataset Template"
}, },
"EMPTY-LIST": "Nothing here yet." "EMPTY-LIST": "Nothing here yet."
}, },
@ -950,7 +943,7 @@
"DESCRIPTION": "Description", "DESCRIPTION": "Description",
"CREATED": "Created", "CREATED": "Created",
"ACTIONS": "Actions", "ACTIONS": "Actions",
"DMP": "Plan", "DMP": "DMP",
"PROFILE": "Template", "PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories", "DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries", "REGISTRIES": "Registries",
@ -992,7 +985,7 @@
}, },
"PLACEHOLDER": "Dataset Title", "PLACEHOLDER": "Dataset Title",
"DATASET-PROFILE": { "DATASET-PROFILE": {
"SELECT": "Select Description Template" "SELECT": "Select Dataset Template"
}, },
"SNACK-BAR": { "SNACK-BAR": {
"SUCCESSFUL-CREATION": "Imported Successfully", "SUCCESSFUL-CREATION": "Imported Successfully",
@ -1071,8 +1064,8 @@
"TITLE": { "TITLE": {
"NEW": "New Data Management Plan", "NEW": "New Data Management Plan",
"EDIT": "Edit", "EDIT": "Edit",
"EDIT-DMP": "Editing Plan", "EDIT-DMP": "Editing DMP",
"ADD-DATASET": "Adding description", "ADD-DATASET": "Adding dataset",
"EDIT-DESCRIPTION": "Editing Description", "EDIT-DESCRIPTION": "Editing Description",
"CLONE-DMP": "Clone", "CLONE-DMP": "Clone",
"NEW-VERSION": "New Version", "NEW-VERSION": "New Version",
@ -1088,11 +1081,11 @@
"ORGANISATIONS": "Organizations", "ORGANISATIONS": "Organizations",
"ORGANISATIONS-HINT": "Add here the names of the organizations contributing to the creation and revision of the DMPs", "ORGANISATIONS-HINT": "Add here the names of the organizations contributing to the creation and revision of the DMPs",
"RESEARCHERS": "Researchers", "RESEARCHERS": "Researchers",
"RESEARCHERS-HINT": "Add here the names of people that have produced, processed, analyzed the data described in the DMP. ", "RESEARCHERS-HINT": "Add here the names of people that have produced, processed, analysed the data described in the DMP. ",
"AUTHORS": "Authors", "AUTHORS": "Authors",
"TEMPLATES": "Templates", "TEMPLATES": "Templates",
"TEMPLATE": "DMP Template", "TEMPLATE": "DMP Template",
"DATASET-TEMPLATES": "Related Description Templates", "DATASET-TEMPLATES": "Related Dataset Templates",
"SELECT-TEMPLATE": "Select a template to describe your descriptions", "SELECT-TEMPLATE": "Select a template to describe your descriptions",
"PROFILE": "DMP Template", "PROFILE": "DMP Template",
"PROJECT": "Project", "PROJECT": "Project",
@ -1159,19 +1152,19 @@
"DATASET-SELECTION": "Dataset selection", "DATASET-SELECTION": "Dataset selection",
"DESCRIPTION-INFO": "Description info", "DESCRIPTION-INFO": "Description info",
"LICENSE-INFO": "License", "LICENSE-INFO": "License",
"DATASET": "Description", "DATASET": "Dataset",
"PREVIOUS": "Previous", "PREVIOUS": "Previous",
"NEXT": "Next" "NEXT": "Next"
}, },
"MAIN-INFO": { "MAIN-INFO": {
"INTRO": "A Plan in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities.", "INTRO": "A DMP in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities.",
"HINT": "A brief description of what the DMP is about, its scope and objectives.", "HINT": "A brief description of what the DMP is about, its scope and objectives.",
"TYPING": "Type more letters of the name so its more possible to find the correct one.", "TYPING": "Type more letters of the name so its more possible to find the correct one.",
"UNIQUE-IDENTIFIER": "Unique Identifier", "UNIQUE-IDENTIFIER": "Unique Identifier",
"RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.", "RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organization identifier already exists.", "ORGANISATION-IDENTIFIER-EXSTS": "Organisation identifier already exists.",
"IDENTIFIER-EXISTS-RESEARCHER-LIST": "This identifier is already used by a researcher in the researchers list.", "IDENTIFIER-EXISTS-RESEARCHER-LIST": "This identifier is already used by a researcher in the researchers list.",
"IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organization in the organizations list.", "IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organisation in the organisations list.",
"SAVE":"Save", "SAVE":"Save",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
@ -1184,18 +1177,18 @@
"IDENTIFIER-PROJECT-EXISTS": "A project with the given identifier exists." "IDENTIFIER-PROJECT-EXISTS": "A project with the given identifier exists."
}, },
"DATASET-INFO": { "DATASET-INFO": {
"INTRO": "A Plan in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities.", "INTRO": "A DMP in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities.",
"SECOND-INTRO": "Descriptions are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents.", "SECOND-INTRO": "Datasets are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents.",
"FIND": "Couldn't find a suitable one?", "FIND": "Couldn't find a suitable one?",
"HINT": "Select a template to describe your descriptions. You may select more than one template." "HINT": "Select a template to describe your descriptions. You may select more than one template."
}, },
"LICENSE-INFO": { "LICENSE-INFO": {
"INTRO": "Each DMP can contain specific license information over how much open and available it is, that way you can determine who can see your dataset and for how long that data will be private", "INTRO": "Each DMP can contain specific license informatation over how much open and available it is, that way you can determine who can see your dataset and for how long that data will be private",
"HINT": "Assign a license to your DMP by selecting the most appropriate from the list.", "HINT": "Assign a license to your DMP by selecting the most appropriate from the list.",
"TYPING": "Type more letters of the name so its more possible to find the correct one." "TYPING": "Type more letters of the name so its more possible to find the correct one."
}, },
"DATASET-DESCRIPTION": { "DATASET-DESCRIPTION": {
"INTRO": "In general terms, your research data should be 'fair', that is findable, accessible, interoperable and re-usable. these principles precede implementation choices and do not necessarily suggest any specific technology, standard, or implementation-solution. this template is not intended as a strict technical implementation of the fair principles, it is rather inspired by fair as a general concept." "INTRO": "Ιn general terms, your research data should be 'fair', that is findable, accessible, interoperable and re-usable. these principles precede implementation choices and do not necessarily suggest any specific technology, standard, or implementation-solution. this template is not intended as a strict technical implementation of the fair principles, it is rather inspired by fair as a general concept."
}, },
"CHANGES": "unsaved changes", "CHANGES": "unsaved changes",
"CLONE-DIALOG": { "CLONE-DIALOG": {
@ -1284,8 +1277,8 @@
"RELATED-DMP": "Related DMPs", "RELATED-DMP": "Related DMPs",
"SELECT-COLLABORATORS": "Select Collaborators", "SELECT-COLLABORATORS": "Select Collaborators",
"RELATED-COLLABORATORS": "Related Collaborators", "RELATED-COLLABORATORS": "Related Collaborators",
"SELECT-DATASET-TEMPLATES": "Select Description Templates", "SELECT-DATASET-TEMPLATES": "Select Dataset Templates",
"RELATED-DATASET-TEMPLATES": "Related Description Templates", "RELATED-DATASET-TEMPLATES": "Related Dataset Templates",
"ALL-VERSIONS": "From All Versions" "ALL-VERSIONS": "From All Versions"
}, },
"DMP": { "DMP": {
@ -1294,8 +1287,8 @@
"SELECT-GRANTS": "Select Grants", "SELECT-GRANTS": "Select Grants",
"SELECT-COLLABORATORS": "Select Collaborators", "SELECT-COLLABORATORS": "Select Collaborators",
"RELATED-COLLABORATORS": "Related Collaborators", "RELATED-COLLABORATORS": "Related Collaborators",
"SELECT-DATASET-TEMPLATES": "Select Description Templates", "SELECT-DATASET-TEMPLATES": "Select Dataset Templates",
"RELATED-DATASET-TEMPLATES": "Related Description Templates" "RELATED-DATASET-TEMPLATES": "Related Dataset Templates"
}, },
"BLUEPRINT": { "BLUEPRINT": {
"LIKE": "Search", "LIKE": "Search",
@ -1322,7 +1315,7 @@
"DESCRIPTION": "Description", "DESCRIPTION": "Description",
"PROFILE": "Template", "PROFILE": "Template",
"URI": "Uri", "URI": "Uri",
"DMP": "Plan", "DMP": "DMP",
"SELECT-DMP": "Select DMP", "SELECT-DMP": "Select DMP",
"DATAREPOSITORIES": "Data Repositories", "DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries", "REGISTRIES": "Registries",
@ -1362,10 +1355,10 @@
}, },
"VERSION-DIALOG": { "VERSION-DIALOG": {
"ABOUT": "Versioning is automated.", "ABOUT": "Versioning is automated.",
"QUESTION": "It seems your Description Template is outdated. Do you want to update it to the latest version?" "QUESTION": "It seems your Dataset Template is outdated. Do you want to update it to the latest version?"
}, },
"ERRORS":{ "ERRORS":{
"ERROR-OCCURED": "An error occurred.", "ERROR-OCCURED": "An error occured.",
"MESSAGE": "Message: " "MESSAGE": "Message: "
}, },
"QUESTION": { "QUESTION": {
@ -1386,17 +1379,17 @@
"SAVE": "Save" "SAVE": "Save"
}, },
"FIRST-STEP": { "FIRST-STEP": {
"TITLE": "Plan", "TITLE": "DMP",
"PLACEHOLDER": "Pick an existing DMP" "PLACEHOLDER": "Pick an existing DMP"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1505,7 +1498,7 @@
"DATASET-IDENTIFIER": "Dataset Identifier", "DATASET-IDENTIFIER": "Dataset Identifier",
"CURRENCY": "Currency", "CURRENCY": "Currency",
"VALIDATION": "Validator", "VALIDATION": "Validator",
"OTHER": "Custom", "OTHER": "Other",
"SELECT": "Select" "SELECT": "Select"
}, },
"DATASET-PROFILE-UPLOAD-TYPE": { "DATASET-PROFILE-UPLOAD-TYPE": {
@ -1522,7 +1515,7 @@
}, },
"DATASET-PROFILE-INTERNAL-DMP-ENTITIES-TYPE": { "DATASET-PROFILE-INTERNAL-DMP-ENTITIES-TYPE": {
"RESEARCHERS": "Researchers", "RESEARCHERS": "Researchers",
"DMPS": "Plans", "DMPS": "DMPs",
"DATASETS": "Datasets", "DATASETS": "Datasets",
"EXTERNAL-SOURCE-HINT": "List of values provided by external source(s)" "EXTERNAL-SOURCE-HINT": "List of values provided by external source(s)"
}, },
@ -1573,7 +1566,7 @@
}, },
"DMP-WIZARD": { "DMP-WIZARD": {
"FIRST-STEP": { "FIRST-STEP": {
"DMP": "Plan Editor", "DMP": "DMP Editor",
"DATASETS": "Datasets" "DATASETS": "Datasets"
}, },
"ACTIONS": { "ACTIONS": {
@ -1661,7 +1654,7 @@
"MAIN-CONTENT": "" "MAIN-CONTENT": ""
}, },
"OPENSOURCE-LICENCES": { "OPENSOURCE-LICENCES": {
"TITLE": "Opensource licenses", "TITLE": "Opensource licences",
"MAIN-CONTENT": "" "MAIN-CONTENT": ""
}, },
"TERMS-OF-SERVICE": { "TERMS-OF-SERVICE": {
@ -1693,9 +1686,9 @@
"DASHBOARD": { "DASHBOARD": {
"MY-GRANTS": "My Grants", "MY-GRANTS": "My Grants",
"GRANTS": "Grants", "GRANTS": "Grants",
"MY-DMPS": "My Plans", "MY-DMPS": "My DMPs",
"TITLE": "What is {{ APP_NAME_CAPS }}?", "TITLE": "What is {{ APP_NAME_CAPS }}?",
"DMP-QUESTION": "What is a Plan in {{ APP_NAME_CAPS }}?", "DMP-QUESTION": "What is a DMP in {{ APP_NAME_CAPS }}?",
"INFO-TEXT": "{{ APP_NAME_CAPS }} 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-TEXT": "{{ APP_NAME_CAPS }} 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.", "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", "NEW-QUESTION": "New with DMPs? Visit",
@ -1703,7 +1696,7 @@
"OPEN-AIR-GUIDE": "OpenAIREs Guide for Researchers", "OPEN-AIR-GUIDE": "OpenAIREs Guide for Researchers",
"LEARN-MORE": "to learn more about how to create one!", "LEARN-MORE": "to learn more about how to create one!",
"ORGANIZATIONS": "Related Organizations", "ORGANIZATIONS": "Related Organizations",
"DMPS": "Plans", "DMPS": "DMPs",
"MY-DATASETS": "My Datasets", "MY-DATASETS": "My Datasets",
"DATASETS": "Datasets", "DATASETS": "Datasets",
"SEARCH": "SEARCH...", "SEARCH": "SEARCH...",
@ -1711,15 +1704,15 @@
"PERSONAL-USAGE": "Personal Usage", "PERSONAL-USAGE": "Personal Usage",
"PUBLIC-USAGE": "Public Usage", "PUBLIC-USAGE": "Public Usage",
"DESCRIPTIONS": "Descriptions", "DESCRIPTIONS": "Descriptions",
"DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Descriptions", "DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Datasets",
"PUBLIC-DMPS": "Public Plans", "PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DATASETS": "Public Datasets", "PUBLIC-DATASETS": "Public Datasets",
"RELATED-ORGANISATIONS": "Related Organizations", "RELATED-ORGANISATIONS": "Related Organisations",
"DRAFTS": "Drafts", "DRAFTS": "Drafts",
"ALL": "All", "ALL": "All",
"EMPTY-LIST": "Nothing here yet.", "EMPTY-LIST": "Nothing here yet.",
"LATEST-ACTIVITY": "Latest Activity", "LATEST-ACTIVITY": "Latest Activity",
"DMP-ABOUT-BEG": "A Plan in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research entities, namely", "DMP-ABOUT-BEG": "A DMP in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets, namely",
"DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.", "DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.",
"SELECT-DMP": "Select a DMP for your Dataset", "SELECT-DMP": "Select a DMP for your Dataset",
"ACTIONS": { "ACTIONS": {
@ -1728,7 +1721,7 @@
}, },
"TOUR-GUIDE": { "TOUR-GUIDE": {
"DMP": "This is your dashboard. You can view and edit all DMPs that you have either contributed to or created yourself.", "DMP": "This is your dashboard. You can view and edit all DMPs that you have either contributed to or created yourself.",
"START-NEW": "Create your Plan with Start new Plan.", "START-NEW": "Create your DMP with Start new DMP.",
"IMPORT-DMP": "You can import a DMP", "IMPORT-DMP": "You can import a DMP",
"START-WIZARD": "or create new in {{ APP_NAME }}.", "START-WIZARD": "or create new in {{ APP_NAME }}.",
"DATASET": "This is your dashboard. You can view and edit all Datasets that you have either contributed to or created yourself.", "DATASET": "This is your dashboard. You can view and edit all Datasets that you have either contributed to or created yourself.",
@ -1738,7 +1731,7 @@
}, },
"ADD-NEW-DATASET": { "ADD-NEW-DATASET": {
"OPTIONS-NOT-ENOUGH": "Are those options not enough?", "OPTIONS-NOT-ENOUGH": "Are those options not enough?",
"START-NEW-DMP": "Start new Plan" "START-NEW-DMP": "Start new DMP"
} }
}, },
"USER-DIALOG": { "USER-DIALOG": {
@ -1760,7 +1753,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Settings", "TITLE": "Settings",
@ -1869,7 +1862,7 @@
} }
}, },
"DMP-FINALISE-DIALOG": { "DMP-FINALISE-DIALOG": {
"DMP": "Plan", "DMP": "DMP",
"DATASETS": "Datasets", "DATASETS": "Datasets",
"EMPTY": "No Datasets for this DMP so far", "EMPTY": "No Datasets for this DMP so far",
"SUBMIT": "Submit", "SUBMIT": "Submit",
@ -1932,15 +1925,15 @@
}, },
"SECOND-STEP": { "SECOND-STEP": {
"TITLE": "DMP Profile", "TITLE": "DMP Profile",
"ABOUT": "A Data Management Plan consists of a set of questions that you should answer with a level of detail appropriate to the grant or with relevance to the purpose that you are creating the DMP. Contents of each DMP vary depending on the selected Description Template(s) which contain(s) a set of tailored questions in response to policy requirements of funders, institutions, research communities.", "ABOUT": "A Data Management Plan consists of a set of questions that you should answer with a level of detail appropriate to the grant or with relevance to the purpose that you are creating the DMP. Contents of each DMP vary depending on the selected Dataset Template(s) which contain(s) a set of tailored questions in response to policy requirements of funders, institutions, research communities.",
"NEW-TITLE": "", "NEW-TITLE": "",
"DMP-NAME": "DMP For Grant : ", "DMP-NAME": "DMP For Grant : ",
"FIELDS": { "FIELDS": {
"NAME": "Title of the DMP", "NAME": "Title of the DMP",
"DESCRIPTION": "Summary", "DESCRIPTION": "Summary",
"DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP", "DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PROFILE-HINT": "Select a template to describe your Dataset(s). If you want to select multiple Description Templates use \"New DMP (Expert)\". You can also add new Datasets at any time after the DMP creation.", "PROFILE-HINT": "Select a template to describe your Dataset(s). If you want to select multiple Dataset Templates use \"New DMP (Expert)\". You can also add new Datasets at any time after the DMP creation.",
"HELP": "If you can't find a template or if you want to create a personalized template for your institution, research community or training needs, please contact us." "HELP": "If you can't find a template or if you want to create a personalized template for your institution, research community or training needs, please contact us."
} }
}, },
@ -1983,13 +1976,5 @@
"DRAFT": "Draft", "DRAFT": "Draft",
"FINALIZED": "Finalized", "FINALIZED": "Finalized",
"DELETED": "Deleted" "DELETED": "Deleted"
},
"NEW-RELEASE-NOTIFICATION": {
"TITLE": "New ARGOS Release!",
"HINT": "Discover the all-new Argos version",
"BODY": "Discover the latest enhancements and improvements with our brand-new Argos release! Use the Default Blueprint to create plans that include funders information. Contact us to create Blueprints for institutional plans that connect to local services or for training activities. Adopt the output management plan as an overarching plan that combines different templates, e.g. data and software. Dont miss out explore now!",
"ACTIONS": {
"LEARN-MORE": "Learn more"
}
} }
} }

View File

@ -191,8 +191,7 @@
"SERBIAN": "Serbio", "SERBIAN": "Serbio",
"PORTUGUESE": "Portugués", "PORTUGUESE": "Portugués",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -311,8 +310,6 @@
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Seleccione un idioma", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Seleccione un idioma",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Fuente", "FIELD-AUTOCOMPLETE-SOURCE": "Fuente",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Optiones principales", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Optiones principales",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Campo de entrada para fecha", "FIELD-DATE-PICKER-TITLE": "Campo de entrada para fecha",
"FIELD-DATE-PICKER-PLACEHOLDER": "Marcador de entrada", "FIELD-DATE-PICKER-PLACEHOLDER": "Marcador de entrada",
"FIELD-DATE-PICKER-LABEL": "Etiqueta", "FIELD-DATE-PICKER-LABEL": "Etiqueta",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Seleccione un PGD existente" "PLACEHOLDER": "Seleccione un PGD existente"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Configuración", "TITLE": "Configuración",

View File

@ -35,7 +35,7 @@
"SUCCESSFUL-DELETE": "Επιτυχής διαγραφή", "SUCCESSFUL-DELETE": "Επιτυχής διαγραφή",
"UNSUCCESSFUL-DELETE": "Αποτυχημένη διαγραφή", "UNSUCCESSFUL-DELETE": "Αποτυχημένη διαγραφή",
"UNSUCCESSFUL-EMAIL-SEND": "Αποτυχία αποστολής email", "UNSUCCESSFUL-EMAIL-SEND": "Αποτυχία αποστολής email",
"UNSUCCESSFUL-REMOVE-TEMPLATE": "Αποτυχία αφαίρεσης του template, ένα ή παραπάνω σύνολα δεδομένων του συγκεκριμένου Σχεδίου Διαχείρισης Δεδομένων χρησιμοποιούν αυτό το template" "UNSUCCESSFUL-REMOVE-TEMPLATE": "Αποτυχία αφαίρεσης του template, ένα ή παραπάνω σύνολα δεδομένων του συγκρεκριμένου Σχεδίου Διαχείρισης Δεδομένωνω χρησιμοποιούν αυτό το template"
}, },
"ERRORS": { "ERRORS": {
"HTTP-REQUEST-ERROR": "Παρουσιάστηκε μη αναμενόμενο σφάλμα" "HTTP-REQUEST-ERROR": "Παρουσιάστηκε μη αναμενόμενο σφάλμα"
@ -191,8 +191,7 @@
"SERBIAN": "Σερβικά", "SERBIAN": "Σερβικά",
"PORTUGUESE": "Πορτογαλικά", "PORTUGUESE": "Πορτογαλικά",
"CROATIAN": "Κροατικά", "CROATIAN": "Κροατικά",
"POLISH": "Πολωνικά", "POLISH": "Πολωνικά"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -328,9 +325,9 @@
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Chapter Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the description chapter.", "PAGE-NAME-HINT": "Set a name for the desciption chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief description of what the chapter is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first chapter", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Section", "CREATE-NEW-SUBSECTION": "Section",
@ -347,7 +344,7 @@
"SECTION-NAME": "Section Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the section.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief description of what the section is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Section" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
@ -434,7 +431,7 @@
"FIELD-CHECKBOX-PLACEHOLDER": "Τοποθέτηση placeholder", "FIELD-CHECKBOX-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-FREE-TEXT-TITLE": "Ελεύθερο Κείμενο Δεδομένων", "FIELD-FREE-TEXT-TITLE": "Ελεύθερο Κείμενο Δεδομένων",
"FIELD-FREE-TEXT-PLACEHOLDER": "Τοποθέτηση placeholder", "FIELD-FREE-TEXT-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-COMBO-BOX-TYPE": "Τύπος Σύνθετου Πλαισίου", "FIELD-COMBO-BOX-TYPE": "Τύπος Σύνθετου Πλασίου",
"FIELD-WORD-LIST-TITLE": "Λίστα Λέξεων Δεδομένων", "FIELD-WORD-LIST-TITLE": "Λίστα Λέξεων Δεδομένων",
"FIELD-WORD-LIST-PLACEHOLDER": "Τοποθέτηση placeholder", "FIELD-WORD-LIST-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-WORD-LIST-LABEL": "Ετικέτα", "FIELD-WORD-LIST-LABEL": "Ετικέτα",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Πηγή", "FIELD-AUTOCOMPLETE-SOURCE": "Πηγή",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Βάση Επιλογών", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Βάση Επιλογών",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Επιλογή Ημερομηνίας", "FIELD-DATE-PICKER-TITLE": "Επιλογή Ημερομηνίας",
"FIELD-DATE-PICKER-PLACEHOLDER": "Τοποθέτηση placeholder", "FIELD-DATE-PICKER-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-DATE-PICKER-LABEL": "Ετικέτα", "FIELD-DATE-PICKER-LABEL": "Ετικέτα",
@ -607,7 +600,7 @@
}, },
"ERRORS": { "ERRORS": {
"INVALID-VISIBILITY-RULES": { "INVALID-VISIBILITY-RULES": {
"MESSAGE-START": "There were invalid visibility rules detected in ", "MESSAGE-START": "There were invalid visibilty rules detected in ",
"MESSAGE-END": ". Would you like to fix them?", "MESSAGE-END": ". Would you like to fix them?",
"CONFIRM-YES": "Yes, remove invalid rules", "CONFIRM-YES": "Yes, remove invalid rules",
"CONFIRM-NO": "No, keep them.", "CONFIRM-NO": "No, keep them.",
@ -638,7 +631,7 @@
"TEXT-INFO-QUESTION": " Εξερευνήστε τα Δημόσια Σχέδια Διαχείρισης Δεδομένων και", "TEXT-INFO-QUESTION": " Εξερευνήστε τα Δημόσια Σχέδια Διαχείρισης Δεδομένων και",
"LINK-ZENODO": "την κοινότητα του LIBER στο Zenodo", "LINK-ZENODO": "την κοινότητα του LIBER στο Zenodo",
"GET-IDEA": "για να πάρετε μια ιδέα!", "GET-IDEA": "για να πάρετε μια ιδέα!",
"SORT-BY": "Ταξινόμηση κατά", "SORT-BY": "Ταξίνομηση κατά",
"COLUMNS": { "COLUMNS": {
"NAME": "Τίτλος", "NAME": "Τίτλος",
"GRANT": "Επιχορήγηση", "GRANT": "Επιχορήγηση",
@ -754,7 +747,7 @@
"SAVE": "Save", "SAVE": "Save",
"SAVE-AND-CONTINUE": "Αποθήκευση & Συνέχεια", "SAVE-AND-CONTINUE": "Αποθήκευση & Συνέχεια",
"SAVE-AND-ADD": "Αποθήκευση & Προσθήκη Νέου", "SAVE-AND-ADD": "Αποθήκευση & Προσθήκη Νέου",
"SAVE-AND-CLOSE": " Αποθήκευση & Κλείσιμο", "SAVE-AND-CLOSE": " Αποθήκευση & Κλείσμο",
"SAVE-AND-FINALISE": "Αποθήκευση και Οριστικοποίηση", "SAVE-AND-FINALISE": "Αποθήκευση και Οριστικοποίηση",
"FINALIZE": "Οριστικοποίηση", "FINALIZE": "Οριστικοποίηση",
"REVERSE": "Αναίρεση Οριστικοποίησης", "REVERSE": "Αναίρεση Οριστικοποίησης",
@ -778,7 +771,7 @@
"NO-FILES-SELECTED": "Δεν υπάρχουν επιλεγμένα αρχεία για μεταφόρτωση", "NO-FILES-SELECTED": "Δεν υπάρχουν επιλεγμένα αρχεία για μεταφόρτωση",
"LARGE-FILE-OR-UNACCEPTED-TYPE": "Το αρχείο είναι πολύ μεγάλο ή ο τύπος του δεν υποστηρίζεται.", "LARGE-FILE-OR-UNACCEPTED-TYPE": "Το αρχείο είναι πολύ μεγάλο ή ο τύπος του δεν υποστηρίζεται.",
"MAX-FILE-SIZE": "Τα αρχεία πρέπει να είναι έως {{maxfilesize}} MB.", "MAX-FILE-SIZE": "Τα αρχεία πρέπει να είναι έως {{maxfilesize}} MB.",
"ACCEPTED-FILE-TYPES": "Οι υποστηριζόμενοι τύποι πολυμέσων είναι: " "ACCEPTED-FILE-TYPES": "Οι υποστηριζόμενοι τύποι πολυμέσων εναι: "
}, },
"UPLOAD": { "UPLOAD": {
"UPLOAD-XML": "Εισαγωγή", "UPLOAD-XML": "Εισαγωγή",
@ -1101,7 +1094,7 @@
"GRANTS-HINT": "Βρείτε την επιχορήγηση της έρευνας σας ή προσθέστε νέα", "GRANTS-HINT": "Βρείτε την επιχορήγηση της έρευνας σας ή προσθέστε νέα",
"FUNDER": "Χορηγός", "FUNDER": "Χορηγός",
"FUNDER-HINT": "Επιλέξτε έναν χρηματοδότη της έρευνας σας ή προσθέστε νέο", "FUNDER-HINT": "Επιλέξτε έναν χρηματοδότη της έρευνας σας ή προσθέστε νέο",
"FUNDING-ORGANIZATIONS": "Χρηματοδοτικοί οργανισμοί", "FUNDING-ORGANIZATIONS": "Χρημαδοτικοί οργανισμοί",
"PROJECT-HINT": "Projects in {{ APP_NAME }} are perceived as distinct activities falling under a grant or common activities under different grants in collaborative schemas, eg open call for contributions. Please complete it for the grant associated to your organization if your project falls under this category. In all other cases, please leave blank and it will be autocompleted.", "PROJECT-HINT": "Projects in {{ APP_NAME }} are perceived as distinct activities falling under a grant or common activities under different grants in collaborative schemas, eg open call for contributions. Please complete it for the grant associated to your organization if your project falls under this category. In all other cases, please leave blank and it will be autocompleted.",
"STATUS": "Κατάσταση Σχεδίου Διαχείρισης Δεδομένων", "STATUS": "Κατάσταση Σχεδίου Διαχείρισης Δεδομένων",
"EXTERNAL-SOURCE-HINT": "Κατάλογος των τιμών που παρέχονται από εξωτερικές πηγές", "EXTERNAL-SOURCE-HINT": "Κατάλογος των τιμών που παρέχονται από εξωτερικές πηγές",
@ -1110,7 +1103,7 @@
"LANGUAGE-HINT": "Επιλέξτε τη γλώσσα του Σχεδίου Διαχείρισης Δεδομένων σας", "LANGUAGE-HINT": "Επιλέξτε τη γλώσσα του Σχεδίου Διαχείρισης Δεδομένων σας",
"LICENSE": "Άδεια", "LICENSE": "Άδεια",
"VISIBILITY": "Ορατότητα", "VISIBILITY": "Ορατότητα",
"VISIBILITY-HINT": "Επιλέξτε πως θα εμφανίζονται το Σχέδιο Διαχείρισης Δεδομένων στο {{ APP_NAME }}. Με την επιλογή «Δημόσιο», το Σχέδιο Διαχείρισης Δεδομένων γίνεται αυτόματα διαθέσιμο σε όλους τους χρήστες της συλλογής «Δημόσια Σχέδια Διαχείρισης Δεδομένων».", "VISIBILITY-HINT": "Επιλέξτε πως θα εμφανίζρται το Σχέδιο Διαχείρισης Δεδομένων στο {{ APP_NAME }}. Με την επιλογή «Δημόσιο», το Σχέδιο Διαχείρισης Δεδομένων γίνεται αυτόματα διαθέσιμο σε όλους τους χρήστες της συλλογής «Δημόσια Σχέδια Διαχείρισης Δεδομένων».",
"PUBLICATION": "Ημερομηνία Δημοσιοποίησης", "PUBLICATION": "Ημερομηνία Δημοσιοποίησης",
"CONTACT": "Επικοινωνία", "CONTACT": "Επικοινωνία",
"COST": "Δαπάνες", "COST": "Δαπάνες",
@ -1129,7 +1122,7 @@
"LOCK": "Κλειδωμένο Σχέδιο Διαχείρισης Δεδομένων", "LOCK": "Κλειδωμένο Σχέδιο Διαχείρισης Δεδομένων",
"PERMISSION": "Δεν έχετε άδεια να επεξεργαστείτε αυτό το Σχέδιο Διαχείρισης Δεδομένων", "PERMISSION": "Δεν έχετε άδεια να επεξεργαστείτε αυτό το Σχέδιο Διαχείρισης Δεδομένων",
"INSERT-MANUALLY": "Εισάγετε το χειροκίνητα", "INSERT-MANUALLY": "Εισάγετε το χειροκίνητα",
"CREATE-DATASET": "Δημιουργία νέου", "CREATE-DATASET": "Δημιούργια νέου",
"DISABLED-EXPORT": "Παρακαλώ αποθηκεύστε τις αλλαγές σας για να εξάγετε αυτό το Σχέδιο Διαχείρισης Δεδομένων" "DISABLED-EXPORT": "Παρακαλώ αποθηκεύστε τις αλλαγές σας για να εξάγετε αυτό το Σχέδιο Διαχείρισης Δεδομένων"
}, },
"PLACEHOLDER": { "PLACEHOLDER": {
@ -1141,7 +1134,7 @@
"SNACK-BAR": { "SNACK-BAR": {
"UNSUCCESSFUL-DOI": "Αποτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)", "UNSUCCESSFUL-DOI": "Αποτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)",
"SUCCESSFUL-DOI": "Επιτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)", "SUCCESSFUL-DOI": "Επιτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)",
"UNSUCCESSFUL-FINALIZE": "Αποτυχία οριστικοποίησης Σχεδίου Διαχείρισης Δεδομένων" "UNSUCCESSFUL-FINALIZE": "Αποτυχία οριστικοποιήσης Σχεδίου Διαχείρισης Δεδομένων"
}, },
"DESCRIPTION-TEMPLATE-LIST": { "DESCRIPTION-TEMPLATE-LIST": {
"TITLE": "Available Description Templates", "TITLE": "Available Description Templates",
@ -1169,9 +1162,9 @@
"TYPING": "Προσθέστε περισσότερα γράμματα στο όνομα ώστε να είναι πιο πιθανό να βρείτε το σωστό.", "TYPING": "Προσθέστε περισσότερα γράμματα στο όνομα ώστε να είναι πιο πιθανό να βρείτε το σωστό.",
"UNIQUE-IDENTIFIER": "Unique Identifier", "UNIQUE-IDENTIFIER": "Unique Identifier",
"RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.", "RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organization identifier already exists.", "ORGANISATION-IDENTIFIER-EXSTS": "Organisation identifier already exists.",
"IDENTIFIER-EXISTS-RESEARCHER-LIST": "This identifier is already used by a researcher in the researchers list.", "IDENTIFIER-EXISTS-RESEARCHER-LIST": "This identifier is already used by a researcher in the researchers list.",
"IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organization in the organizations list.", "IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organisation in the organisations list.",
"SAVE":"Αποθήκευση", "SAVE":"Αποθήκευση",
"CANCEL": "Ακύρωση" "CANCEL": "Ακύρωση"
}, },
@ -1191,7 +1184,7 @@
}, },
"LICENSE-INFO": { "LICENSE-INFO": {
"INTRO": "Κάθε Σχέδιο Διαχείρισης Δεδομένων μπορεί να περιλαμβάνει συγκεκριμένες πληροφορίες άδειας σχετικά με το πόσο ανοικτό και διαθέσιμο είναι, ώστε να μπορείτε να καθορίσετε ποιος μπορεί να δει το σύνολο δεδομένων σας και για πόσο τα δεδομένα θα είναι ιδιωτικά.", "INTRO": "Κάθε Σχέδιο Διαχείρισης Δεδομένων μπορεί να περιλαμβάνει συγκεκριμένες πληροφορίες άδειας σχετικά με το πόσο ανοικτό και διαθέσιμο είναι, ώστε να μπορείτε να καθορίσετε ποιος μπορεί να δει το σύνολο δεδομένων σας και για πόσο τα δεδομένα θα είναι ιδιωτικά.",
"HINT": "Μία σύντομη περιγραφή για την άδεια που χρησιμοποιεί το Σχέδιο Διαχείρισης Δεδομένων, το είδος της και πότε θα είναι ανοικτό.", "HINT": "Μία σύντομη περιγραφή για την άδεια που χρηρισοποιεί το Σχέδιο Διαχείρισης Δεδομένων, το είδος της και πότε θα είναι ανοικτό.",
"TYPING": "Προσθέστε περισσότερα γράμματα για να είναι πιο πιθανό να βρείτε το σωστό." "TYPING": "Προσθέστε περισσότερα γράμματα για να είναι πιο πιθανό να βρείτε το σωστό."
}, },
"DATASET-DESCRIPTION": { "DATASET-DESCRIPTION": {
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων από τη συλλογή σας" "PLACEHOLDER": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων από τη συλλογή σας"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1461,7 +1454,7 @@
"SOURCES": "Πηγές", "SOURCES": "Πηγές",
"SOURCE:": "Πηγή: ", "SOURCE:": "Πηγή: ",
"NO-SOURCE": "Δε συνδέεται με την πηγή", "NO-SOURCE": "Δε συνδέεται με την πηγή",
"OUTPUT": "Αποτέλεσμα", "OUTPUT": "Αποτελέσμα",
"SELECT": "Επιλέξτε" "SELECT": "Επιλέξτε"
}, },
"DMP": { "DMP": {
@ -1698,7 +1691,7 @@
"DMP-QUESTION": "Τι είναι το DMP στο {{ APP_NAME_CAPS }}?", "DMP-QUESTION": "Τι είναι το DMP στο {{ APP_NAME_CAPS }}?",
"INFO-TEXT": "Το {{ APP_NAME_CAPS }} είναι μια ανοικτή επεκτάσιμη υπηρεσία που απλοποιεί τη διαχείριση, την επικύρωση, την παρακολούθηση και τη συντήρηση των Σχεδίων Διαχείρισης Δεδομένων. Επιτρέπει στους φορείς (ερευνητές, υπεύθυνους έρευνας, διευθυντές κλπ.) να δημιουργούν ζωντανά Σχέδια Διαχείρισης Δεδομένων που μπορούν να ανταλλάσσονται ελεύθερα μεταξύ των υποδομών για τη διεξαγωγή συγκεκριμένων πτυχών της διαδικασίας διαχείρισης Δεδομένων, σύμφωνα με τις προθέσεις και τη δέσμευση των κατόχων Δεδομένων.", "INFO-TEXT": "Το {{ APP_NAME_CAPS }} είναι μια ανοικτή επεκτάσιμη υπηρεσία που απλοποιεί τη διαχείριση, την επικύρωση, την παρακολούθηση και τη συντήρηση των Σχεδίων Διαχείρισης Δεδομένων. Επιτρέπει στους φορείς (ερευνητές, υπεύθυνους έρευνας, διευθυντές κλπ.) να δημιουργούν ζωντανά Σχέδια Διαχείρισης Δεδομένων που μπορούν να ανταλλάσσονται ελεύθερα μεταξύ των υποδομών για τη διεξαγωγή συγκεκριμένων πτυχών της διαδικασίας διαχείρισης Δεδομένων, σύμφωνα με τις προθέσεις και τη δέσμευση των κατόχων Δεδομένων.",
"INFO-DMP-TEXT": "Ένα Σχέδιο Διαχείρισης Δεδομένων είναι ένα ζωντανό αρχείο που περιγραφεί τα σύνολα δεδομένων που έχουν παραχθεί ή και επαναχρησιμοποιηθεί κατά τη διάρκεια και μετά του κύκλου ζωής της έρευνας. Τα Σχέδια Διαχείρισης Δεδομένων έχουν ως στόχο να παρέχουν στους ερευνητές τις αναγκαίες πληροφορίες για την αναπαραγωγή, επαναδιανομή και ανακατεύθυνση του σκοπού των ερευνητικών αποτελεσμάτων ώστε να εξασφαλίζεται η εγκυρότητα και η εκμετάλλευσή τους.", "INFO-DMP-TEXT": "Ένα Σχέδιο Διαχείρισης Δεδομένων είναι ένα ζωντανό αρχείο που περιγραφεί τα σύνολα δεδομένων που έχουν παραχθεί ή και επαναχρησιμοποιηθεί κατά τη διάρκεια και μετά του κύκλου ζωής της έρευνας. Τα Σχέδια Διαχείρισης Δεδομένων έχουν ως στόχο να παρέχουν στους ερευνητές τις αναγκαίες πληροφορίες για την αναπαραγωγή, επαναδιανομή και ανακατεύθυνση του σκοπού των ερευνητικών αποτελεσμάτων ώστε να εξασφαλίζεται η εγκυρότητα και η εκμετάλλευσή τους.",
"NEW-QUESTION": "Νέος με τα DMP; Επισκέψου", "NEW-QUESTION": "Νέος με τα DMP; Επίσκεψου",
"START-YOUR-FIRST-DMP": "Ξεκινήστε το πρώτο σας DMP", "START-YOUR-FIRST-DMP": "Ξεκινήστε το πρώτο σας DMP",
"OPEN-AIR-GUIDE": "Οδηγός για ερευνητές του OpenAIRE", "OPEN-AIR-GUIDE": "Οδηγός για ερευνητές του OpenAIRE",
"LEARN-MORE": "για να μάθετε περισσότερα για το πώς να δημιουργήσετε ένα!", "LEARN-MORE": "για να μάθετε περισσότερα για το πώς να δημιουργήσετε ένα!",
@ -1719,7 +1712,7 @@
"ALL": "Όλα", "ALL": "Όλα",
"EMPTY-LIST": "Τίποτα ακόμα εδώ.", "EMPTY-LIST": "Τίποτα ακόμα εδώ.",
"LATEST-ACTIVITY": "Τελευταία Δραστηριότητα", "LATEST-ACTIVITY": "Τελευταία Δραστηριότητα",
"DMP-ABOUT-BEG": "Ένα Σχέδιο Διαχείρισης Δεδομένων αποτελείται από τις βασικές πληροφορίες σχετικά με την έρευνα, όπως ο σκοπός, οι στόχοι και οι εμπλεκόμενοι ερευνητές, αλλά και σχετικά με την τεκμηρίωση των ερευνητικών συνόλων δεδομένων, δηλαδή", "DMP-ABOUT-BEG": "Ένα Σχέδιο Διαχείρισης Δεδομένων αποτελέιται από τις βασικές πληροφορίες σχετικά με την έρευνα, όπως ο σκοπός, οι στόχοι και οι εμπλεκόμενοι ερευνητές, αλλά και σχετικά με την τεκμηρίωση των ερευνητικών συνόλων δεδομένων, δηλαδή",
"DMP-ABOUT-END": ", που υπογραμμίζουν τα βήματα που ακολουθήθηκαν και τα μέσα που χρησιμοποιήθηκαν κατά τις δραστηριότητες διαχείρισης δεδομένων.", "DMP-ABOUT-END": ", που υπογραμμίζουν τα βήματα που ακολουθήθηκαν και τα μέσα που χρησιμοποιήθηκαν κατά τις δραστηριότητες διαχείρισης δεδομένων.",
"SELECT-DMP": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων για το Σύνολο Δεδομένων σας", "SELECT-DMP": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων για το Σύνολο Δεδομένων σας",
"ACTIONS": { "ACTIONS": {
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Ρυθμίσεις", "TITLE": "Ρυθμίσεις",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Srpski", "SERBIAN": "Srpski",
"PORTUGUESE": "Portugalski", "PORTUGUESE": "Portugalski",
"CROATIAN": "Hrvatski", "CROATIAN": "Hrvatski",
"POLISH": "Poljski", "POLISH": "Poljski"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -311,8 +310,6 @@
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Izaberi jezik predloška", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Izaberi jezik predloška",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Korisnici predloška", "DATASET-TEMPLATE-USERS": "Korisnici predloška",
"DATASET-TEMPLATE-USERS-HINT": "Kako biste obavijestili korisnike, dodajte korisnike i spremite promjene.", "DATASET-TEMPLATE-USERS-HINT": "Kako biste obavijestili korisnike, dodajte korisnike i spremite promjene.",
"DATASET-TEMPLATE-REMOVE-USER": "Izbriši korisnika", "DATASET-TEMPLATE-REMOVE-USER": "Izbriši korisnika",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Izvor", "FIELD-AUTOCOMPLETE-SOURCE": "Izvor",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opcija", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opcija",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Izbor datuma", "FIELD-DATE-PICKER-TITLE": "Izbor datuma",
"FIELD-DATE-PICKER-PLACEHOLDER": "Polje za unos", "FIELD-DATE-PICKER-PLACEHOLDER": "Polje za unos",
"FIELD-DATE-PICKER-LABEL": "Oznaka", "FIELD-DATE-PICKER-LABEL": "Oznaka",
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Postavke", "TITLE": "Postavke",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Serbski", "SERBIAN": "Serbski",
"PORTUGUESE": "Portugalski", "PORTUGUESE": "Portugalski",
"CROATIAN": "Chorwacki", "CROATIAN": "Chorwacki",
"POLISH": "Polski", "POLISH": "Polski"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -311,8 +310,6 @@
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Wybierz język", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Wybierz język",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Redaktorzy", "DATASET-TEMPLATE-USERS": "Redaktorzy",
"DATASET-TEMPLATE-USERS-HINT": "Dodaj redaktorów i zapisz zmiany, aby ich powiadomić.", "DATASET-TEMPLATE-USERS-HINT": "Dodaj redaktorów i zapisz zmiany, aby ich powiadomić.",
"DATASET-TEMPLATE-REMOVE-USER": "Usuń redaktora", "DATASET-TEMPLATE-REMOVE-USER": "Usuń redaktora",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Źródło", "FIELD-AUTOCOMPLETE-SOURCE": "Źródło",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "$Opcje główne$", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "$Opcje główne$",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Wybierz datę", "FIELD-DATE-PICKER-TITLE": "Wybierz datę",
"FIELD-DATE-PICKER-PLACEHOLDER": "Wprowadź tekst zastępczy", "FIELD-DATE-PICKER-PLACEHOLDER": "Wprowadź tekst zastępczy",
"FIELD-DATE-PICKER-LABEL": "Etykieta", "FIELD-DATE-PICKER-LABEL": "Etykieta",
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Ustawienia", "TITLE": "Ustawienia",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Sérvio", "SERBIAN": "Sérvio",
"PORTUGUESE": "Português", "PORTUGUESE": "Português",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -311,8 +310,6 @@
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Selecione o idioma", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Selecione o idioma",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Fonte", "FIELD-AUTOCOMPLETE-SOURCE": "Fonte",
"FIELD-AUTOCOMPLETE-URL": "URL", "FIELD-AUTOCOMPLETE-URL": "URL",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opções de Raiz", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opções de Raiz",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Escolha da Data", "FIELD-DATE-PICKER-TITLE": "Escolha da Data",
"FIELD-DATE-PICKER-PLACEHOLDER": "Sugestão de Preenchimento", "FIELD-DATE-PICKER-PLACEHOLDER": "Sugestão de Preenchimento",
"FIELD-DATE-PICKER-LABEL": "Etiqueta", "FIELD-DATE-PICKER-LABEL": "Etiqueta",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Selecione um PGD existente" "PLACEHOLDER": "Selecione um PGD existente"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Definições", "TITLE": "Definições",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Serbian", "SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese", "PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Source", "FIELD-AUTOCOMPLETE-SOURCE": "Source",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Date Picker", "FIELD-DATE-PICKER-TITLE": "Date Picker",
"FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder", "FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder",
"FIELD-DATE-PICKER-LABEL": "Label", "FIELD-DATE-PICKER-LABEL": "Label",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Vybrať existujúci DMP." "PLACEHOLDER": "Vybrať existujúci DMP."
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Nastavenia", "TITLE": "Nastavenia",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Serbian", "SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese", "PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Izvor", "FIELD-AUTOCOMPLETE-SOURCE": "Izvor",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opcija", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Opcija",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Izbor datuma", "FIELD-DATE-PICKER-TITLE": "Izbor datuma",
"FIELD-DATE-PICKER-PLACEHOLDER": "Polje za unos", "FIELD-DATE-PICKER-PLACEHOLDER": "Polje za unos",
"FIELD-DATE-PICKER-LABEL": "Oznaka", "FIELD-DATE-PICKER-LABEL": "Oznaka",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Odaberite postojeći Plan" "PLACEHOLDER": "Odaberite postojeći Plan"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Podešavanja", "TITLE": "Podešavanja",

View File

@ -191,8 +191,7 @@
"SERBIAN": "Sırpça", "SERBIAN": "Sırpça",
"PORTUGUESE": "Portekizce", "PORTUGUESE": "Portekizce",
"CROATIAN": "Croatian", "CROATIAN": "Croatian",
"POLISH": "Polish", "POLISH": "Polish"
"BASQUE": "Basque"
} }
}, },
"COOKIE": { "COOKIE": {
@ -306,19 +305,17 @@
"DATASET-TEMPLATE-NAME": "Description template name", "DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.", "DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description", "DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.", "DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type", "DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type", "DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language", "DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DESCRIPTION-TEMPLATE-PREFILLING": "Prefilling",
"DESCRIPTION-TEMPLATE-ENABLE-PREFILLING": "Enable prefilling",
"DATASET-TEMPLATE-USERS": "Editors", "DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.", "DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor", "DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet", "DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor", "DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled", "UNTITLED": "Untitled",
"QUESTION": "Question", "QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline", "TEMPLATE-OUTLINE": "Template outline",
@ -460,10 +457,6 @@
"FIELD-AUTOCOMPLETE-SOURCE": "Kaynak", "FIELD-AUTOCOMPLETE-SOURCE": "Kaynak",
"FIELD-AUTOCOMPLETE-URL": "Url", "FIELD-AUTOCOMPLETE-URL": "Url",
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root", "FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root",
"FIELD-AUTOCOMPLETE-HAS-AUTH": "Has Authentication",
"FIELD-AUTOCOMPLETE-AUTH-METHOD": "Method",
"FIELD-AUTOCOMPLETE-AUTH-BODY": "Request Body",
"FIELD-AUTOCOMPLETE-AUTH-TYPE": "Authentication Type",
"FIELD-DATE-PICKER-TITLE": "Tarih Seçici", "FIELD-DATE-PICKER-TITLE": "Tarih Seçici",
"FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text", "FIELD-DATE-PICKER-PLACEHOLDER": "Input Placeholder Text",
"FIELD-DATE-PICKER-LABEL": "Etiket", "FIELD-DATE-PICKER-LABEL": "Etiket",
@ -1390,13 +1383,13 @@
"PLACEHOLDER": "Mevcut olan bir VYP seçin" "PLACEHOLDER": "Mevcut olan bir VYP seçin"
}, },
"PREFILL-STEP": { "PREFILL-STEP": {
"TITLE": "Initialize your Description", "TITLE": "Initialize your Dataset",
"PREFILL": "Prefill", "PREFILL": "Prefill",
"OR": "OR", "OR": "OR",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually", "MANUALLY": "Manually",
"PROFILE": "Description Template", "PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Description", "PREFILLED-DATASET": "Prefilled Dataset",
"SEARCH": "Start typing to search for a dataset or software", "SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next" "NEXT": "Next"
} }
@ -1761,7 +1754,7 @@
"UNLINK-ACCOUNT-DIALOG": { "UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.", "MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",
"CONFIRM": "Confirm", "CONFIRM": "Confirm",
"CANCEL": "Cancel" "CANCEL": "Cancel"
}, },
"SETTINGS": { "SETTINGS": {
"TITLE": "Ayarlar", "TITLE": "Ayarlar",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1,5 +1,6 @@
[ [
"DatasetProfileEditorModel.description", "DatasetProfileEditorModel.description",
"DatasetProfileEditorModel.type",
"DatasetProfileEditorModel.label", "DatasetProfileEditorModel.label",
"SectionEditorModel.title", "SectionEditorModel.title",
"SectionEditorModel.description", "SectionEditorModel.description",
@ -8,6 +9,9 @@
"FieldSetEditorModel.extendedDescription", "FieldSetEditorModel.extendedDescription",
"FieldSetEditorModel.additionalInformation", "FieldSetEditorModel.additionalInformation",
"TextAreaFieldDataEditorModel.label", "TextAreaFieldDataEditorModel.label",
"FreeTextFieldDataEditorModel.label",
"WordListFieldDataEditorModel.label",
"FieldDataOptionEditorModel.label",
"FieldSetEditorModel.schematics", "FieldSetEditorModel.schematics",
"FieldSetEditorModel.export" "FieldSetEditorModel.export"
] ]

View File

@ -90,13 +90,3 @@ h2.title{
.text-gray{ .text-gray{
color: $gray-color !important; color: $gray-color !important;
} }
blockquote {
margin-left: 1rem;
border-left: .2em solid #dfe2e5;
padding-left: .5rem;
}
.highlight {
background-color: lightgoldenrodyellow;
}

View File

@ -88,7 +88,6 @@
<div class="col-8 card-body pl-0" class="flex-column align-items-center"> <div class="col-8 card-body pl-0" class="flex-column align-items-center">
<p class="card-text-1">Consorcio Madroño</p> <p class="card-text-1">Consorcio Madroño</p>
<p class="card-text-2">Lanko López, Juan Corrales Correyero, Fernando González Ballesteros</p> <p class="card-text-2">Lanko López, Juan Corrales Correyero, Fernando González Ballesteros</p>
<p class="card-text-1">Mondragon Unibertsitatea Library (in Basque)</p>
</div> </div>
</div> </div>
<div class="card flex-row"> <div class="card flex-row">

View File

@ -1,3 +1,4 @@
<!doctype html>
<html> <html>
<head> <head>