Compare commits

..
2 Commits
Author SHA1 Message Date
Mojib Wali 4d902f014b v1.9.3 2021-03-18 08:28:20 +01:00
Mojib Wali ea54a17c43 bugfix: adds check for scheme 'doi' 2021-03-17 17:11:00 +01:00
3 changed files with 15 additions and 4 deletions
@@ -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 %}
+1 -1
View File
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
and parsed by ``setup.py``. and parsed by ``setup.py``.
""" """
__version__ = "1.9.2" __version__ = "1.9.3"