Skip to content

Commit

Permalink
identifiers only using url property
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducica committed Nov 13, 2024
1 parent cbca9e8 commit e743f19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
26 changes: 2 additions & 24 deletions oarepo_ui/templates/components/IdentifierBadge.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,43 @@
{% set scheme = identifier.scheme %}
{% set value = identifier.identifier %}
{% set lowercaseScheme = identifier.scheme.lower() %}
{% set link = identifier.url%}
{% set badgeTitle = creatibutorName + " " + scheme + ": " + value %}

{% if lowercaseScheme == "orcid" %}
{% set link = "https://orcid.org/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('ORCID profile') %}
{% set icon = "/static/images/identifiers/ORCID-iD_icon-vector.svg" %}
{% set alt = "ORCID logo" %}
{% elif lowercaseScheme == "scopusid" %}
{% set link = "https://www.scopus.com/authid/detail.uri?authorId=" + value %}
{% set badgeTitle = creatibutorName + ": " + _('Scopus ID profile') %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "ScopusID logo" %}
{% elif lowercaseScheme == "ror" %}
{% set link = "https://ror.org/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('ROR profile') %}
{% set icon = "/static/images/identifiers/ror-icon-rgb.svg" %}
{% set alt = "ROR logo" %}
{% elif lowercaseScheme == "researcherid" %}
{% set link = "https://www.webofscience.com/wos/author/record/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('WOS Researcher ID') %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "WOS Researcher ID logo" %}
{% elif lowercaseScheme == "isni" %}
{% set link = "https://isni.org/isni/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('ISNI profile') %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "ISNI logo" %}
{% elif lowercaseScheme == "doi" %}
{% set link = "https://doi.org/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('DOI profile') %}
{% set icon = "/static/images/identifiers/DOI_logo.svg" %}
{% set alt = "DOI logo" %}
{% elif lowercaseScheme == "gnd" %}
{% set link = "https://d-nb.info/gnd/" + value %}
{% set badgeTitle = creatibutorName + ": " + _('GND profile') %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "GND logo" %}
{% elif lowercaseScheme == "czenasautid" %}
{% set link = None %}
{% set badgeTitle = scheme + " " + value %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "CZENAS logo" %}
{% elif lowercaseScheme == "vedidk" %}
{% set link = None %}
{% set badgeTitle = scheme + " " + value %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "VEDIDK logo" %}
{% elif lowercaseScheme == "institutionalid" %}
{% set link = None %}
{% set badgeTitle = scheme + " " + value %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "Institutional ID logo" %}
{% elif lowercaseScheme == "ico" %}
{% set link = None %}
{% set badgeTitle = scheme + " " + value %}
{% set icon = "/static/images/identifiers/id.png" %}
{% set alt = "ICO logo" %}
{% else %}
{% set link = None %}
{% set badgeTitle = None %}
{% set icon = None %}
{% set alt = "" %}
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion oarepo_ui/templates/oarepo_ui/header_login.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

{# Desktop Quick-create ("plus") menu #}
{%- set plus_menu_items = current_menu.submenu('plus').children %}
{%- if plus_menu_items %}
{%- set visible_items = plus_menu_items | selectattr("visible") | list %}
{%- if plus_menu_items and visible_items %}
<div
id="quick-create-dropdown"
class="ui dropdown pr-15 computer only create_dropdown"
Expand Down

0 comments on commit e743f19

Please sign in to comment.