mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
bugfix: adds check for scheme 'doi'
This commit is contained in:
@@ -29,8 +29,12 @@ export class DoiMint extends Component {
|
|||||||
this.metadata.identifiers.length > 0 &&
|
this.metadata.identifiers.length > 0 &&
|
||||||
this.metadata.identifiers[0] != null
|
this.metadata.identifiers[0] != null
|
||||||
) {
|
) {
|
||||||
this.is_doi = true;
|
for(var identifier of this.metadata.identifiers){
|
||||||
this.id_doi = this.metadata.identifiers[0].identifier;
|
if (identifier.scheme == "doi"){
|
||||||
|
this.is_doi = true;
|
||||||
|
this.id_doi = identifier.identifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add metadata to the state
|
// add metadata to the state
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
{% if metadata.identifiers %}
|
{% if metadata.identifiers %}
|
||||||
{%- set id_doi = metadata.identifiers[0].identifier %}
|
{% for identifier in metadata.identifiers %}
|
||||||
|
{% if identifier.scheme == 'doi' %}
|
||||||
|
|
||||||
|
|
||||||
|
{%- set id_doi = identifier.identifier %}
|
||||||
<dd>
|
<dd>
|
||||||
{% if id_doi %}
|
{% if id_doi %}
|
||||||
<span class="get-badge" data-toggle="tooltip" data-placement="bottom" style="cursor: pointer;"
|
<span class="get-badge" data-toggle="tooltip" data-placement="bottom" style="cursor: pointer;"
|
||||||
@@ -34,3 +38,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user