{# Copyright (C) 2020 CERN. Copyright (C) 2020 Northwestern University. Copyright (C) 2021 Graz University of Technology. Copyright (C) 2021-2022 New York University. Invenio RDM Records is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {% macro creatibutor_icon(creatibutor) %} {% set identifier_found = namespace(value=False) %} {% for scheme, identifier in creatibutor.person_or_org.identifiers|groupby("scheme") %} {%- if scheme == "orcid" %} {% set identifier_found.value = True %} ORCID icon {%- elif scheme == "ror" %} {% set identifier_found.value = True %} ROR icon {%- elif scheme == "gnd" %} {% set identifier_found.value = True %} GND icon {%- endif %} {% endfor %} {# if no identifiers: distinguish btw people and organizations #} {%- if not identifier_found.value and creatibutor.person_or_org.type == 'organizational'%} {%- endif %} {% endmacro %} {% macro show_creatibutors(creatibutors, show_affiliations=False) %} {% for creatibutor in creatibutors %}
{{- creatibutor.person_or_org.name -}} {%- if creatibutor.affiliations -%} {%- for affiliation in creatibutor.affiliations -%} {{ affiliation[0] }}{{ ", " if not loop.last }} {%- endfor -%} {%- endif -%} {{- creatibutor_icon(creatibutor) -}}
{% endfor %} {%- endmacro %} {% macro affiliations_accordion(group, affiliations) %}
{% endmacro %}