-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include funders list macro in templates
- Loading branch information
Showing
6 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
ldcoolp/curation/inspection/readme/templates/funders_dict.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% macro funders_(given_funder) %} | ||
{% set funders = { | ||
'National Science Foundation': ['Directorate for Biological Sciences', | ||
'Directorate for Computer and Information Science and Engineering', | ||
'Directorate for Engineering', | ||
'Directorate of Geosciences', | ||
'Directorate for Mathematical and Physical Sciences', | ||
'Directorate for Social, Behavioral and Economic Sciences', | ||
'Directorate for STEM Education', | ||
'Directorate for Technology, Innovation and Partnerships' | ||
] | ||
} %} | ||
{% set ns = namespace(given_funder_found = false) %} | ||
{% for funder, offices in funders.items() %} | ||
{% if given_funder.funder_name in offices %} | ||
{% set ns.given_funder_found = true %} | ||
- {{ funder }} (Grant no: {{ given_funder.grant_code }}) | ||
{{ given_funder.url }} | ||
{% break %} | ||
{% else %} | ||
{% set ns.given_funder_found = false %} | ||
{% endif %} | ||
{% endfor %} | ||
{% if ns.given_funder_found == false %} | ||
- {{ given_funder.funder_name}} (Grant no: {{ given_funder.grant_code }}) | ||
{{ given_funder.url }} | ||
{% endif %} | ||
{% endmacro %} |