Skip to content

Commit 13620af

Browse files
authored
fix: fix bioportal link generation and remove redundant links (#2655)
* fix bioportal button render issues. remove custom liquid filter (unsupported by github actions deployment) * don't make redundant buttons when ontology already provides link
1 parent b6c78bc commit 13620af

2 files changed

Lines changed: 38 additions & 31 deletions

File tree

_layouts/ontology_detail.html

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,44 @@ <h1>
7070
<a href="http://www.ebi.ac.uk/ols/ontologies/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
7171
OLS
7272
</a>
73-
<a href="https://bioportal.bioontology.org/ontologies/{{ page.id | make_bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
74-
BioPortal
75-
</a>
73+
{% assign skip_bioportal = false %}
74+
{% for browser in page.browsers %}
75+
{% if browser.label == "BioPortal" %}
76+
{% assign skip_bioportal = true %}
77+
{% endif %}
78+
{% endfor %}
79+
80+
{% unless skip_bioportal %}
81+
{% assign bioportal_id = page.id | upcase %}
82+
{% if bioportal_id == 'FBBT' %}
83+
{% assign bioportal_id = 'FB-BT' %}
84+
{% elsif bioportal_id == 'RO' %}
85+
{% assign bioportal_id = 'OBOREL' %}
86+
{% elsif bioportal_id == 'APOLLO_SV' %}
87+
{% assign bioportal_id = 'APOLLO-SV' %}
88+
{% elsif bioportal_id == 'TRANS' %}
89+
{% assign bioportal_id = 'PTRANS' %}
90+
{% elsif bioportal_id == 'WBLS' %}
91+
{% assign bioportal_id = 'WB-LS' %}
92+
{% elsif bioportal_id == 'FBDV' %}
93+
{% assign bioportal_id = 'FB-DV' %}
94+
{% elsif bioportal_id == 'WBBT' %}
95+
{% assign bioportal_id = 'WB-BT' %}
96+
{% elsif bioportal_id == 'WBPHENOTYPE' %}
97+
{% assign bioportal_id = 'WB-PHENOTYPE' %}
98+
{% elsif bioportal_id == 'TO' %}
99+
{% assign bioportal_id = 'PTO' %}
100+
{% elsif bioportal_id == 'FBCV' %}
101+
{% assign bioportal_id = 'FB-CV' %}
102+
{% elsif bioportal_id == 'MOD' %}
103+
{% assign bioportal_id = 'PSIMOD' %}
104+
{% elsif bioportal_id == 'PSO' %}
105+
{% assign bioportal_id = 'PLANTSO' %}
106+
{% endif %}
107+
<a href="https://bioportal.bioontology.org/ontologies/{{ bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
108+
BioPortal
109+
</a>
110+
{% endunless %}
76111
{% for b in page.browsers %}
77112
<a href="{{b.url}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
78113
{{b.label}}

_plugins/bioportal_identifier.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)