Compare commits

...

81 Commits

Author SHA1 Message Date
Diamantis Tziotzios e8aef281d4 Merge branch 'Development' 2024-02-22 11:09:31 +02:00
Diamantis Tziotzios 00c6978594 no message 2024-02-22 11:07:51 +02:00
Diamantis Tziotzios 3adb518e61 fixes 2024-02-14 22:10:15 +02:00
Konstantina Galouni eb74ef86b9 rich-text-editor.component.ts: Removed "backgroundColor" from toolbarHiddenButtons & added in customClasses "Highlight" option with custom "highlight" class | _type.scss: Added rules for "blockquote" and ".highlight" (added by rich text editor). 2024-02-13 13:23:13 +02:00
Diamantis Tziotzios a1ee9c82bc fixes 2024-01-31 17:55:08 +02:00
Diamantis Tziotzios 5e5bd39313 no message 2024-01-30 13:26:31 +02:00
Diamantis Tziotzios 5e99cef60e default blueprint update 2024-01-24 16:25:46 +02:00
Diamantis Tziotzios cc7edc2f49 final fixes for #9384 #9153 #9409 #9420 2024-01-24 16:17:06 +02:00
Diamantis Tziotzios a1849c64ca Merge branch 'Development' of https://code-repo.d4science.org/MaDgiK-CITE/argos into Development
# Conflicts:
#	dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.ts
2024-01-24 14:48:38 +02:00
Diamantis Tziotzios 192220161b fixes 2024-01-24 14:47:37 +02:00
George Kalampokis 87758c3e9a Fix various issues with adding/removing Dataset Templates 2024-01-24 14:31:46 +02:00
Diamantis Tziotzios 83342f5afa docx template update 2024-01-17 17:49:52 +02:00
Diamantis Tziotzios 65cdb3b6ea fixes for #9384 #9153 #9162 #9265 2024-01-17 16:50:12 +02:00
Diamantis Tziotzios 536ba9b900 Fixes for #9152 #9153 #9162 #9265 #9266 #9311 #9312 2024-01-09 09:42:58 +02:00
Alexandros Mandilaras 6bd3302788 sql script fix 2023-11-23 15:16:11 +02:00
Diamantis Tziotzios 4970f5812f fix issues #9152 #9153 #9204 #9208 2023-11-23 13:15:50 +02:00
Diamantis Tziotzios 9fed92dbcb fixes for #9109 #9146 #9148 #9149 #9152 #9153 #9156 #9157 #9158 #9160 #9162 #9163 #9164 #9166 2023-11-03 13:24:01 +02:00
Diamantis Tziotzios 44dab9c19a gitignore changes 2023-11-01 09:41:22 +02:00
Alexandros Mandilaras 54f911d826 typo fixes in greek and english translations 2023-10-23 10:12:17 +03:00
Diamantis Tziotzios 9879050eab cleanup 2023-10-19 17:28:36 +03:00
Diamantis Tziotzios 8a41a7dcd9 Fixes for #9033 #9107 #9105 #9105 2023-10-19 17:27:37 +03:00
Diamantis Tziotzios d60cc144d5 #9033 Description Templates - change "Other" API label to "Custom" 2023-10-18 16:10:12 +03:00
Georgios Kakaletris 9c37e5a073 Update 'README.md' 2023-10-18 12:31:03 +02:00
Georgios Kakaletris 444c1aacb1 Update 'README.md' 2023-10-18 12:27:40 +02:00
Diamantis Tziotzios 59d7383947 added basque contributors at static pages 2023-10-17 13:48:50 +03:00
Diamantis Tziotzios 6caa1af134 Added Basque language 2023-10-16 18:21:22 +03:00
Diamantis Tziotzios 50c96ef821 Merge branch 'Development' 2023-06-20 09:39:15 +03:00
Konstantina Galouni 0adc7044ab h2020.docx: [Bug fix] Updated image of Argos in h2020.docx DMP template | DataManagementPlanManager.java & DatasetManager.java: Added parameter "isDataset" in fillFirstPage() | WordBuilder.java: [Bug fix] Added parameter isDataset in fillFirstPage() and added some checks in description.
(cherry picked from commit c9b4b35e39)
2023-05-09 10:33:44 +03:00
Konstantina Galouni 13e62fd409 h2020.docx & WordBuilder.java: Updated h2020.docx DMP template and added export of DMP description.
(cherry picked from commit 28c1c9b71d)
2023-03-14 10:23:35 +02:00
Diamantis Tziotzios 7185b5d117 Merge commit '180e02c829a8fb35056124d5afdbec3835a94b62' 2023-02-28 16:08:32 +02:00
George Kalampokis 5f131b9823 Remove thread sleeps when trying to load config files and removed principal from Exception Handling Controller 2022-12-06 14:34:11 +02:00
Diamantis Tziotzios 93320f7c94 Merge branch 'Development' 2022-11-22 15:03:08 +02:00
Diamantis Tziotzios 876d99ce38 Merge commit '18dcabbac2599d35246f91204efbb25238106565' 2022-11-03 14:20:16 +02:00
George Kalampokis 7a71110033 Fix critical issue with open file handle leak on user guide folder
(cherry picked from commit fa723c07ae)
2022-07-28 17:14:13 +03:00
Diamantis Tziotzios 14c267c97e Merge branch 'Development'
# Conflicts:
#	dmp-backend/web/src/main/resources/config/application-production.properties
2022-05-13 11:58:34 +03:00
Diamantis Tziotzios b04b35d62b Merge branch 'Development'
# Conflicts:
#	dmp-backend/web/src/main/resources/RDACommonStandards.txt
2022-02-25 12:19:29 +02:00
Diamantis Tziotzios 7a8375b988 Merge commit '2cb985c23c4ceda99efc78bcc8e77b3eceeb0bcf'
# Conflicts:
#	dmp-backend/elastic/src/main/java/eu/eudat/elastic/criteria/DatasetCriteria.java
#	dmp-backend/elastic/src/main/java/eu/eudat/elastic/entities/Dataset.java
#	dmp-backend/elastic/src/main/java/eu/eudat/elastic/entities/Dmp.java
#	dmp-backend/elastic/src/main/java/eu/eudat/elastic/repository/DatasetRepository.java
#	dmp-backend/elastic/src/main/java/eu/eudat/elastic/repository/DmpRepository.java
#	dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java
#	dmp-backend/web/src/main/java/eu/eudat/logic/mapper/elastic/criteria/DmpCriteriaMapper.java
#	dmp-backend/web/src/main/java/eu/eudat/logic/utilities/documents/word/WordBuilder.java
#	dmp-backend/web/src/main/java/eu/eudat/models/data/listingmodels/DataManagementPlanListingModel.java
2021-12-09 12:18:39 +02:00
Diamantis Tziotzios 895dbcf098 Revert "user guide path fix"
This reverts commit bd15b1e2c7.
2021-07-07 20:39:41 +03:00
Diamantis Tziotzios bd15b1e2c7 user guide path fix 2021-07-07 20:39:22 +03:00
George Kalampokis faabd343a9 Improve error handling
(cherry picked from commit d5cd90814a)
2021-07-06 13:41:09 +03:00
George Kalampokis e5a929f259 Fix issues with xml import and issues with zenodo deposit
(cherry picked from commit efe177f0b1)
2021-07-06 13:40:15 +03:00
George Kalampokis d1fc10854c Fix issue with zenodo depositions
(cherry picked from commit c57e10a033)
2021-07-06 12:15:49 +03:00
George Kalampokis 2537923dc0 Fix various critical issues
(cherry picked from commit 244bfa5c54)
2021-07-05 11:10:11 +03:00
George Kalampokis c1adbe283a Improvements over MS Word Document export
(cherry picked from commit 4e3b98f1ff)
2021-06-30 18:48:20 +03:00
George Kalampokis 1c365a191e Minor Update
(cherry picked from commit 295750684f)
2021-06-30 18:48:13 +03:00
Kristian Ntavidi 82c5586067 Dataset and dmp overview fix.
* Fix edit issue when multiple users have ownership of the same dmp/dataset.

