Skip to content

Commit

Permalink
Add the funder in the SE template
Browse files Browse the repository at this point in the history
  • Loading branch information
andresTabiTuwien committed Nov 20, 2024
1 parent df70178 commit 0a73503
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public void titlePage() {

private void titlePageFunding(Project project, ProjectDO projectCRIS) {
List<String> fundingItems = new ArrayList<>();
List<String> fundingNumberItems = new ArrayList<>();
if (projectCRIS != null
&& projectCRIS.getFunding() != null
&& projectCRIS.getFunding().getFundingProgram() != null) {
Expand All @@ -112,6 +113,16 @@ private void titlePageFunding(Project project, ProjectDO projectCRIS) {
&& project.getFunding().getGrantIdentifier().getIdentifier() != null) {
fundingItems.add(project.getFunding().getGrantIdentifier().getIdentifier());
}
//add funder number
if (project.getFunding() != null
&& project.getFunding().getFunderIdentifier().getIdentifier() != null) {
fundingNumberItems.add(project.getFunding().getFunderIdentifier().getIdentifier());
}
if (!fundingNumberItems.isEmpty()) {
addReplacement(replacements, "[funderid]", String.join(", ", fundingNumberItems));
} else {
addReplacement(replacements, "[funderid]", "");
}
// variable project funding, combination from funding item variables
if (!fundingItems.isEmpty()) {
addReplacement(replacements, "[grantid]", String.join(", ", fundingItems));
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 0a73503

Please sign in to comment.