Skip to content

Commit

Permalink
Cost: Remove cost coverage when no costs are provided in the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyKarnbach authored and andresTabiTuwien committed Dec 18, 2024
1 parent a6955d5 commit ea600c3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,24 @@ public void costInformation() {
addReplacement(replacements, "[costsDescriptions]", "");
}
if (!costList.isEmpty()) {
boolean longDescriptionExists = false;
for (Cost cost : costList) {
if (cost.getDescription() != null && cost.getDescription().length() >= 255) {
newDescription.append("Description for \"");
newDescription.append(cost.getTitle()).append("\": ");
newDescription.append(cost.getDescription()).append(";");
longDescriptionExists = true;
}
addReplacement(replacements, "[costsDescriptions]", newDescription.toString());
}
addReplacement(
replacements,
"[costCoverage]",
(longDescriptionExists ? ";" : "")
+ loadResourceService.loadVariableFromResource(prop, "costCoverage"));
} else {
addReplacement(replacements, "[costsDescriptions]", "");
addReplacement(replacements, "[costCoverage]", "");
}
}

Expand Down
Binary file modified src/main/resources/org/damap/base/template/FWFTemplate.docx
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ ethicalReviewed.avail=The research plan of the project was reviewed by an ethics
ethicalStatement=Ethical issues in the project have been identified and discussed with the Ethics Coordinator. They are described in detail in separate documents.

closeddatasetreasons.intro=Closed Dataset Reasons:
restricteddatasetreasons.intro=Restricted Dataset Reasons:
restricteddatasetreasons.intro=Restricted Dataset Reasons:

costCoverage=Coverage of costs:;...
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ ethicalReviewed.avail=The research plan of the project was reviewed by an ethics
ethicalStatement=Ethical issues in the project have been identified and discussed with the Ethics Coordinator. They are described in detail in separate documents.

closeddatasetreasons.intro=Closed Dataset Reasons:
restricteddatasetreasons.intro=Restricted Dataset Reasons:
restricteddatasetreasons.intro=Restricted Dataset Reasons:

costCoverage=Coverage of costs:;...

0 comments on commit ea600c3

Please sign in to comment.