Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

records/macros/detail.html: Allow funding entry with award number only #2912

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -96,40 +96,37 @@ <h2>{{ add_description.type.title_l10n }} <span


{% macro _show_funding_item(item, index) %}
<dt class="ui tiny header">{{ item.funder.name if item.funder }}</dt>
{%- if item.award -%}
tmorrell marked this conversation as resolved.
Show resolved Hide resolved
{%- if item.award.title_l10n -%}
<dt class="ui tiny header">
<span class="mr-5">
{% if item.award.acronym %}
{{ item.award.acronym }} –
{% endif %}

{{ item.award.title_l10n }}
</span>
<dt class="ui tiny header">
karkraeg marked this conversation as resolved.
Show resolved Hide resolved
<span class="mr-0 text-muted">
{% if item.award.acronym %}
{{ item.award.acronym }} –
{% endif %}

{%- if item.award.title_l10n -%}
{{ item.award.title_l10n }}
{%- endif -%}
</span>

{%- if item.award.number -%}
<span class="ui mini basic label ml-0 mr-5" id="number-label-{{ index }}">
{{ item.award.number }}
</span>
{%- endif -%}
{%- if item.award.number -%}
<span class="ui mini basic label {% if not item.award.title_l10n %}ml-0{% endif %}" id="number-label-{{ index }}">
{{ item.award.number }}
</span>
{%- endif -%}

{%- if item.award.identifiers -%}
{% for identifier in item.award.identifiers if 'url' == identifier.scheme %}
<a href="{{ identifier.identifier }}" target="_blank"
rel="noopener noreferrer" aria-label="{{ _('Open external link') }}">
<i class="external alternate icon"></i>
</a>
{%- endfor -%}
{%- endif -%}
</dt>
{%- if item.award.identifiers -%}
{% for identifier in item.award.identifiers if 'url' == identifier.scheme %}
<a href="{{ identifier.identifier }}" target="_blank"
rel="noopener noreferrer" aria-label="{{ _('Open external link') }}">
<i class="external alternate icon"></i>
</a>
{%- endfor -%}
{%- endif -%}
<dd class="text-muted">{{ item.funder.name if item.funder }}</dd>
{%- else -%}
<dt class="ui tiny header">{{ item.funder.name if item.funder }}</dt>
{%- endif -%}
</dt>
{%- endif -%}
{% endmacro %}


{% macro show_references(references) %}
<ul class="ui bulleted list details-list">
{% for reference in references %}
Expand Down