Compare commits

...

70 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
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 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
30 changed files with 753 additions and 348 deletions

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

@ -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

@ -544,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);
}
@ -1469,7 +1477,7 @@ public class DataManagementPlanManager {
Map extraProperties = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class);
if (extraProperties.containsKey("license")) {
Map<String, String> license = ((Map<String, String>) extraProperties.get("license"));
if (!StringUtils.isEmpty(license.get("pid"))) {
if (license != null && !StringUtils.isEmpty(license.get("pid"))) {
XWPFRun runLicense = systemFieldParagraph.createRun();
runLicense.setText(license.get("pid").toString());
runLicense.setColor("116a78");
@ -1537,7 +1545,7 @@ public class DataManagementPlanManager {
.sorted(Comparator.comparing(Dataset::getCreated)).collect(Collectors.toList());
if (datasets.size() > 0)
wordBuilder.addParagraphContent("Section descriptions", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0);
wordBuilder.addParagraphContent("Descriptions", document, ParagraphStyle.HEADER2, BigInteger.ZERO, 0);
for (Dataset datasetEntity : datasets) {
@ -1559,7 +1567,7 @@ public class DataManagementPlanManager {
datasetDescriptionParagraph.setStyle("Heading4");
datasetDescriptionParagraph.setSpacingBetween(1.5);
XWPFRun datasetDescriptionRun = datasetDescriptionParagraph.createRun();
datasetDescriptionRun.setText("Description");
datasetDescriptionRun.setText(datasetEntity.getLabel());
//datasetDescriptionRun.setColor("2E75B6");
//datasetDescriptionRun.setBold(true);
datasetDescriptionRun.setFontSize(15);
@ -1567,24 +1575,24 @@ public class DataManagementPlanManager {
// 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");
// 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 descriptionParagraph = document.createParagraph();
XWPFRun descriptionParagraphRun = descriptionParagraph.createRun();
descriptionParagraphRun.setText("Description: ");
descriptionParagraphRun.setColor("000000");
// XWPFRun descriptionParagraphRun = descriptionParagraph.createRun();
// descriptionParagraphRun.setText("Description: ");
// descriptionParagraphRun.setColor("000000");
wordBuilder.addParagraphContent(datasetEntity.getDescription(), document, ParagraphStyle.HTML, BigInteger.ZERO, 0);
XWPFParagraph datasetTemplateParagraph = document.createParagraph();

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

@ -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

@ -483,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

@ -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

@ -296,7 +296,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
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))
@ -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([

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>
@ -142,7 +142,7 @@
<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>
@ -309,7 +309,7 @@
<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

@ -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;
@ -230,7 +231,8 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
displayFn: (item) => item['label'],
titleFn: (item) => item['label'],
subtitleFn: (item) => item['description'],
popupItemActionIcon: 'visibility'
popupItemActionIcon: 'visibility',
canRemoveItem: (item) => this.canRemoveItem(item)
};
}
@ -484,7 +486,7 @@ 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) {
@ -915,7 +917,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}
const templates: Array<DmpDatasetProfile> = new Array<DmpDatasetProfile>();
this.selectedDmpBlueprintDefinition.sections.forEach(section => {
if (profiles !== undefined) {
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 {
@ -1088,32 +1090,23 @@ 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) {
@ -1149,7 +1142,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
if (result) {
this.addProfile(event, sectionIndex);
const items = this.sectionTemplates[sectionIndex];
items.push({id: event.id, label: event.label, description: ""});
items.push({ id: event.id, label: event.label, description: "" });
this.sectionTemplates[sectionIndex] = [...items];
}
});

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

@ -105,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);
}

View File

@ -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",
@ -132,8 +132,8 @@
"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",
@ -224,9 +224,9 @@
"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 }}",
@ -244,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"
}
@ -260,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",
@ -274,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",
@ -623,7 +623,7 @@
}
},
"DMP-LISTING": {
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TITLE": "Data Management Plans",
"OWNER": "Owner",
@ -635,7 +635,7 @@
"VERSION": "Version",
"CONTAINED-DESCRIPTIONS": "Contained Descriptions",
"TEXT-INFO": "Information in a DMP show how descriptions have been collected and/or generated, how they have been processed and analyzed, i.e. using which tools, standards, methodologies etc, but also where and how descriptions are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services.",
"TEXT-INFO-QUESTION": "Not sure how a DMP looks in practice? Browse Public DMPs and",
"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",
@ -887,7 +887,7 @@
"FINALIZED": "Finalized",
"LAST-EDITED": "Last Edited",
"ACTIONS": "Actions",
"DMP": "DMP",
"DMP": "Plan",
"PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -914,7 +914,7 @@
"DRAFT": "Private access - Editable Dataset",
"FINALIZED": "Private access - Closed Dataset"
},
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TEMPLATES-INVOLVED": "Description Template",
"VERSION": "DMP Version",
@ -928,7 +928,7 @@
"TITLE": "Published Datasets",
"TOOLTIP": {
"FINALIZED": "Private access - Closed Dataset",
"DMP": "DMP",
"DMP": "Plan",
"GRANT": "Grant",
"TEMPLATES-INVOLVED": "Description Template"
},
@ -950,7 +950,7 @@
"DESCRIPTION": "Description",
"CREATED": "Created",
"ACTIONS": "Actions",
"DMP": "DMP",
"DMP": "Plan",
"PROFILE": "Template",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -1071,7 +1071,7 @@
"TITLE": {
"NEW": "New Data Management Plan",
"EDIT": "Edit",
"EDIT-DMP": "Editing DMP",
"EDIT-DMP": "Editing Plan",
"ADD-DATASET": "Adding description",
"EDIT-DESCRIPTION": "Editing Description",
"CLONE-DMP": "Clone",
@ -1164,7 +1164,7 @@
"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",
@ -1184,7 +1184,7 @@
"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.",
"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."
@ -1322,7 +1322,7 @@
"DESCRIPTION": "Description",
"PROFILE": "Template",
"URI": "Uri",
"DMP": "DMP",
"DMP": "Plan",
"SELECT-DMP": "Select DMP",
"DATAREPOSITORIES": "Data Repositories",
"REGISTRIES": "Registries",
@ -1386,7 +1386,7 @@
"SAVE": "Save"
},
"FIRST-STEP": {
"TITLE": "DMP",
"TITLE": "Plan",
"PLACEHOLDER": "Pick an existing DMP"
},
"PREFILL-STEP": {
@ -1522,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)"
},
@ -1573,7 +1573,7 @@
},
"DMP-WIZARD": {
"FIRST-STEP": {
"DMP": "DMP Editor",
"DMP": "Plan Editor",
"DATASETS": "Datasets"
},
"ACTIONS": {
@ -1693,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",
@ -1703,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...",
@ -1712,14 +1712,14 @@
"PUBLIC-USAGE": "Public Usage",
"DESCRIPTIONS": "Descriptions",
"DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Descriptions",
"PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DMPS": "Public Plans",
"PUBLIC-DATASETS": "Public Datasets",
"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 entities, 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": {
@ -1728,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.",
@ -1738,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": {
@ -1869,7 +1869,7 @@
}
},
"DMP-FINALISE-DIALOG": {
"DMP": "DMP",
"DMP": "Plan",
"DATASETS": "Datasets",
"EMPTY": "No Datasets for this DMP so far",
"SUBMIT": "Submit",
@ -1983,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"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

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

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