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[0] != null
|
||||
) {
|
||||
for(var identifier of this.metadata.identifiers){
|
||||
if (identifier.scheme == "doi"){
|
||||
this.is_doi = true;
|
||||
this.id_doi = this.metadata.identifiers[0].identifier;
|
||||
this.id_doi = identifier.identifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add metadata to the state
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
#}
|
||||
|
||||
{% 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>
|
||||
{% if id_doi %}
|
||||
<span class="get-badge" data-toggle="tooltip" data-placement="bottom" style="cursor: pointer;"
|
||||
@@ -34,3 +38,6 @@
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user