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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ml-0 label {% if item.award.title_l10n %}mr-5{% endif %}" id="number-label-{{ index }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span class="ui mini basic ml-0 label {% if item.award.title_l10n %}mr-5{% endif %}" id="number-label-{{ index }}">
<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