Skip to content

Commit

Permalink
fix: fix bioportal link generation and remove redundant links (#2655)
Browse files Browse the repository at this point in the history
* fix bioportal button render issues. remove custom liquid filter (unsupported by github actions deployment)
* don't make redundant buttons when ontology already provides link
  • Loading branch information
jsstevenson authored Nov 25, 2024
1 parent b6c78bc commit 13620af
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
41 changes: 38 additions & 3 deletions _layouts/ontology_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,44 @@ <h1>
<a href="http://www.ebi.ac.uk/ols/ontologies/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
OLS
</a>
<a href="https://bioportal.bioontology.org/ontologies/{{ page.id | make_bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
BioPortal
</a>
{% assign skip_bioportal = false %}
{% for browser in page.browsers %}
{% if browser.label == "BioPortal" %}
{% assign skip_bioportal = true %}
{% endif %}
{% endfor %}

{% unless skip_bioportal %}
{% assign bioportal_id = page.id | upcase %}
{% if bioportal_id == 'FBBT' %}
{% assign bioportal_id = 'FB-BT' %}
{% elsif bioportal_id == 'RO' %}
{% assign bioportal_id = 'OBOREL' %}
{% elsif bioportal_id == 'APOLLO_SV' %}
{% assign bioportal_id = 'APOLLO-SV' %}
{% elsif bioportal_id == 'TRANS' %}
{% assign bioportal_id = 'PTRANS' %}
{% elsif bioportal_id == 'WBLS' %}
{% assign bioportal_id = 'WB-LS' %}
{% elsif bioportal_id == 'FBDV' %}
{% assign bioportal_id = 'FB-DV' %}
{% elsif bioportal_id == 'WBBT' %}
{% assign bioportal_id = 'WB-BT' %}
{% elsif bioportal_id == 'WBPHENOTYPE' %}
{% assign bioportal_id = 'WB-PHENOTYPE' %}
{% elsif bioportal_id == 'TO' %}
{% assign bioportal_id = 'PTO' %}
{% elsif bioportal_id == 'FBCV' %}
{% assign bioportal_id = 'FB-CV' %}
{% elsif bioportal_id == 'MOD' %}
{% assign bioportal_id = 'PSIMOD' %}
{% elsif bioportal_id == 'PSO' %}
{% assign bioportal_id = 'PLANTSO' %}
{% endif %}
<a href="https://bioportal.bioontology.org/ontologies/{{ bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
BioPortal
</a>
{% endunless %}
{% for b in page.browsers %}
<a href="{{b.url}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
{{b.label}}
Expand Down
28 changes: 0 additions & 28 deletions _plugins/bioportal_identifier.rb

This file was deleted.

0 comments on commit 13620af

Please sign in to comment.