(cherry picked from commit fd9d35aad3)
2021-06-30 13:38:53 +03:00
George Kalampokis 04f230dff1 Fix critical issue with dataset's copy dropdown
(cherry picked from commit d1e3aae36d)
2021-06-30 12:52:32 +03:00
George Kalampokis 72d88d9db4 Fix listing issues and improve elastic query
(cherry picked from commit dcd7f24cac)
2021-06-29 14:25:38 +03:00
George Kalampokis 143a4c0214 Reduce severity
(cherry picked from commit 03b7699973)
2021-06-25 19:31:45 +03:00
George Kalampokis e7e5ed02b3 Add query db fallback for DMPs
(cherry picked from commit d1df83f689)
2021-06-25 19:28:29 +03:00
George Kalampokis b5fcc5971e Fix various library issues with postgres and elastic
(cherry picked from commit 4a4042d621)
2021-06-25 12:46:09 +03:00
Diamantis Tziotzios c16c35225f Merge branch 'Development' 2021-06-25 08:50:27 +03:00
Diamantis Tziotzios f5d266554b Merge commit 'ca91c14114b8994d41fdf2b97fc6d1a4d82ffa4e' 2021-05-19 14:22:47 +03:00
Diamantis Tziotzios db31597fc0 Merge branch 'Development' 2020-10-07 10:58:45 +03:00
Diamantis Tziotzios 9f5054668e Merge branch 'Development'
* Development: (72 commits)
  splash screen fixes
  splash spell error fix
  Properly remove associate Collaborators from a DMP
  splash changes
  Fixed issue with DMP filter on public datasets
  Fixed issue when using the copy dataset dialog
  Minor styling improvement over DMP Overview
  Code clean up
  Add support for newer versions of java (11) (expirimental)
  Add Zenodo file visibility field for DMP (ref #274)
  Fixed issue not passing DMP Extra Properties on clones and new Versions
  Add DMP Zenodo license field (ref #274)
  more splash screen changes
  Allow splash to send contact emails
  splash screen changes
  Hide Uri field on Dataset Editor (ref #275)
  When logging in remove the cookie consent popup
  Fixed minor issues with RDA Mapping
  Add currency field type for dataset templates
  Add DMP language a placeholder on UI
  ...

# Conflicts:
#	dmp-backend/web/src/main/resources/RDACommonStandards.txt
#	dmp-backend/web/src/main/resources/config/application-production.properties
2020-07-03 11:00:07 +03:00
George Kalampokis 38986ef67b no message 2020-06-16 17:58:31 +03:00
Diamantis Tziotzios bff260b85b config file changes 2020-06-16 17:54:50 +03:00
George Kalampokis 9519300dc4 Removed deprecated configurations and added additional RDA Common Standards for dataset Templates
(cherry picked from commit 5b0a66ce06)
2020-05-29 12:07:59 +03:00
George Kalampokis 9373d3e038 Fixed logback paths
(cherry picked from commit 33ec8b81c0)
2020-05-20 15:39:27 +03:00
dtziotzios d971f02a94 Merge branch 'Development'
# Conflicts:
#	dmp-backend/web/src/main/java/eu/eudat/controllers/DMPs.java
#	dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java
2020-05-13 17:29:52 +03:00
Georgios Kakaletris d3915e26e7 Update LICENSE 2020-05-09 00:03:50 +02:00
George Kalampokis c028aad615 Fixed and improved file export system
(cherry picked from commit 71ccd76896)
2020-04-02 18:44:40 +03:00
Diamantis Tziotzios 4ee39074a3 Merge commit '8ca2b912d40ece8bf0fbcda5c49f1ef7f5f6fdfd' 2020-04-02 13:33:08 +03:00
Diamantis Tziotzios 1b4952a909 Merge branch 'Development' 2020-01-31 18:26:27 +02:00
Diamantis Tziotzios 3ada5a0d3d Merge branch 'Development' 2019-11-26 11:41:02 +02:00
Diamantis Tziotzios 63ee865dd9 Merge commit 'c8358f22dd5d108b7f270f97724d6bab1582c2c5' 2019-11-22 18:08:55 +02:00
Diamantis Tziotzios 2a52138124 Merge branch 'Development' 2019-09-17 18:47:39 +03:00
Diamantis Tziotzios 7cf64c18f2 Merge branch 'Development' 2019-09-17 11:31:58 +03:00
Diamantis Tziotzios 71d317bab7 license file 2019-06-19 08:59:52 +02:00
Ioannis Kalyvas cd8b3448f5 Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot 2018-06-28 12:39:39 +03:00
Ioannis Kalyvas c3d4cb6fdd no message 2018-06-28 12:33:43 +03:00
Ioannis Kalyvas b0ccac191f no message 2018-03-06 17:33:55 +02:00
Ioannis Kalyvas 3b1f37ef22 no message 2018-03-06 17:27:24 +02:00
Ioannis Kalyvas b8e040ee94 Merge branch 'master' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot
# Conflicts:
#	dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java
2018-03-06 17:21:46 +02:00
Ioannis Kalyvas 50444a0b73 Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot
# Conflicts:
#	dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java
#	dmp-frontend/src/index.html
2018-03-06 17:02:13 +02:00
Diamantis Tziotzios 85bdb7fad1 Merge branch 'Development'
# Conflicts:
#	dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java
2018-02-12 10:23:41 +02:00
annabakouli b2e49fbb8a no message 2018-01-18 12:55:35 +02:00
Diamantis Tziotzios bfc6b63067 Merge branch 'Development'
# Conflicts:
#	dmp-backend/src/main/java/rest/entities/DMPs.java
#	dmp-backend/src/main/java/rest/entities/DataRepositories.java
#	dmp-backend/src/main/java/rest/entities/DatasetProfiles.java
#	dmp-backend/src/main/java/rest/entities/Datasets.java
#	dmp-backend/src/main/java/rest/entities/DmpProfiles.java
#	dmp-backend/src/main/java/rest/entities/Organisations.java
#	dmp-backend/src/main/java/rest/entities/Projects.java
#	dmp-backend/src/main/java/rest/entities/Registries.java
#	dmp-backend/src/main/java/rest/entities/Researchers.java
#	dmp-backend/src/main/java/rest/entities/Services.java
#	dmp-backend/src/main/java/rest/entities/Users.java
#	dmp-frontend/src/app/app.component.ts
#	dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts
#	dmp-frontend/src/assets/custom.js
#	dmp-frontend/src/index.html
2018-01-18 12:45:51 +02:00
Nikolaos Laskaris 9941c96dc2 Minor edits 2017-11-27 16:08:13 +02:00
Nikolaos Laskaris 06272c79da -- 2017-11-23 17:34:35 +02:00
Nikolaos Laskaris a00eec68d8 fixed glitches of google-sign-in component 2017-11-23 13:13:20 +02:00
64 changed files with 3697 additions and 1274 deletions

1
.gitignore vendored
View File

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

View File

@ -1,3 +1,9 @@
**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
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()));
}
if (criteria.getDatasetTemplates() != null && !criteria.getDatasetTemplates().isEmpty()) {
query.where((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("id").in(criteria.getDatasetTemplates()));
query.where((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("datasetprofile").get("id").in(criteria.getDatasetTemplates()));
}
if (criteria.getGrantStatus() != null) {
if (criteria.getGrantStatus().equals(GrantStateType.FINISHED.getValue().shortValue()))

View File

@ -226,6 +226,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.9.RELEASE</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -202,14 +202,14 @@ public class DashBoardManager {
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
.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")
.orderBy((builder, root) -> builder.desc(root.get("modified")))
.take(numberofactivities)
.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;
}

View File

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

View File

@ -135,6 +135,17 @@ public class DataManagementProfileManager {
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 {
QueryableList<DMPProfile> items = databaseRepository.getDmpProfileDao().getWithCriteria(dataManagementPlanProfileCriteriaRequest.getCriteria());
List<DataManagementPlanProfileListingModel> datamanagementPlans = items.select(item -> new DataManagementPlanProfileListingModel().fromDataModel(item));

View File

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

View File

@ -24,6 +24,7 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.util.Units;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import org.json.JSONArray;
import org.json.JSONException;
import org.jsoup.Jsoup;
@ -1019,60 +1020,44 @@ public class WordBuilder {
int descrParPos = -1;
XWPFParagraph descrPar = null;
for(XWPFParagraph p: document.getParagraphs()){
List<XWPFRun> runs = p.getRuns();
if(runs != null){
for(XWPFRun r : runs){
String text = r.getText(0);
if(text != null){
if(text.contains("{ARGOS.DMP.TITLE}")) {
text = text.replace("{ARGOS.DMP.TITLE}", dmpEntity.getLabel());
r.setText(text, 0);
} else if(text.contains("{ARGOS.DMP.VERSION}")) {
text = text.replace("{ARGOS.DMP.VERSION}", "Version " + dmpEntity.getVersion());
r.setText(text, 0);
} else if(datasetEntity != null && text.contains("{ARGOS.DATASET.TITLE}")) {
text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel());
r.setText(text, 0);
// } else if(text.equals("Description") && ((!isDataset && (dmpEntity == null || dmpEntity.getDescription() != null)) || (isDataset && (datasetEntity == null || datasetEntity.getDescription() == null)))) {
// r.setText("", 0);
} else if((dmpEntity != null && text.contains("{ARGOS.DMP.DESCRIPTION}") && !isDataset) || (datasetEntity != null && text.contains("{ARGOS.DATASET.DESCRIPTION}") && isDataset)) {
descrParPos = parPos;
descrPar = p;
if(dmpEntity != null && !isDataset) {
text = text.replace("{ARGOS.DMP.DESCRIPTION}", "");
} else if(datasetEntity != null && isDataset) {
text = text.replace("{ARGOS.DATASET.DESCRIPTION}", "");
}
r.setText(text, 0);
} else if(text.equals("{ARGOS.DMP.RESEARCHERS}")) {
String researchersNames = "";
Set<Researcher> researchers = dmpEntity.getResearchers();
int i = 0;
for(Researcher researcher : researchers){
i++;
researchersNames += researcher.getLabel() + (i < researchers.size() ? ", " : "");
}
text = text.replace("{ARGOS.DMP.RESEARCHERS}", researchersNames);
r.setText(text, 0);
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( dmpEntity != null) {
this.replaceTextSegment(p, "'{ARGOS.DMP.TITLE}'", dmpEntity.getLabel());
this.replaceTextSegment(p, "'{ARGOS.DMP.VERSION}'", "Version " + dmpEntity.getVersion());
}
if( datasetEntity != null) {
this.replaceTextSegment(p, "'{ARGOS.DATASET.TITLE}'", datasetEntity.getLabel());
}
String researchersNames = "";
Set<Researcher> researchers = dmpEntity.getResearchers();
int i = 0;
for(Researcher researcher : researchers){
i++;
researchersNames += researcher.getLabel() + (i < researchers.size() ? ", " : "");
}
this.replaceTextSegment(p, "'{ARGOS.DMP.RESEARCHERS}'", researchersNames, 15);
String organisationsNames = "";
Set<Organisation> organisations = dmpEntity.getOrganisations();
i = 0;
for(Organisation organisation : organisations){
i++;
organisationsNames += organisation.getLabel() + (i < organisations.size() ? ", " : "");
}
this.replaceTextSegment(p, "'{ARGOS.DMP.ORGANIZATIONS}'", organisationsNames, 15);
if(this.textSegmentExists(p,"'{ARGOS.DMP.DESCRIPTION}'")) {
descrParPos = parPos;
descrPar = p;
this.replaceTextSegment(p, "'{ARGOS.DMP.DESCRIPTION}'", "");
}
if(this.textSegmentExists(p,"'{ARGOS.DATASET.DESCRIPTION}'")) {
descrParPos = parPos;
descrPar = p;
this.replaceTextSegment(p, "'{ARGOS.DATASET.DESCRIPTION}'", "");
}
}
if((descrParPos != -1) && (dmpEntity!=null) && (dmpEntity.getDescription() != null) && !isDataset) {
XmlCursor cursor = descrPar.getCTP().newCursor();
cursor.toNextSibling();
@ -1096,7 +1081,7 @@ public class WordBuilder {
XWPFParagraph p = it.next().getCell(0).getParagraphs().get(0);
XWPFRun run = p.createRun();
run.setText(dmpEntity.getGrant().getFunder().getLabel());
run.setFontSize(17);
run.setFontSize(15);
p.setAlignment(ParagraphAlignment.CENTER);
}
it = tbl.getRows().iterator();
@ -1111,7 +1096,7 @@ public class WordBuilder {
text += parts.length > 1 ? "/ No "+parts[parts.length - 1] : "";
}
run.setText(text);
run.setFontSize(17);
run.setFontSize(15);
p.setAlignment(ParagraphAlignment.CENTER);
}
}
@ -1119,43 +1104,165 @@ public class WordBuilder {
public void fillFooter(DMP dmpEntity, Dataset datasetEntity, XWPFDocument document, boolean isDataset) {
document.getFooterList().forEach(xwpfFooter -> {
List<XWPFRun> runs = xwpfFooter.getParagraphs().get(0).getRuns();
if(runs != null){
for(XWPFRun r : runs){
String text = r.getText(0);
if(text != null){
if(text.contains("{ARGOS.DMP.TITLE}")){
text = text.replace("{ARGOS.DMP.TITLE}", dmpEntity.getLabel());
r.setText(text, 0);
}
if(text.contains("{ARGOS.DATASET.TITLE}") && datasetEntity != null){
text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel());
r.setText(text, 0);
}
if(text.contains("{ARGOS.DMP.LICENSE}")){
try{
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);
}
for(XWPFParagraph p : xwpfFooter.getParagraphs()){
if(p != null){
if( dmpEntity != null) {
this.replaceTextSegment(p, "'{ARGOS.DMP.TITLE}'", dmpEntity.getLabel());
}
if( datasetEntity != null) {
this.replaceTextSegment(p, "'{ARGOS.DATASET.TITLE}'", datasetEntity.getLabel());
}
Map<String, String> license = null;
try {
license = ((Map<String, String>) mapper.readValue(dmpEntity.getExtraProperties(), Map.class).get("license"));
if (license != null && license.get("pid") != null) {
this.replaceTextSegment(p, "'{ARGOS.DMP.LICENSE}'", license.get("pid"));
} else {
this.replaceTextSegment(p, "'{ARGOS.DMP.LICENSE}'", "License: -");
}
} 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

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

View File

@ -23,7 +23,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
private UUID id;
private String label;
private UUID groupId;
private Tuple<UUID, String> profile;
private UUID profile;
private int version;
private int status;
private boolean lockable;
@ -53,10 +53,10 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
this.id = id;
}
public Tuple<UUID, String> getProfile() {
public UUID getProfile() {
return profile;
}
public void setProfile(Tuple<UUID, String> profile) {
public void setProfile(UUID profile) {
this.profile = profile;
}
@ -226,7 +226,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
@Override
public DataManagementPlanEditorModel fromDataModel(DMP entity) {
this.id = entity.getId();
this.profile = entity.getProfile() != null ? new Tuple<UUID, String>(entity.getProfile().getId(), entity.getProfile().getLabel()) : null;
this.profile = entity.getProfile() != null ? entity.getProfile().getId() : null;
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.version = entity.getVersion();
@ -289,7 +289,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
DMP dataManagementPlanEntity = new DMP();
if (this.profile != null) {
DMPProfile dmpProfile = new DMPProfile();
dmpProfile.setId(this.profile.getId());
dmpProfile.setId(this.profile);
dataManagementPlanEntity.setProfile(dmpProfile);
}
dataManagementPlanEntity.setId(this.id);

View File

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

View File

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

View File

@ -1,8 +1,11 @@
package eu.eudat.models.rda.mapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.entities.*;
import eu.eudat.logic.managers.DataManagementProfileManager;
import eu.eudat.logic.services.ApiContext;
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.DmpId;
import net.minidev.json.JSONObject;
@ -24,13 +27,13 @@ public class DmpRDAMapper {
private DatasetRDAMapper datasetRDAMapper;
private ApiContext apiContext;
private DataManagementProfileManager dataManagementProfileManager;
@Autowired
public DmpRDAMapper(DatasetRDAMapper datasetRDAMapper, ApiContext apiContext) throws IOException {
public DmpRDAMapper(DatasetRDAMapper datasetRDAMapper, ApiContext apiContext, DataManagementProfileManager dataManagementProfileManager) throws IOException {
this.datasetRDAMapper = datasetRDAMapper;
this.apiContext = apiContext;
this.dataManagementProfileManager = dataManagementProfileManager;
}
@Transactional
@ -116,10 +119,15 @@ public class DmpRDAMapper {
}
// 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()));
if (dmp.getProject() != null) {
rda.setProject(Collections.singletonList(ProjectRDAMapper.toRDA(dmp.getProject(), dmp.getGrant())));
}
rda.setAdditionalProperty("templates", dmp.getAssociatedDmps().stream().map(datasetProfile -> datasetProfile.getId().toString()).toArray());
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("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;
}
@ -138,26 +146,46 @@ public class DmpRDAMapper {
entity.setDois(new HashSet<>());
}
}
if (((List<String>) rda.getAdditionalProperties().get("templates")) != null && !((List<String>) rda.getAdditionalProperties().get("templates")).isEmpty() && entity.getId() != null) {
entity.setAssociatedDmps(((List<String>) rda.getAdditionalProperties().get("templates")).stream().map(x -> this.getProfile(x, entity.getId())).filter(Objects::nonNull).collect(Collectors.toSet()));
}
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()));
String blueprintId = (String) rda.getAdditionalProperties().get("blueprintId");
DMPProfile blueprint = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(UUID.fromString(blueprintId));
entity.setProfile(blueprint);
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());
Set<DMPDatasetProfile> dmpDatasetProfiles = new HashSet<>();
for (DescriptionTemplate profile : descriptionTemplates) {
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) {
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.setModified(rda.getModified());
entity.setDescription(rda.getDescription());
DescriptionTemplate defaultProfile = ((DescriptionTemplate)entity.getAssociatedDmps().toArray()[0]);
entity.setDataset(rda.getDataset().stream().map(rda1 -> datasetRDAMapper.toEntity(rda1, defaultProfile)).collect(Collectors.toSet()));
if (rda.getProject().size() > 0) {
if(entity.getAssociatedDmps().size() > 0) {
DescriptionTemplate defaultProfile = entity.getAssociatedDmps().stream().findFirst().get().getDatasetprofile();
entity.setDataset(rda.getDataset().stream().map(rda1 -> datasetRDAMapper.toEntity(rda1, defaultProfile)).collect(Collectors.toSet()));
}
if (rda.getProject() != null && rda.getProject().size() > 0) {
Map<String, Object> result = ProjectRDAMapper.toEntity(rda.getProject().get(0), apiContext);
entity.setProject((Project) result.get("project"));
result.entrySet().stream().filter(entry -> entry.getKey().startsWith("grant")).forEach(entry -> entity.setGrant((Grant) entry.getValue()));
@ -165,16 +193,19 @@ public class DmpRDAMapper {
Map<String, Object> extraProperties = new HashMap<>();
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));
if (rda.getAdditionalProperties().get("dmpProperties") != null) entity.setProperties(rda.getAdditionalProperties().get("dmpProperties").toString());
return entity;
}
private DMPDatasetProfile getProfile(String descriptionTemplateId, UUID dmpId) {
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();
private DescriptionTemplate getProfile(String id) {
return apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().asQueryable().where(((builder, root) -> builder.equal(root.get("id"), UUID.fromString(id)))).getSingleOrDefault();
}
}

View File

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

View File

@ -13,7 +13,7 @@ ADD COLUMN "Type" uuid;
INSERT INTO public."DescriptionTemplateType" ("ID", "Name", "Status")
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 COLUMN "Type" SET NOT NULL;

View File

@ -4,7 +4,7 @@ BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
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="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());
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());
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."DMPDatasetProfile" SET "data" = '{"dmpSectionIndex":[3]}' WHERE "data" IS NULL;

View File

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

View File

@ -101,6 +101,21 @@ export class ConfigurationService extends BaseComponent {
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> {
return new Promise((r, e) => {
@ -146,6 +161,9 @@ export class ConfigurationService extends BaseComponent {
this._matomoSiteId = config.matomo.siteId;
}
this._maxFileSizeInMB = config.maxFileSizeInMB;
this._newReleaseNotificationExpires = config.newReleaseNotification?.expires;
this._newReleaseNotificationLink = config.newReleaseNotification?.link;
this._newReleaseNotificationVersionCode = config.newReleaseNotification?.versionCode;
}
}

View File

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

View File

@ -220,6 +220,9 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
ngOnChanges(changes: SimpleChanges) {
if (changes['configuration'] && changes['configuration'].isFirstChange) {
this.getSelectedItems(this.value);
}
if (changes['value'] && !changes['value'].isFirstChange()) {
this.getSelectedItems(this.value);
}
}
@ -480,6 +483,10 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
if (event != null) {
event.stopPropagation();
}
if (this.configuration.canRemoveItem != null && !this.configuration.canRemoveItem(item)) {
event.stopPropagation();
return;
}
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.optionRemoved.emit(item);

View File

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

View File

@ -12,7 +12,7 @@ export class AuthFieldEditorModel extends FieldDataEditorModel<AuthFieldEditorMo
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]],
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]]
@ -22,11 +22,13 @@ export class AuthFieldEditorModel extends FieldDataEditorModel<AuthFieldEditorMo
}
fromModel(item: AuthAutoCompleteData): AuthFieldEditorModel {
this.url = item.url;
this.method = item.method;
this.body = item.body;
this.path = item.path;
this.type = item.type;
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

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

View File

@ -222,7 +222,7 @@
<div class="col-12">
<mat-form-field>
<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)" (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)" (optionActionClicked)="onPreviewTemplate($event, sectionIndex)" (optionSelected)="onOptionSelected($event, sectionIndex)">
</app-multiple-auto-complete>
<!-- <button matSuffix class="input-btn" (click)="allAvailableProfiles($event)">
<mat-icon class="icon-btn">view_list</mat-icon>

View File

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

View File

@ -1,8 +1,28 @@
<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.dashboardStatisticsData">
<div class="main-content">
<div class="col">
<div class="main-content">
<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'">
<a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
@ -29,158 +49,156 @@
</span>
</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>
<!-- 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 *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>
<div class="main-content">
<!-- 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>
<!-- Home screen on log out -->
<div class="col p-0" *ngIf="!this.isAuthenticated()">
<div class="col-auto">
<!-- <div class="row">
<div>
<div class="main-content">
</div>
</div>
</div>
<!-- Home screen on log out -->
<div class="col p-0" *ngIf="!this.isAuthenticated()">
<div class="col-auto">
<!-- <div class="row">
<div class="col header-text-container">
<h3>{{ 'ABOUT.WELCOME' | translate }}</h3>
<h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4>
</div>
</div> -->
<div class="main-content">
<div class="col">
<div class="row">
<div class="col d-flex flex-column">
<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>
<div class="d-flex flex-column align-items-center non-auth-title-container">
<h4 class="pt-4">{{'DASHBOARD.TITLE' | translate}}</h4>
<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 class="main-content">
<div class="col">
<div class="row">
<div class="col d-flex flex-column">
<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>
<div class="d-flex flex-column align-items-center non-auth-title-container">
<h4 class="pt-4">{{'DASHBOARD.TITLE' | translate}}</h4>
<p class="col-auto app-info">{{'DASHBOARD.INFO-TEXT' | translate}}</p>
</div>
<div *ngIf="hasDmps()" class="col activity">
<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="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}} ({{totalDmps}})">-->
<mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-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.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">
<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 *ngIf="hasDmps()" class="col activity">
<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="dmps" label="{{'DASHBOARD.PUBLIC-DMPS' | translate}} ({{totalDmps}})">-->
<mat-tab aria-label="dmps" label="{{'DASHBOARD.PUBLIC-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.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']">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div> -->
</mat-tab>
</mat-tab-group>
</div>
</mat-tab>
</mat-tab-group>
</div>
<div class="col-auto">
<div *ngIf="!hasDmps()" class="ml-auto pl-4 personal-usage-block">
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div class="counter-zero">0</div>
<a>{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<div class="counter-zero">0</div>
<a>{{'DASHBOARD.PUBLIC-DATASETS' | 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="hasDmps()" class="ml-auto stats">
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
{{dashboardStatisticsData?.totalDataSetCount}}</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.PUBLIC-DATASETS' | 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 class="col-auto">
<div *ngIf="!hasDmps()" class="ml-auto pl-4 personal-usage-block">
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div class="counter-zero">0</div>
<a>{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<div class="counter-zero">0</div>
<a>{{'DASHBOARD.PUBLIC-DATASETS' | 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="hasDmps()" class="ml-auto stats">
<div class="personal-usage">{{'DASHBOARD.PUBLIC-USAGE' | translate}}</div>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataManagementPlanCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataManagementPlanCount == 0}">
{{dashboardStatisticsData?.totalDataManagementPlanCount}}</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.PUBLIC-DMPS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
{{dashboardStatisticsData?.totalDataSetCount}}</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.PUBLIC-DATASETS' | 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>
@ -188,10 +206,11 @@
</div>
</div>
</div>
</div>
<!-- <div class="header-image">
<!-- <div class="header-image">
<div class="header-text-container">
<h3>{{ 'ABOUT.WELCOME' | translate }}</h3>
<h4>{{ 'ABOUT.WELCOME-MESSAGE' | translate }}</h4>
@ -291,4 +310,4 @@
</div>
</div>
</div>
</div> -->
</div> -->

View File

@ -396,7 +396,7 @@ input[type="text"] {
.add-dataset-btn {
height: 40px;
margin-left: 40px;
margin-left: 40px;
}
:host ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar,
@ -425,6 +425,87 @@ input[type="text"] {
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 {
height: 100%;
}

View File

@ -35,6 +35,9 @@ import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/serv
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
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({
@ -73,6 +76,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
importFileText: string;
startWizardText: string;
currentType: string = "recent";
newReleaseNotificationVisible = false;
constructor(
private router: Router,
@ -89,7 +93,9 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
private language: TranslateService,
private uiNotificationService: UiNotificationService,
private guidedTourService: GuidedTourService,
private matomoService: MatomoService
private matomoService: MatomoService,
private cookieService: CookieService,
public configurationService: ConfigurationService
) {
super();
// this.dashboardStatisticsData.totalDataManagementPlanCount = 0;
@ -154,6 +160,8 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
this.filteredOptions = this.searchControl.valueChanges.pipe(mergeMap(x => {
return this.searchBarService.search(x);
}));
this.newReleaseNotificationVisible = this.isNewReleaseNotificationVisible();
}
public get indexFromCurrentType() {
@ -400,4 +408,26 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
// viewAllPublicDatasetsClicked() {
// 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 => {
this.dmpModel = result
this.dmpModel.profiles.forEach((element) => {
if (element.id == this.data.datasetProfileId) {
if (element.descriptionTemplateId == this.data.datasetProfileId) {
this.data.datasetProfileExist = true;
}
})

View File

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

View File

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

View File

@ -1,67 +1,67 @@
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
import {AbstractControl, FormArray, FormControl, FormGroup} from '@angular/forms';
import {MatDialog} from '@angular/material/dialog';
import {MatSnackBar} from '@angular/material/snack-bar';
import {ActivatedRoute, Router} from '@angular/router';
import {DatasetStatus} from '@app/core/common/enum/dataset-status';
import {DmpStatus} from '@app/core/common/enum/dmp-status';
import {DataTableRequest} from '@app/core/model/data-table/data-table-request';
import {DatasetProfileModel} from '@app/core/model/dataset/dataset-profile';
import {DmpModel} from '@app/core/model/dmp/dmp';
import {DmpListingModel} from '@app/core/model/dmp/dmp-listing';
import {DatasetProfileCriteria} from '@app/core/query/dataset-profile/dataset-profile-criteria';
import {DmpCriteria} from '@app/core/query/dmp/dmp-criteria';
import {RequestItem} from '@app/core/query/request-item';
import {DatasetWizardService} from '@app/core/services/dataset-wizard/dataset-wizard.service';
import {DmpService} from '@app/core/services/dmp/dmp.service';
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { DatasetStatus } from '@app/core/common/enum/dataset-status';
import { DmpStatus } from '@app/core/common/enum/dmp-status';
import { DataTableRequest } from '@app/core/model/data-table/data-table-request';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile';
import { DmpModel } from '@app/core/model/dmp/dmp';
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing';
import { DatasetProfileCriteria } from '@app/core/query/dataset-profile/dataset-profile-criteria';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
import { RequestItem } from '@app/core/query/request-item';
import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import {
ExternalSourcesConfigurationService
} 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 {
SnackBarNotificationLevel,
UiNotificationService
} 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 {
DatasetCopyDialogueComponent
} 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 {BreadcrumbItem} from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import {IBreadCrumbComponent} from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
import {DatasetDescriptionFormEditorModel} from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { DatasetWizardEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model';
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
import { DatasetDescriptionFormEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import {
Link,
LinkToScroll,
TableOfContents
} 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 {
FormValidationErrorsDialogComponent
} from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component';
import {ValidationErrorModel} from '@common/forms/validation/error-model/validation-error-model';
import {ConfirmationDialogComponent} from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import {TranslateService} from '@ngx-translate/core';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver';
import {interval, Observable, of as observableOf} from 'rxjs';
import {catchError, debounceTime, filter, map, takeUntil} from 'rxjs/operators';
import {LockService} from '@app/core/services/lock/lock.service';
import {Location} from '@angular/common';
import {LockModel} from '@app/core/model/lock/lock.model';
import {Guid} from '@common/types/guid';
import {isNullOrUndefined} from '@app/utilities/enhancers/utils';
import {AuthService} from '@app/core/services/auth/auth.service';
import {ConfigurationService} from '@app/core/services/configuration/configuration.service';
import {SaveType} from '@app/core/common/enum/save-type';
import {DatasetWizardModel} from '@app/core/model/dataset/dataset-wizard';
import {MatomoService} from '@app/core/services/matomo/matomo-service';
import {HttpClient} from '@angular/common/http';
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 {CheckDeactivateBaseComponent} from '@app/library/deactivate/deactivate.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 {dispatchFakeEvent} from "@angular/cdk/testing/testbed/fake-events";
import { interval, Observable, of as observableOf } from 'rxjs';
import { catchError, debounceTime, filter, map, takeUntil } from 'rxjs/operators';
import { LockService } from '@app/core/services/lock/lock.service';
import { Location } from '@angular/common';
import { LockModel } from '@app/core/model/lock/lock.model';
import { Guid } from '@common/types/guid';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
import { AuthService } from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { SaveType } from '@app/core/common/enum/save-type';
import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http';
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 { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.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 { dispatchFakeEvent } from "@angular/cdk/testing/testbed/fake-events";
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';
@ -202,63 +202,63 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.getSingle(this.itemId)
.pipe(takeUntil(this._destroyed))
.subscribe(data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex;
this.needsUpdate();
this.breadCrumbs = observableOf([
{
parentComponentName: null,
label: this.datasetWizardModel.label,
url: '/datasets/edit/' + this.datasetWizardModel.id,
notFoundResolver: [
{
parentComponentName: null,
label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS').toUpperCase(),
url: '/datasets'
},
]
}]);
this.formGroup = this.datasetWizardModel.buildForm();
let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.datasetWizardModel.dmpSectionIndex));
for(var profile of profiles){
this.availableDescriptionTemplates.push({id: profile.descriptionTemplateId, label: profile.label, description: ""})
}
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
if (this.datasetWizardModel.status === DatasetStatus.Finalized || lockStatus) {
this.formGroup.disable();
this.viewOnly = true;
}
if (!lockStatus && !isNullOrUndefined(this.authService.current())) {
this.lock = new LockModel(data.id, this.authService.current());
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex;
this.needsUpdate();
this.breadCrumbs = observableOf([
{
parentComponentName: null,
label: this.datasetWizardModel.label,
url: '/datasets/edit/' + this.datasetWizardModel.id,
notFoundResolver: [
{
parentComponentName: null,
label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS').toUpperCase(),
url: '/datasets'
},
]
}]);
this.formGroup = this.datasetWizardModel.buildForm();
let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.datasetWizardModel.dmpSectionIndex));
for (var profile of profiles) {
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplates, { id: profile.descriptionTemplateId, label: profile.label, description: "" });
}
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
if (this.datasetWizardModel.status === DatasetStatus.Finalized || lockStatus) {
this.formGroup.disable();
this.viewOnly = true;
}
if (!lockStatus && !isNullOrUndefined(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.lock.id = Guid.parse(result);
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.
this.loadDatasetProfiles();
this.registerFormListeners();
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());
});
}
// if (this.viewOnly) { this.formGroup.disable(); } // For future use, to make Dataset edit like DMP.
this.loadDatasetProfiles();
this.registerFormListeners();
if (lockStatus) {
this.dialog.open(PopupNotificationDialogComponent, {
data: {
title: this.language.instant('DATASET-WIZARD.LOCKED.TITLE'),
message: this.language.instant('DATASET-WIZARD.LOCKED.MESSAGE')
}, maxWidth: '30em'
});
}
if(this.finalize && !this.lockStatus && !this.viewOnly) {
setTimeout(() => {
this.saveFinalize();
}, 0);
}
// this.availableProfiles = this.datasetWizardModel.dmp.profiles;
});
},
if (lockStatus) {
this.dialog.open(PopupNotificationDialogComponent, {
data: {
title: this.language.instant('DATASET-WIZARD.LOCKED.TITLE'),
message: this.language.instant('DATASET-WIZARD.LOCKED.MESSAGE')
}, maxWidth: '30em'
});
}
if (this.finalize && !this.lockStatus && !this.viewOnly) {
setTimeout(() => {
this.saveFinalize();
}, 0);
}
// this.availableProfiles = this.datasetWizardModel.dmp.profiles;
});
},
error => {
switch (error.status) {
case 403:
@ -284,53 +284,52 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardModel.dmpSectionIndex = this.dmpSectionIndex;
this.formGroup = this.datasetWizardModel.buildForm();
let profiles = this.datasetWizardModel.dmp.profiles.filter(profile => profile.data.dmpSectionIndex.includes(this.dmpSectionIndex));
for(var profile of profiles){
this.availableDescriptionTemplates.push({id: profile.descriptionTemplateId, label: profile.label, description: ""})
for (var profile of profiles) {
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplates, { id: profile.descriptionTemplateId, label: profile.label, description: "" });
}
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
this.formGroup.get('dmp').disable();
this.dmpProfileService.getSingleBlueprint(data.profile.id)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
const request: DataTableRequest<DatasetProfileCriteria> = new DataTableRequest<DatasetProfileCriteria>(null, null, null);
request.criteria = new DatasetProfileCriteria();
request.criteria.ids = [];
result.definition.sections[this.dmpSectionIndex].descriptionTemplates.forEach(template => request.criteria.ids.push(template.descriptionTemplateId));
this.availableDescriptionTemplates.forEach(template => request.criteria.ids.push(template.id));
this.datasetService.getDatasetProfilesWithPrefilling(request)
.pipe(takeUntil(this._destroyed))
.subscribe(items => {
items.forEach(template => {
if(template.enablePrefilling){
this.availableDescriptionTemplatesForPrefilling.push({id: template.id, label: template.label, description: ''});
}
})
if (this.availableDescriptionTemplatesForPrefilling.length > 0) {
const dialogRef = this.dialog.open(PrefillDatasetComponent, {
width: '590px',
minHeight: '200px',
restoreFocus: false,
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();
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
const request: DataTableRequest<DatasetProfileCriteria> = new DataTableRequest<DatasetProfileCriteria>(null, null, null);
request.criteria = new DatasetProfileCriteria();
request.criteria.ids = [];
this.availableDescriptionTemplates.forEach(template => request.criteria.ids.push(template.id));
this.datasetService.getDatasetProfilesWithPrefilling(request)
.pipe(takeUntil(this._destroyed))
.subscribe(items => {
items.forEach(template => {
if (template.enablePrefilling) {
this.addToAvailableDescriptionTemplates(this.availableDescriptionTemplatesForPrefilling, { id: template.id, label: template.label, description: '' });
}
})
}
});
if (this.availableDescriptionTemplatesForPrefilling.length > 0) {
const dialogRef = this.dialog.open(PrefillDatasetComponent, {
width: '590px',
minHeight: '200px',
restoreFocus: false,
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.registerFormListeners();
@ -364,7 +363,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
this.dmpSectionIndex = this.datasetWizardModel.dmpSectionIndex;
this.datasetWizardModel.status = 0;
this.formGroup = this.datasetWizardModel.buildForm();
this.formGroup.get('id').setValue(null);
@ -375,6 +373,10 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardModel.dmp = data;
this.formGroup.get('dmp').setValue(this.datasetWizardModel.dmp);
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.breadCrumbs = observableOf([
@ -419,11 +421,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.isNew = false;
this.datasetWizardService.getSinglePublic(this.publicId)
.pipe(takeUntil(this._destroyed)).pipe(
catchError((error: any) => {
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
this.router.navigate(['/datasets/publicEdit/' + this.publicId]);
return observableOf(null);
}))
catchError((error: any) => {
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
this.router.navigate(['/datasets/publicEdit/' + this.publicId]);
return observableOf(null);
}))
.subscribe(data => {
if (data) {
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
@ -506,6 +508,13 @@ 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();
registerFormListeners() {
// const dmpSubscription =
@ -593,7 +602,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
searchDmp(query: string): Observable<DmpListingModel[]> {
const fields: Array<string> = new Array<string>();
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.like = query;
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
@ -724,12 +733,12 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.hasChanges = false;
this.datasetIsOnceSaved = true;
this.onCallbackSuccess(data, saveType);
if(onSuccess) {
if (onSuccess) {
onSuccess();
}
},
error => {
if(onError) {
if (onError) {
onError();
}
this.onCallbackError(error)
@ -747,9 +756,9 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
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'));
} 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') {
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 {
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);
}
@ -904,27 +913,27 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
filter(x => x),
takeUntil(this._destroyed)
).subscribe(result => {
if (result) {
// if (!this.isFormValid()) { return; }
this.formGroup.get('status').setValue(DatasetStatus.Draft);
this.submit(SaveType.finalize, () => {
this.viewOnly = false;
this.datasetWizardModel.status = DatasetStatus.Draft;
setTimeout(x => {
this.formGroup = null;
if (result) {
// if (!this.isFormValid()) { return; }
this.formGroup.get('status').setValue(DatasetStatus.Draft);
this.submit(SaveType.finalize, () => {
this.viewOnly = false;
this.datasetWizardModel.status = DatasetStatus.Draft;
setTimeout(x => {
this.formGroup = null;
});
setTimeout(x => {
this.formGroup = this.datasetWizardModel.buildForm();
this.registerFormListeners();
});
}, () => {
this.formGroup.get('status').setValue(DatasetStatus.Finalized);
this.viewOnly = true;
});
setTimeout(x => {
this.formGroup = this.datasetWizardModel.buildForm();
this.registerFormListeners();
});
}, () => {
this.formGroup.get('status').setValue(DatasetStatus.Finalized);
this.viewOnly = true;
});
} else {
this.saving = false;
}
});
} else {
this.saving = false;
}
});
}
@ -1009,7 +1018,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
document.getElementById('stepper-options').scrollTop = this.tocScrollTop;
}, 500);
this.saving = false;
if(this.isNew) {
if (this.isNew) {
this.reloadDateset(this.datasetWizardModel.id);
}
// this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); });
@ -1040,7 +1049,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadPDF(id)
.pipe(takeUntil(this._destroyed))
.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'));
FileSaver.saveAs(blob, filename);
@ -1052,7 +1061,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadDOCX(id)
.pipe(takeUntil(this._destroyed))
.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'));
FileSaver.saveAs(blob, filename);
@ -1065,7 +1074,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.datasetWizardService.downloadXML(id)
.pipe(takeUntil(this._destroyed))
.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'));
FileSaver.saveAs(blob, filename);
@ -1186,7 +1195,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
.subscribe(result => {
if (result && result.datasetProfileExist) {
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 } });
}
});
}
@ -1238,9 +1247,9 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
getEntryVisibleFieldSets(entry: ToCEntry): ToCEntry[] {
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);
} else if(entry.type !== ToCEntryType.FieldSet) {
} else if (entry.type !== ToCEntryType.FieldSet) {
entry.subEntries.forEach(subEntry => {
fieldSets = fieldSets.concat(this.getEntryVisibleFieldSets(subEntry));
});
@ -1248,13 +1257,13 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
return fieldSets;
}
get visibleFieldSets(): ToCEntry[]{
get visibleFieldSets(): ToCEntry[] {
let fieldSets = [];
let arrays= this.table0fContents?this.table0fContents.tocentries.
filter(entry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)).map(entry => {
return this.getEntryVisibleFieldSets(entry);
let arrays = this.table0fContents ? this.table0fContents.tocentries.
filter(entry => !this.table0fContents.internalTable.hiddenEntries.find(hiddenEntry => hiddenEntry === entry.id)).map(entry => {
return this.getEntryVisibleFieldSets(entry);
})
:[];
: [];
arrays.forEach(array => {
fieldSets = fieldSets.concat(array);
});
@ -1262,11 +1271,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
}
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;
} else {
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]);
} else {
return null;
@ -1275,11 +1284,11 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
}
public changeStep(selected: ToCEntry = null, execute: boolean = true) {
if(execute) {
if(selected) {
if (execute) {
if (selected) {
let fieldSet = this.getFirstFieldSet(selected);
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 {
this.step = 0;
this.resetScroll();
@ -1303,7 +1312,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
public previousStep() {
if (this.step > 0) {
this.step = Math.ceil(this.step - 1);
if(this.step >= 1) {
if (this.step >= 1) {
let entry = this.visibleFieldSets[this.step - 1];
this.table0fContents.onToCentrySelected(entry, false);
this.scroll(entry);

View File

@ -27,7 +27,7 @@
<mat-form-field class="col-md-12">
<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">
<div (click)="checkMinMax($event, profile)">
<div>
{{profile.label}}
</div>
</mat-option>

View File

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

View File

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

View File

@ -357,13 +357,13 @@ a:hover {
}
.input-form {
text-align: left;
font-weight: 400;
font-size: 16px;
letter-spacing: 0.15px;
color: #7d7d7d;
opacity: 1;
margin-bottom: 1rem;
// text-align: left;
// font-weight: 400;
// font-size: 16px;
// letter-spacing: 0.15px;
// color: #7d7d7d;
// opacity: 1;
// margin-bottom: 1rem;
}
.insert-manually {
@ -425,5 +425,13 @@ a:hover {
::ng-deep .input-form .mat-form-field-appearance-outline .mat-form-field-infix {
font-size: 1rem;
padding: 0.6em 0 1em 0 !important;
}
// 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,6 +57,7 @@ import { GrantEditorModel } from '@app/ui/grant/editor/grant-editor.model';
import { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.component';
import { DmpProfileStatus } from '@app/core/common/enum/dmp-profile-status';
import { DatasetService } from '@app/core/services/dataset/dataset.service';
import { runInThisContext } from 'vm';
interface Visible {
value: boolean;
@ -64,9 +65,9 @@ interface Visible {
}
@Component({
selector: 'app-dmp-editor-blueprint',
templateUrl: './dmp-editor-blueprint.component.html',
styleUrls: ['./dmp-editor-blueprint.component.scss']
selector: 'app-dmp-editor-blueprint',
templateUrl: './dmp-editor-blueprint.component.html',
styleUrls: ['./dmp-editor-blueprint.component.scss']
})
export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent implements OnInit {
@ -84,7 +85,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
hasChanges = false;
isDiscarded = false;
isCreateNew = false;
isCreateNew = false;
isCreateNewProject = false;
isCreateNewFunder = false;
@ -148,11 +149,11 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
private dialog: MatDialog,
private lockService: LockService,
private matomoService: MatomoService
) {
) {
super();
}
ngOnInit(): void {
ngOnInit(): void {
this.matomoService.trackPageView('DMP Editor');
this.route.params
.pipe(takeUntil(this._destroyed))
@ -161,81 +162,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
if (itemId != null) {
this.isNew = false;
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'});
}
});
});
this.getItem(itemId);
}
else {
this.dmp = new DmpEditorModel();
@ -288,25 +215,107 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.formGroup.get('extraProperties').get('language').patchValue('en');
}
try{
try {
const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
profiles.sort((a,b)=>a.label.localeCompare(b.label));
}catch{
profiles.sort((a, b) => a.label.localeCompare(b.label));
} catch {
console.info('Could not sort 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'
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 {
return this.formGroup.get('extraFields') as FormArray;
@ -315,15 +324,15 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
setIsUserOwner() {
if (this.dmp) {
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{
try{
isUserMember(): boolean {
try {
const principal: Principal = this.authService.current();
return !!this.dmp.users.find(x => (x.role === Role.Member) && (x.id === principal.id) );
}catch{
return !!this.dmp.users.find(x => (x.role === Role.Member) && (x.id === principal.id));
} catch {
return false;
}
}
@ -416,7 +425,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.saving = true;
this.formService.touchAllFormFields(this.formGroup);
if(!this._isDMPDescriptionValid()){
if (!this._isDMPDescriptionValid()) {
const errmess = this._buildDMPDescriptionErrorMessages();
this.showValidationErrorsDialog(undefined, errmess);
this.hintErrors = true;
@ -434,13 +443,15 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
selectDefaultBlueprint() {
this.dmpProfileService.getSingleBlueprint(this.defaultBlueprintId)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.nextStep();
});
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
if (this.formGroup.get('label').valid && this.formGroup.get('description').valid) {
this.nextStep();
}
});
}
selectBlueprint() {
@ -475,13 +486,13 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
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) {
this.saving = true;
if(!this._isDMPDescriptionValid()){
if (!this._isDMPDescriptionValid()) {
const errmess = this._buildDMPDescriptionErrorMessages();
this.showValidationErrorsDialog(undefined, errmess);
this.hintErrors = true;
@ -511,7 +522,9 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
onSubmit(addNew?: boolean, showAddDatasetDialog?: boolean): void {
this.scrollTop = document.getElementById('editor-form').scrollTop;
// return;
this.dmpService.createDmp(this.formGroup.getRawValue())
const rawvalue = this.formGroup.getRawValue();
if (rawvalue.profile instanceof Object) rawvalue.profile = rawvalue.profile.id;
this.dmpService.createDmp(rawvalue)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => {
@ -575,27 +588,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
// 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);
if (dmp) {
if(this.isNew){
if (this.isNew) {
this.router.navigate(['/plans', 'edit', 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();
});});
this.getItem(dmp.id);
setTimeout(() => { document.getElementById('editor-form').scrollTop = this.scrollTop; });
this.saving = false;
this.isNew = false;
@ -630,10 +626,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
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, {
width: '500px',
autoFocus: false,
@ -648,7 +644,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
}
});
}else{
} else {
if (isNew) {
this.router.navigate(['/datasets', 'new', id, this.dmpSectionIndex]);
} else {
@ -699,38 +695,38 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
//checks if the dpm is valid not taking into account the datasets validity
private _isDMPDescriptionValid():boolean{
private _isDMPDescriptionValid(): boolean {
const form: FormGroup = this.formGroup;
if(form.controls){
if (form.controls) {
return Object.keys(form.controls)
.map(controlName=>{//get validity of each control
if(controlName === 'datasets'){//we dont care if datasets are valid
return true;
}
return !form.get(controlName).invalid;//!! in case the control is disabled, we consider it valid
})
.reduce((isFormValid,isControlValid)=>{//aggregate validities
return isControlValid && isFormValid;
}, true);
.map(controlName => {//get validity of each control
if (controlName === 'datasets') {//we dont care if datasets are valid
return true;
}
return !form.get(controlName).invalid;//!! in case the control is disabled, we consider it valid
})
.reduce((isFormValid, isControlValid) => {//aggregate validities
return isControlValid && isFormValid;
}, true);
}
return true;
}
private showValidationErrorsDialog(projectOnly?: boolean, errmess?: string[]) {
if(errmess){
if (errmess) {
const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, {
disableClose: true,
autoFocus: false,
restoreFocus: false,
data: {
errorMessages:errmess,
errorMessages: errmess,
projectOnly: projectOnly
},
});
}else{
} else {
const dialogRef = this.dialog.open(FormValidationErrorsDialogComponent, {
disableClose: true,
autoFocus: false,
@ -744,10 +740,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
private _buildDMPDescriptionErrorMessages(): string[]{//not including datasets
private _buildDMPDescriptionErrorMessages(): string[] {//not including datasets
const errmess: string[] = [];
Object.keys(this.formGroup.controls).forEach(controlName=>{
if(controlName != 'datasets' && this.formGroup.get(controlName).invalid){
Object.keys(this.formGroup.controls).forEach(controlName => {
if (controlName != 'datasets' && this.formGroup.get(controlName).invalid) {
errmess.push(...this._buildErrorMessagesForAbstractControl(this.formGroup.get(controlName), controlName));
}
})
@ -756,16 +752,16 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
// takes as an input an abstract control and gets its error messages[]
private _buildErrorMessagesForAbstractControl(aControl: AbstractControl, controlName: string):string[]{
const errmess:string[] = [];
private _buildErrorMessagesForAbstractControl(aControl: AbstractControl, controlName: string): string[] {
const errmess: string[] = [];
if(aControl.invalid){
if (aControl.invalid) {
if(aControl.errors){
if (aControl.errors) {
//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);
if(placeholder){
if (placeholder) {
controlName = placeholder;
}
}
@ -776,19 +772,19 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
/*in case the aControl is FormControl then the it should have provided its error messages above.
No need to check case of FormControl below*/
if(aControl instanceof FormGroup){
if (aControl instanceof FormGroup) {
const fg = aControl as FormGroup;
//check children
Object.keys(fg.controls).forEach(controlName=>{
Object.keys(fg.controls).forEach(controlName => {
errmess.push(...this._buildErrorMessagesForAbstractControl(fg.get(controlName), controlName));
});
}else if(aControl instanceof FormArray){
} else if (aControl instanceof FormArray) {
const fa = aControl as FormArray;
fa.controls.forEach((control,index)=>{
errmess.push(... this._buildErrorMessagesForAbstractControl(control, `${controlName} --> ${index+1}`));
fa.controls.forEach((control, index) => {
errmess.push(... this._buildErrorMessagesForAbstractControl(control, `${controlName} --> ${index + 1}`));
});
}
@ -832,23 +828,23 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return this.dmpService.searchDMPProfiles(request);
}
registerFormEventsForDmpBlueprint(): void {
registerFormEventsForDmpBlueprint(): void {
this.formGroup.get('profile').valueChanges
.pipe(
takeUntil(this._destroyed))
.subscribe(Option => {
if (Option instanceof Object) {
this.selectedDmpBlueprintDefinition = Option.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.addProfiles();
}
else {
this.selectedDmpBlueprintDefinition = null;
}
})
.pipe(
takeUntil(this._destroyed))
.subscribe(Option => {
if (Option instanceof Object) {
this.selectedDmpBlueprintDefinition = Option.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.addProfiles();
}
else {
this.selectedDmpBlueprintDefinition = null;
}
})
}
private buildExtraFields(): void {
@ -859,7 +855,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
extraField.id = field.id;
if (!isNullOrUndefined(this.dmp.extraFields)) {
let found = this.dmp.extraFields.find(f => f.id === field.id);
if(found !== undefined) {
if (found !== undefined) {
extraField.value = found.value;
}
}
@ -870,13 +866,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
getExtraFieldIndex(id: string): string {
let foundFieldIndex: number;
(this.formGroup.get('extraFields') as FormArray).controls.forEach((element, index) => {
if(element.value.id === id) {
foundFieldIndex = index;
}
});
return foundFieldIndex.toString();
return (this.formGroup.get('extraFields') as FormArray).controls.findIndex((element) => element.value.id == id).toString();
}
private checkForGrant() {
@ -922,27 +912,27 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
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>());
}
const templates: Array<DmpDatasetProfile> = new Array<DmpDatasetProfile>();
this.selectedDmpBlueprintDefinition.sections.forEach(section => {
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: ""}));
if (profiles != null) {
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 {
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);
if (found === undefined) {
let data: DmpDatasetProfileSectionsFormModel= new DmpDatasetProfileSectionsFormModel();
let data: DmpDatasetProfileSectionsFormModel = new DmpDatasetProfileSectionsFormModel();
data.dmpSectionIndex.push(section.ordinal - 1);
let id = null;
if (profiles !== undefined) {
let existedProfile = profiles.find(profile => profile.descriptionTemplateId == template.descriptionTemplateId);
if (existedProfile !== undefined) {
id = existedProfile.id;
}
}
}
let profile: DmpDatasetProfile = {
id: id,
@ -959,10 +949,10 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
});
(profiles !== undefined) ? this.formGroup.get('profiles').setValue(profiles) : this.formGroup.get('profiles').setValue(templates);
}
dmpBlueprintAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
dmpBlueprintAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
filterFn: this.dmpBlueprintSearch.bind(this),
initialItems: (extraData) => this.dmpBlueprintSearch(''),
displayFn: (item) => item['label'],
@ -978,7 +968,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return this.dmpProfileService.getPagedBlueprint(request).pipe(map(x => x.data));
}
getLanguageInfos(): LanguageInfo[] {
getLanguageInfos(): LanguageInfo[] {
return this.languageInfoService.getLanguageInfoValues();
}
@ -994,7 +984,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return associates;
}
organisationsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
organisationsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
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))),
displayFn: (item) => item['name'],
@ -1009,7 +999,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'))
};
// Researchers
// Researchers
filterResearchers(value: string): Observable<ExternalSourceItemModel[]> {
return this.externalSourcesService.searchDMPResearchers({ criteria: { name: value, like: null } });
}
@ -1077,7 +1067,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
});
}
showToggleButton() {
showToggleButton() {
return (!this.isFinalized && this.isUserOwner) || this.isClone;
}
@ -1100,49 +1090,40 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
return false;
}
onRemoveTemplate(event, sectionIndex: number) {
canRemoveItem(item): boolean {
let found = false;
let profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
this.formGroup.get('datasets')['controls'].forEach(element => {
if ((element.get('profile').value.id === event.id) && (element.get('dmpSectionIndex').value === sectionIndex)) {
if ((element.get('profile').value.id === item.id) && (element.get('dmpSectionIndex').value === (this.step - 1))) {
found = true;
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-REMOVE-TEMPLATE'), SnackBarNotificationLevel.Success);
}
});
if (found) {
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'
};
if (found) return false
else return true;
}
}
else{
this.sectionTemplates[sectionIndex] = this.sectionTemplates[sectionIndex].filter(sectionProfile => sectionProfile.id !== event.id);
profiles = profiles.filter(sectionProfile => sectionProfile.descriptionTemplateId !== event.id);
this.formGroup.get('profiles').setValue(profiles);
}
onRemoveTemplate(event, sectionIndex: number) {
let profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
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));
this.formGroup.get('profiles').setValue(profiles);
}
addProfile(event, sectionIndex: number) {
const profiles = this.formGroup.get('profiles').value as DmpDatasetProfile[];
let found = profiles.find((value) => value.id === event.id);
if(found !== undefined) {
if(found.data.dmpSectionIndex.indexOf(sectionIndex) === -1){
if (found !== undefined) {
if (found.data.dmpSectionIndex.indexOf(sectionIndex) === -1) {
found.data.dmpSectionIndex.push(sectionIndex);
}
else{
else {
this.sectionTemplates[sectionIndex].pop();
}
}
else{
else {
let dmpDatasetProfileSection: DmpDatasetProfileSectionsFormModel = new DmpDatasetProfileSectionsFormModel();
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);
}
@ -1160,19 +1141,14 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) {
this.addProfile(event, sectionIndex);
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'
};
const items = this.sectionTemplates[sectionIndex];
items.push({ id: event.id, label: event.label, description: "" });
this.sectionTemplates[sectionIndex] = [...items];
}
});
}
onOptionSelected(event, sectionIndex: number){
try{
onOptionSelected(event, sectionIndex: number) {
try {
this.addProfile(event, sectionIndex);
// 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));
@ -1185,7 +1161,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
// });
// duplicateProfiles.forEach((value) => profiles.splice(profiles.lastIndexOf(value), 1));
// profiles.sort((a,b)=> a.label.localeCompare(b.label));
}catch{
} catch {
console.info('Could not sort Dataset Templates')
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -48,6 +48,10 @@
{
"label": "GENERAL.LANGUAGES.POLISH",
"value": "pl"
},
{
"label": "GENERAL.LANGUAGES.BASQUE",
"value": "baq"
}
],
"loginProviders": {
@ -101,5 +105,10 @@
"allowOrganizationCreator": true,
"useSplash": false,
"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

@ -0,0 +1,43 @@
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,7 +191,8 @@
"SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -870,10 +871,10 @@
"DESCRIPTION": "Description",
"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.",
"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 datasets described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Datasets",
"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.",
"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-REST": " for a look at entities described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Descriptions",
"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.",
"COLUMNS": {
"NAME": "Name",
"REFERNCE": "Referenz",
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Bestehenden DMP auswählen"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

View File

@ -27,7 +27,7 @@
"UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout",
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Datasets are associated with it",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Descriptions are associated with it",
"SUCCESSFUL-DMP-BLUEPRINT-DELETE": "Successful Delete",
"UNSUCCESSFUL-DMP-BLUEPRINT-DELETE": "This blueprint can not deleted, because DMPs are associated with it",
"SUCCESSFUL-DESCRIPTION-TEMPLATE-TYPE-DELETE": "Successful Delete",
@ -105,7 +105,7 @@
},
"DMP-TO-DATASET-DIALOG": {
"FROM-DMP": "You have successfully created your",
"DMP": "DMP",
"DMP": "Plan",
"TO-DATASET": "You will be transferred to the",
"DATASET": "Dataset",
"EDITOR": "editor",
@ -129,11 +129,11 @@
"GENERAL": "Data Management Plans Creator",
"ABOUT": "About",
"PRIVACY": "Privacy Policy",
"OPENSOURCE-LICENCES": "Opensource Licences",
"OPENSOURCE-LICENCES": "Opensource Licenses",
"TERMS": "Terms Of Service",
"COOKIES-POLICY": "Cookies Policy",
"PLANS": "My DMPs",
"EXPLORE-PLANS": "Published DMPs",
"PLANS": "My Plans",
"EXPLORE-PLANS": "Published Plans",
"QUICK-WIZARD": "New DMP (Wizard)",
"PLANS-NEW": "New DMP (Expert)",
"DMP-NEW": "New DMP",
@ -142,7 +142,7 @@
"DATASETCREATEWIZARD": "Add Dataset (Wizard)",
"GRANTS": "My Grants",
"DMP-BLUEPRINTS": "DMP Blueprints",
"DATASET-PROFILES": "Dataset Templates",
"DATASET-PROFILES": "Description Templates",
"DESCRIPTION-TYPES": "Description Types",
"USERS": "Users",
"PROFILE": "My Profile",
@ -159,8 +159,8 @@
"DMP-BLUEPRINT-NEW": "New DMP Blueprint",
"DMP-BLUEPRINT-CLONE": "New Clone of DMP Blueprint",
"DMP-BLUEPRINT-EDIT": "Edit DMP Blueprint",
"DATASET-PROFILES-NEW": "New Dataset Template",
"DATASET-PROFILES-EDIT": "Edit Dataset Template",
"DATASET-PROFILES-NEW": "New Description Template",
"DATASET-PROFILES-EDIT": "Edit Description Template",
"DESCRIPTION-TYPE-NEW": "New Description Type",
"DESCRIPTION-TYPE-EDIT": "Edit Description Type",
"EXPLORE-PLANS-OVERVIEW": "Published DMP Overview",
@ -168,8 +168,8 @@
"DMP-PUBLIC-EDIT": "View Published DMP",
"DATASET-COPY": "Copy Dataset",
"DATASET-UPDATE": "Update Dataset",
"DATASET-PROFILES-NEW-VERSION": "New Version of Dataset Template",
"DATASET-PROFILES-CLONE": "New Clone of Dataset Template",
"DATASET-PROFILES-NEW-VERSION": "New Version of Description Template",
"DATASET-PROFILES-CLONE": "New Clone of Description Template",
"LANGUAGE-EDITOR": "Language Editor",
"GUIDE-EDITOR": "User Guide Editor",
"LANGUAGE": "Language",
@ -191,7 +191,8 @@
"SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -223,14 +224,14 @@
"TITLE": "{{ APP_NAME_CAPS }}",
"GRANTS": "Grants",
"GRANT": "Grant",
"DMP": "DMP",
"DMPS": "DMPs",
"MY-DMPS": "MY DMPs",
"DMP": "Plan",
"DMPS": "Plans",
"MY-DMPS": "MY Plans",
"DATASETS": "Datasets",
"DESCRIPTION": "Description",
"PUBLIC-DATASETS": "Explore {{ APP_NAME_CAPS }}",
"USERS": "Users",
"DATASETS-ADMIN": "Dataset Templates",
"DATASETS-ADMIN": "Description Templates",
"DMP-BLUEPRINTS": "DMP Blueprints",
"ABOUT": "About",
"MY-DATASET-DESCRIPTIONS": "MY DATASETS",
@ -243,13 +244,13 @@
"TEMPLATE": "TEMPLATE",
"DMP-BLUEPRINTS-CAPS": "DMP BLUEPRINTS",
"USERS-BREADCRUMB": "USERS",
"START-NEW-DMP": "Start new DMP",
"START-NEW-DMP": "Start new Plan",
"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",
"IMPORT-FROM-FILE": "Import from file",
"SEARCH": {
"DATASET": "Dataset",
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"PUBLISHED": "Published"
}
@ -259,7 +260,7 @@
"ABOUT": "About",
"DASHBOARD": "Home",
"DMP": "DATA MANAGEMENT PLANS",
"MY-DMPS": "My DMPs",
"MY-DMPS": "My Plans",
"DATASETS": "DATASETS",
"GRANTS": "GRANTS",
"NEW DATASET": "New Dataset",
@ -273,7 +274,7 @@
"HISTORY-VISITED": "LAST VISITED",
"HISTORY-EDITED": "LAST EDITED",
"PUBLIC": "PUBLISHED",
"PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DMPS": "Public Plans",
"PUBLIC-DESC": "Public Descriptions",
"ACCOUNT": "ACCOUNT",
"ADMIN": "ADMIN",
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -327,9 +328,9 @@
},
"PAGE-INFO": {
"PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the desciption chapter.",
"PAGE-NAME-HINT": "Set a name for the description chapter.",
"PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"PAGE-DESCRIPTION-HINT": "Write a brief description of what the chapter is about.",
"ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Section",
@ -346,7 +347,7 @@
"SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION-DESCRIPTION-HINT": "Write a brief description of what the section is about.",
"SECTION": "Section"
},
"PAGES": {
@ -606,7 +607,7 @@
},
"ERRORS": {
"INVALID-VISIBILITY-RULES": {
"MESSAGE-START": "There were invalid visibilty rules detected in ",
"MESSAGE-START": "There were invalid visibility rules detected in ",
"MESSAGE-END": ". Would you like to fix them?",
"CONFIRM-YES": "Yes, remove invalid rules",
"CONFIRM-NO": "No, keep them.",
@ -622,7 +623,7 @@
}
},
"DMP-LISTING": {
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TITLE": "Data Management Plans",
"OWNER": "Owner",
@ -633,8 +634,8 @@
"PUBLISHED": "Published",
"VERSION": "Version",
"CONTAINED-DESCRIPTIONS": "Contained Descriptions",
"TEXT-INFO": "Information in a DMP show how datasets have been collected and/or generated, how they have been processed and analysed, i.e. using which tools, standards, methodologies etc, but also where and how datasets are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services.",
"TEXT-INFO-QUESTION": "Not sure how a DMP looks in practice? Browse Public DMPs and",
"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-QUESTION": "Not sure how a Plan looks in practice? Browse Public Plans and",
"LINK-ZENODO": "LIBER community in Zenodo",
"GET-IDEA": "to get an idea!",
"SORT-BY": "Sort by",
@ -690,7 +691,7 @@
},
"LEVEL-OF-ACCESS": "Level of Access",
"INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Dataset Templates Involved"
"TEMPLATES-INVOLVED": "Description Templates Involved"
},
"VIEW-ALL-VERSIONS": "All versions of",
"EMPTY-LIST": "Nothing here yet."
@ -704,14 +705,14 @@
"TOOLTIP": {
"PUBLISHED": "Public access - Closed DMP",
"INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Dataset Templates Involved"
"TEMPLATES-INVOLVED": "Description Templates Involved"
},
"EMPTY-LIST": "Nothing here yet."
},
"DMP-UPLOAD": {
"TITLE": "Import Data Management Plan",
"UPLOAD-BUTTON": "Upload",
"UPLOAD-SUCCESS": "Import was Successfull",
"UPLOAD-SUCCESS": "Import was Successful",
"ACTIONS": {
"IMPORT": "Import",
"CANCEL": "Cancel"
@ -732,7 +733,7 @@
"FIRST-STEP": {
"TITLE": "Dataset Information",
"DMP": "Data Management Plan",
"PROFILE": "Dataset Template",
"PROFILE": "Description Template",
"SUB-TITLE": "Created At: "
},
"SECOND-STEP": {
@ -772,7 +773,7 @@
"MESSAGES": {
"DATASET-NOT-FOUND": "Dataset does not exist",
"DATASET-NOT-ALLOWED": "You have no access to this Dataset",
"SUCCESS-UPDATE-DATASET-PROFILE": "Dataset Template updated successfully",
"SUCCESS-UPDATE-DATASET-PROFILE": "Description 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)",
"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.",
@ -781,8 +782,8 @@
},
"UPLOAD": {
"UPLOAD-XML": "Import",
"UPLOAD-XML-FILE-TITLE": "Import Dataset Template",
"UPLOAD-XML-NAME": "Name Of Dataset Template",
"UPLOAD-XML-FILE-TITLE": "Import Description Template",
"UPLOAD-XML-NAME": "Name Of Description Template",
"UPLOAD-XML-IMPORT": "File",
"UPLOAD-XML-FILE-CANCEL": "Cancel"
},
@ -800,7 +801,7 @@
"COPY": "Copy",
"CANCEL": "Cancel",
"NEXT": "Next",
"ERROR-MESSAGE": "Does not contain this Dataset Template"
"ERROR-MESSAGE": "Does not contain this Description Template"
},
"LOCKED":{
"TITLE":"Dataset is locked",
@ -822,7 +823,7 @@
"TOOLTIP": {
"LEVEL-OF-ACCESS": "Level of Access",
"INVOLVED-DATASETS": "Involved Datasets",
"TEMPLATES-INVOLVED": "Dataset Templates Involved"
"TEMPLATES-INVOLVED": "Description Templates Involved"
},
"ERROR": {
"DELETED-DMP": "The requested DMP is deleted",
@ -866,14 +867,14 @@
}
},
"DATASET-LISTING": {
"TITLE": "Datasets",
"TITLE": "Datensatzbeschreibungen",
"DESCRIPTION": "Description",
"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.",
"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 datasets described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Datasets",
"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.",
"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-REST": " for a look at entities described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Descriptions",
"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.",
"COLUMNS": {
"NAME": "Name",
"REFERNCE": "Reference",
@ -886,7 +887,7 @@
"FINALIZED": "Finalized",
"LAST-EDITED": "Last Edited",
"ACTIONS": "Actions",
"DMP": "DMP",
"DMP": "Plan",
"PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -913,9 +914,9 @@
"DRAFT": "Private access - Editable Dataset",
"FINALIZED": "Private access - Closed Dataset"
},
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TEMPLATES-INVOLVED": "Dataset Template",
"TEMPLATES-INVOLVED": "Description Template",
"VERSION": "DMP Version",
"PART-OF": "Part of",
"TO-DMP": "To DMP",
@ -927,9 +928,9 @@
"TITLE": "Published Datasets",
"TOOLTIP": {
"FINALIZED": "Private access - Closed Dataset",
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TEMPLATES-INVOLVED": "Dataset Template"
"TEMPLATES-INVOLVED": "Description Template"
},
"EMPTY-LIST": "Nothing here yet."
},
@ -949,7 +950,7 @@
"DESCRIPTION": "Description",
"CREATED": "Created",
"ACTIONS": "Actions",
"DMP": "DMP",
"DMP": "Plan",
"PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -991,7 +992,7 @@
},
"PLACEHOLDER": "Dataset Title",
"DATASET-PROFILE": {
"SELECT": "Select Dataset Template"
"SELECT": "Select Description Template"
},
"SNACK-BAR": {
"SUCCESSFUL-CREATION": "Imported Successfully",
@ -1070,8 +1071,8 @@
"TITLE": {
"NEW": "New Data Management Plan",
"EDIT": "Edit",
"EDIT-DMP": "Editing DMP",
"ADD-DATASET": "Adding dataset",
"EDIT-DMP": "Editing Plan",
"ADD-DATASET": "Adding description",
"EDIT-DESCRIPTION": "Editing Description",
"CLONE-DMP": "Clone",
"NEW-VERSION": "New Version",
@ -1087,11 +1088,11 @@
"ORGANISATIONS": "Organizations",
"ORGANISATIONS-HINT": "Add here the names of the organizations contributing to the creation and revision of the DMPs",
"RESEARCHERS": "Researchers",
"RESEARCHERS-HINT": "Add here the names of people that have produced, processed, analysed the data described in the DMP. ",
"RESEARCHERS-HINT": "Add here the names of people that have produced, processed, analyzed the data described in the DMP. ",
"AUTHORS": "Authors",
"TEMPLATES": "Templates",
"TEMPLATE": "DMP Template",
"DATASET-TEMPLATES": "Related Dataset Templates",
"DATASET-TEMPLATES": "Related Description Templates",
"SELECT-TEMPLATE": "Select a template to describe your descriptions",
"PROFILE": "DMP Template",
"PROJECT": "Project",
@ -1158,19 +1159,19 @@
"DATASET-SELECTION": "Dataset selection",
"DESCRIPTION-INFO": "Description info",
"LICENSE-INFO": "License",
"DATASET": "Dataset",
"DATASET": "Description",
"PREVIOUS": "Previous",
"NEXT": "Next"
},
"MAIN-INFO": {
"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.",
"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.",
"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.",
"UNIQUE-IDENTIFIER": "Unique Identifier",
"RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organisation identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organization identifier already exists.",
"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 organisation in the organisations list.",
"IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organization in the organizations list.",
"SAVE":"Save",
"CANCEL": "Cancel"
},
@ -1183,18 +1184,18 @@
"IDENTIFIER-PROJECT-EXISTS": "A project with the given identifier exists."
},
"DATASET-INFO": {
"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": "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.",
"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.",
"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.",
"FIND": "Couldn't find a suitable one?",
"HINT": "Select a template to describe your descriptions. You may select more than one template."
},
"LICENSE-INFO": {
"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",
"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",
"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."
},
"DATASET-DESCRIPTION": {
"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."
"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."
},
"CHANGES": "unsaved changes",
"CLONE-DIALOG": {
@ -1283,8 +1284,8 @@
"RELATED-DMP": "Related DMPs",
"SELECT-COLLABORATORS": "Select Collaborators",
"RELATED-COLLABORATORS": "Related Collaborators",
"SELECT-DATASET-TEMPLATES": "Select Dataset Templates",
"RELATED-DATASET-TEMPLATES": "Related Dataset Templates",
"SELECT-DATASET-TEMPLATES": "Select Description Templates",
"RELATED-DATASET-TEMPLATES": "Related Description Templates",
"ALL-VERSIONS": "From All Versions"
},
"DMP": {
@ -1293,8 +1294,8 @@
"SELECT-GRANTS": "Select Grants",
"SELECT-COLLABORATORS": "Select Collaborators",
"RELATED-COLLABORATORS": "Related Collaborators",
"SELECT-DATASET-TEMPLATES": "Select Dataset Templates",
"RELATED-DATASET-TEMPLATES": "Related Dataset Templates"
"SELECT-DATASET-TEMPLATES": "Select Description Templates",
"RELATED-DATASET-TEMPLATES": "Related Description Templates"
},
"BLUEPRINT": {
"LIKE": "Search",
@ -1321,7 +1322,7 @@
"DESCRIPTION": "Description",
"PROFILE": "Template",
"URI": "Uri",
"DMP": "DMP",
"DMP": "Plan",
"SELECT-DMP": "Select DMP",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -1361,10 +1362,10 @@
},
"VERSION-DIALOG": {
"ABOUT": "Versioning is automated.",
"QUESTION": "It seems your Dataset Template is outdated. Do you want to update it to the latest version?"
"QUESTION": "It seems your Description Template is outdated. Do you want to update it to the latest version?"
},
"ERRORS":{
"ERROR-OCCURED": "An error occured.",
"ERROR-OCCURED": "An error occurred.",
"MESSAGE": "Message: "
},
"QUESTION": {
@ -1385,17 +1386,17 @@
"SAVE": "Save"
},
"FIRST-STEP": {
"TITLE": "DMP",
"TITLE": "Plan",
"PLACEHOLDER": "Pick an existing DMP"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}
@ -1504,7 +1505,7 @@
"DATASET-IDENTIFIER": "Dataset Identifier",
"CURRENCY": "Currency",
"VALIDATION": "Validator",
"OTHER": "Other",
"OTHER": "Custom",
"SELECT": "Select"
},
"DATASET-PROFILE-UPLOAD-TYPE": {
@ -1521,7 +1522,7 @@
},
"DATASET-PROFILE-INTERNAL-DMP-ENTITIES-TYPE": {
"RESEARCHERS": "Researchers",
"DMPS": "DMPs",
"DMPS": "Plans",
"DATASETS": "Datasets",
"EXTERNAL-SOURCE-HINT": "List of values provided by external source(s)"
},
@ -1572,7 +1573,7 @@
},
"DMP-WIZARD": {
"FIRST-STEP": {
"DMP": "DMP Editor",
"DMP": "Plan Editor",
"DATASETS": "Datasets"
},
"ACTIONS": {
@ -1660,7 +1661,7 @@
"MAIN-CONTENT": ""
},
"OPENSOURCE-LICENCES": {
"TITLE": "Opensource licences",
"TITLE": "Opensource licenses",
"MAIN-CONTENT": ""
},
"TERMS-OF-SERVICE": {
@ -1692,9 +1693,9 @@
"DASHBOARD": {
"MY-GRANTS": "My Grants",
"GRANTS": "Grants",
"MY-DMPS": "My DMPs",
"MY-DMPS": "My Plans",
"TITLE": "What is {{ APP_NAME_CAPS }}?",
"DMP-QUESTION": "What is a DMP in {{ APP_NAME_CAPS }}?",
"DMP-QUESTION": "What is a Plan 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-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",
@ -1702,7 +1703,7 @@
"OPEN-AIR-GUIDE": "OpenAIREs Guide for Researchers",
"LEARN-MORE": "to learn more about how to create one!",
"ORGANIZATIONS": "Related Organizations",
"DMPS": "DMPs",
"DMPS": "Plans",
"MY-DATASETS": "My Datasets",
"DATASETS": "Datasets",
"SEARCH": "SEARCH...",
@ -1710,15 +1711,15 @@
"PERSONAL-USAGE": "Personal Usage",
"PUBLIC-USAGE": "Public Usage",
"DESCRIPTIONS": "Descriptions",
"DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Datasets",
"PUBLIC-DMPS": "Public DMPs",
"DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Descriptions",
"PUBLIC-DMPS": "Public Plans",
"PUBLIC-DATASETS": "Public Datasets",
"RELATED-ORGANISATIONS": "Related Organisations",
"RELATED-ORGANISATIONS": "Related Organizations",
"DRAFTS": "Drafts",
"ALL": "All",
"EMPTY-LIST": "Nothing here yet.",
"LATEST-ACTIVITY": "Latest Activity",
"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-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-END": ", that highlight the steps followed and the means used across data management activities.",
"SELECT-DMP": "Select a DMP for your Dataset",
"ACTIONS": {
@ -1727,7 +1728,7 @@
},
"TOUR-GUIDE": {
"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 DMP with Start new DMP.",
"START-NEW": "Create your Plan with Start new Plan.",
"IMPORT-DMP": "You can import a DMP",
"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.",
@ -1737,7 +1738,7 @@
},
"ADD-NEW-DATASET": {
"OPTIONS-NOT-ENOUGH": "Are those options not enough?",
"START-NEW-DMP": "Start new DMP"
"START-NEW-DMP": "Start new Plan"
}
},
"USER-DIALOG": {
@ -1868,7 +1869,7 @@
}
},
"DMP-FINALISE-DIALOG": {
"DMP": "DMP",
"DMP": "Plan",
"DATASETS": "Datasets",
"EMPTY": "No Datasets for this DMP so far",
"SUBMIT": "Submit",
@ -1931,15 +1932,15 @@
},
"SECOND-STEP": {
"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 Dataset 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 Description Template(s) which contain(s) a set of tailored questions in response to policy requirements of funders, institutions, research communities.",
"NEW-TITLE": "",
"DMP-NAME": "DMP For Grant : ",
"FIELDS": {
"NAME": "Title of the DMP",
"DESCRIPTION": "Summary",
"DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP",
"PROFILE": "Dataset Template",
"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.",
"PROFILE": "Description 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.",
"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."
}
},
@ -1982,5 +1983,13 @@
"DRAFT": "Draft",
"FINALIZED": "Finalized",
"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,7 +191,8 @@
"SERBIAN": "Serbio",
"PORTUGUESE": "Portugués",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Seleccione un PGD existente"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

View File

@ -35,7 +35,7 @@
"SUCCESSFUL-DELETE": "Επιτυχής διαγραφή",
"UNSUCCESSFUL-DELETE": "Αποτυχημένη διαγραφή",
"UNSUCCESSFUL-EMAIL-SEND": "Αποτυχία αποστολής email",
"UNSUCCESSFUL-REMOVE-TEMPLATE": "Αποτυχία αφαίρεσης του template, ένα ή παραπάνω σύνολα δεδομένων του συγκρεκριμένου Σχεδίου Διαχείρισης Δεδομένωνω χρησιμοποιούν αυτό το template"
"UNSUCCESSFUL-REMOVE-TEMPLATE": "Αποτυχία αφαίρεσης του template, ένα ή παραπάνω σύνολα δεδομένων του συγκεκριμένου Σχεδίου Διαχείρισης Δεδομένων χρησιμοποιούν αυτό το template"
},
"ERRORS": {
"HTTP-REQUEST-ERROR": "Παρουσιάστηκε μη αναμενόμενο σφάλμα"
@ -191,7 +191,8 @@
"SERBIAN": "Σερβικά",
"PORTUGUESE": "Πορτογαλικά",
"CROATIAN": "Κροατικά",
"POLISH": "Πολωνικά"
"POLISH": "Πολωνικά",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -327,9 +328,9 @@
},
"PAGE-INFO": {
"PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the desciption chapter.",
"PAGE-NAME-HINT": "Set a name for the description chapter.",
"PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"PAGE-DESCRIPTION-HINT": "Write a brief description of what the chapter is about.",
"ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Section",
@ -346,7 +347,7 @@
"SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION-DESCRIPTION-HINT": "Write a brief description of what the section is about.",
"SECTION": "Section"
},
"PAGES": {
@ -433,7 +434,7 @@
"FIELD-CHECKBOX-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-FREE-TEXT-TITLE": "Ελεύθερο Κείμενο Δεδομένων",
"FIELD-FREE-TEXT-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-COMBO-BOX-TYPE": "Τύπος Σύνθετου Πλασίου",
"FIELD-COMBO-BOX-TYPE": "Τύπος Σύνθετου Πλαισίου",
"FIELD-WORD-LIST-TITLE": "Λίστα Λέξεων Δεδομένων",
"FIELD-WORD-LIST-PLACEHOLDER": "Τοποθέτηση placeholder",
"FIELD-WORD-LIST-LABEL": "Ετικέτα",
@ -606,7 +607,7 @@
},
"ERRORS": {
"INVALID-VISIBILITY-RULES": {
"MESSAGE-START": "There were invalid visibilty rules detected in ",
"MESSAGE-START": "There were invalid visibility rules detected in ",
"MESSAGE-END": ". Would you like to fix them?",
"CONFIRM-YES": "Yes, remove invalid rules",
"CONFIRM-NO": "No, keep them.",
@ -637,7 +638,7 @@
"TEXT-INFO-QUESTION": " Εξερευνήστε τα Δημόσια Σχέδια Διαχείρισης Δεδομένων και",
"LINK-ZENODO": "την κοινότητα του LIBER στο Zenodo",
"GET-IDEA": "για να πάρετε μια ιδέα!",
"SORT-BY": "Ταξίνομηση κατά",
"SORT-BY": "Ταξινόμηση κατά",
"COLUMNS": {
"NAME": "Τίτλος",
"GRANT": "Επιχορήγηση",
@ -753,7 +754,7 @@
"SAVE": "Save",
"SAVE-AND-CONTINUE": "Αποθήκευση & Συνέχεια",
"SAVE-AND-ADD": "Αποθήκευση & Προσθήκη Νέου",
"SAVE-AND-CLOSE": " Αποθήκευση & Κλείσμο",
"SAVE-AND-CLOSE": " Αποθήκευση & Κλείσιμο",
"SAVE-AND-FINALISE": "Αποθήκευση και Οριστικοποίηση",
"FINALIZE": "Οριστικοποίηση",
"REVERSE": "Αναίρεση Οριστικοποίησης",
@ -777,7 +778,7 @@
"NO-FILES-SELECTED": "Δεν υπάρχουν επιλεγμένα αρχεία για μεταφόρτωση",
"LARGE-FILE-OR-UNACCEPTED-TYPE": "Το αρχείο είναι πολύ μεγάλο ή ο τύπος του δεν υποστηρίζεται.",
"MAX-FILE-SIZE": "Τα αρχεία πρέπει να είναι έως {{maxfilesize}} MB.",
"ACCEPTED-FILE-TYPES": "Οι υποστηριζόμενοι τύποι πολυμέσων εναι: "
"ACCEPTED-FILE-TYPES": "Οι υποστηριζόμενοι τύποι πολυμέσων είναι: "
},
"UPLOAD": {
"UPLOAD-XML": "Εισαγωγή",
@ -1100,7 +1101,7 @@
"GRANTS-HINT": "Βρείτε την επιχορήγηση της έρευνας σας ή προσθέστε νέα",
"FUNDER": "Χορηγός",
"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.",
"STATUS": "Κατάσταση Σχεδίου Διαχείρισης Δεδομένων",
"EXTERNAL-SOURCE-HINT": "Κατάλογος των τιμών που παρέχονται από εξωτερικές πηγές",
@ -1109,7 +1110,7 @@
"LANGUAGE-HINT": "Επιλέξτε τη γλώσσα του Σχεδίου Διαχείρισης Δεδομένων σας",
"LICENSE": "Άδεια",
"VISIBILITY": "Ορατότητα",
"VISIBILITY-HINT": "Επιλέξτε πως θα εμφανίζρται το Σχέδιο Διαχείρισης Δεδομένων στο {{ APP_NAME }}. Με την επιλογή «Δημόσιο», το Σχέδιο Διαχείρισης Δεδομένων γίνεται αυτόματα διαθέσιμο σε όλους τους χρήστες της συλλογής «Δημόσια Σχέδια Διαχείρισης Δεδομένων».",
"VISIBILITY-HINT": "Επιλέξτε πως θα εμφανίζονται το Σχέδιο Διαχείρισης Δεδομένων στο {{ APP_NAME }}. Με την επιλογή «Δημόσιο», το Σχέδιο Διαχείρισης Δεδομένων γίνεται αυτόματα διαθέσιμο σε όλους τους χρήστες της συλλογής «Δημόσια Σχέδια Διαχείρισης Δεδομένων».",
"PUBLICATION": "Ημερομηνία Δημοσιοποίησης",
"CONTACT": "Επικοινωνία",
"COST": "Δαπάνες",
@ -1128,7 +1129,7 @@
"LOCK": "Κλειδωμένο Σχέδιο Διαχείρισης Δεδομένων",
"PERMISSION": "Δεν έχετε άδεια να επεξεργαστείτε αυτό το Σχέδιο Διαχείρισης Δεδομένων",
"INSERT-MANUALLY": "Εισάγετε το χειροκίνητα",
"CREATE-DATASET": "Δημιούργια νέου",
"CREATE-DATASET": "Δημιουργία νέου",
"DISABLED-EXPORT": "Παρακαλώ αποθηκεύστε τις αλλαγές σας για να εξάγετε αυτό το Σχέδιο Διαχείρισης Δεδομένων"
},
"PLACEHOLDER": {
@ -1140,7 +1141,7 @@
"SNACK-BAR": {
"UNSUCCESSFUL-DOI": "Αποτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)",
"SUCCESSFUL-DOI": "Επιτυχία δημιουργίας Μονοσήμαντων Αναγνωριστικών Ψηφιακών Αντικειμένων (DOI)",
"UNSUCCESSFUL-FINALIZE": "Αποτυχία οριστικοποιήσης Σχεδίου Διαχείρισης Δεδομένων"
"UNSUCCESSFUL-FINALIZE": "Αποτυχία οριστικοποίησης Σχεδίου Διαχείρισης Δεδομένων"
},
"DESCRIPTION-TEMPLATE-LIST": {
"TITLE": "Available Description Templates",
@ -1168,9 +1169,9 @@
"TYPING": "Προσθέστε περισσότερα γράμματα στο όνομα ώστε να είναι πιο πιθανό να βρείτε το σωστό.",
"UNIQUE-IDENTIFIER": "Unique Identifier",
"RESEARCHER-IDENTIFIER-EXISTS": "Researcher identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organisation identifier already exists.",
"ORGANISATION-IDENTIFIER-EXSTS": "Organization identifier already exists.",
"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 organisation in the organisations list.",
"IDENTIFIER-EXISTS-ORGANISATION-LIST": "This identifier is already used by an organization in the organizations list.",
"SAVE":"Αποθήκευση",
"CANCEL": "Ακύρωση"
},
@ -1190,7 +1191,7 @@
},
"LICENSE-INFO": {
"INTRO": "Κάθε Σχέδιο Διαχείρισης Δεδομένων μπορεί να περιλαμβάνει συγκεκριμένες πληροφορίες άδειας σχετικά με το πόσο ανοικτό και διαθέσιμο είναι, ώστε να μπορείτε να καθορίσετε ποιος μπορεί να δει το σύνολο δεδομένων σας και για πόσο τα δεδομένα θα είναι ιδιωτικά.",
"HINT": "Μία σύντομη περιγραφή για την άδεια που χρηρισοποιεί το Σχέδιο Διαχείρισης Δεδομένων, το είδος της και πότε θα είναι ανοικτό.",
"HINT": "Μία σύντομη περιγραφή για την άδεια που χρησιμοποιεί το Σχέδιο Διαχείρισης Δεδομένων, το είδος της και πότε θα είναι ανοικτό.",
"TYPING": "Προσθέστε περισσότερα γράμματα για να είναι πιο πιθανό να βρείτε το σωστό."
},
"DATASET-DESCRIPTION": {
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων από τη συλλογή σας"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}
@ -1460,7 +1461,7 @@
"SOURCES": "Πηγές",
"SOURCE:": "Πηγή: ",
"NO-SOURCE": "Δε συνδέεται με την πηγή",
"OUTPUT": "Αποτελέσμα",
"OUTPUT": "Αποτέλεσμα",
"SELECT": "Επιλέξτε"
},
"DMP": {
@ -1697,7 +1698,7 @@
"DMP-QUESTION": "Τι είναι το DMP στο {{ APP_NAME_CAPS }}?",
"INFO-TEXT": "Το {{ APP_NAME_CAPS }} είναι μια ανοικτή επεκτάσιμη υπηρεσία που απλοποιεί τη διαχείριση, την επικύρωση, την παρακολούθηση και τη συντήρηση των Σχεδίων Διαχείρισης Δεδομένων. Επιτρέπει στους φορείς (ερευνητές, υπεύθυνους έρευνας, διευθυντές κλπ.) να δημιουργούν ζωντανά Σχέδια Διαχείρισης Δεδομένων που μπορούν να ανταλλάσσονται ελεύθερα μεταξύ των υποδομών για τη διεξαγωγή συγκεκριμένων πτυχών της διαδικασίας διαχείρισης Δεδομένων, σύμφωνα με τις προθέσεις και τη δέσμευση των κατόχων Δεδομένων.",
"INFO-DMP-TEXT": "Ένα Σχέδιο Διαχείρισης Δεδομένων είναι ένα ζωντανό αρχείο που περιγραφεί τα σύνολα δεδομένων που έχουν παραχθεί ή και επαναχρησιμοποιηθεί κατά τη διάρκεια και μετά του κύκλου ζωής της έρευνας. Τα Σχέδια Διαχείρισης Δεδομένων έχουν ως στόχο να παρέχουν στους ερευνητές τις αναγκαίες πληροφορίες για την αναπαραγωγή, επαναδιανομή και ανακατεύθυνση του σκοπού των ερευνητικών αποτελεσμάτων ώστε να εξασφαλίζεται η εγκυρότητα και η εκμετάλλευσή τους.",
"NEW-QUESTION": "Νέος με τα DMP; Επίσκεψου",
"NEW-QUESTION": "Νέος με τα DMP; Επισκέψου",
"START-YOUR-FIRST-DMP": "Ξεκινήστε το πρώτο σας DMP",
"OPEN-AIR-GUIDE": "Οδηγός για ερευνητές του OpenAIRE",
"LEARN-MORE": "για να μάθετε περισσότερα για το πώς να δημιουργήσετε ένα!",
@ -1718,7 +1719,7 @@
"ALL": "Όλα",
"EMPTY-LIST": "Τίποτα ακόμα εδώ.",
"LATEST-ACTIVITY": "Τελευταία Δραστηριότητα",
"DMP-ABOUT-BEG": "Ένα Σχέδιο Διαχείρισης Δεδομένων αποτελέιται από τις βασικές πληροφορίες σχετικά με την έρευνα, όπως ο σκοπός, οι στόχοι και οι εμπλεκόμενοι ερευνητές, αλλά και σχετικά με την τεκμηρίωση των ερευνητικών συνόλων δεδομένων, δηλαδή",
"DMP-ABOUT-BEG": "Ένα Σχέδιο Διαχείρισης Δεδομένων αποτελείται από τις βασικές πληροφορίες σχετικά με την έρευνα, όπως ο σκοπός, οι στόχοι και οι εμπλεκόμενοι ερευνητές, αλλά και σχετικά με την τεκμηρίωση των ερευνητικών συνόλων δεδομένων, δηλαδή",
"DMP-ABOUT-END": ", που υπογραμμίζουν τα βήματα που ακολουθήθηκαν και τα μέσα που χρησιμοποιήθηκαν κατά τις δραστηριότητες διαχείρισης δεδομένων.",
"SELECT-DMP": "Επιλέξτε ένα Σχέδιο Διαχείρισης Δεδομένων για το Σύνολο Δεδομένων σας",
"ACTIONS": {

View File

@ -191,7 +191,8 @@
"SERBIAN": "Srpski",
"PORTUGUESE": "Portugalski",
"CROATIAN": "Hrvatski",
"POLISH": "Poljski"
"POLISH": "Poljski",
"BASQUE": "Basque"
}
},
"COOKIE": {

View File

@ -191,7 +191,8 @@
"SERBIAN": "Serbski",
"PORTUGUESE": "Portugalski",
"CROATIAN": "Chorwacki",
"POLISH": "Polski"
"POLISH": "Polski",
"BASQUE": "Basque"
}
},
"COOKIE": {

View File

@ -191,7 +191,8 @@
"SERBIAN": "Sérvio",
"PORTUGUESE": "Português",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Selecione um PGD existente"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

View File

@ -191,7 +191,8 @@
"SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Vybrať existujúci DMP."
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

View File

@ -191,7 +191,8 @@
"SERBIAN": "Serbian",
"PORTUGUESE": "Portuguese",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Odaberite postojeći Plan"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

View File

@ -191,7 +191,8 @@
"SERBIAN": "Sırpça",
"PORTUGUESE": "Portekizce",
"CROATIAN": "Croatian",
"POLISH": "Polish"
"POLISH": "Polish",
"BASQUE": "Basque"
}
},
"COOKIE": {
@ -305,7 +306,7 @@
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Description is about, it's scope and objectives.",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
@ -317,7 +318,7 @@
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Template description",
"UNTITLED": "Untitled",
"QUESTION": "Question",
"TEMPLATE-OUTLINE": "Template outline",
@ -1389,13 +1390,13 @@
"PLACEHOLDER": "Mevcut olan bir VYP seçin"
},
"PREFILL-STEP": {
"TITLE": "Initialize your Dataset",
"TITLE": "Initialize your Description",
"PREFILL": "Prefill",
"OR": "OR",
"HINT": "Select the dataset from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"HINT": "Select an entry from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.",
"MANUALLY": "Manually",
"PROFILE": "Dataset Template",
"PREFILLED-DATASET": "Prefilled Dataset",
"PROFILE": "Description Template",
"PREFILLED-DATASET": "Prefilled Description",
"SEARCH": "Start typing to search for a dataset or software",
"NEXT": "Next"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1,6 +1,5 @@
[
"DatasetProfileEditorModel.description",
"DatasetProfileEditorModel.type",
"DatasetProfileEditorModel.label",
"SectionEditorModel.title",
"SectionEditorModel.description",

View File

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

View File

@ -88,6 +88,7 @@
<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-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 class="card flex-row">

View File

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