Skip to content

Commit

Permalink
separated ontology config and inherent metadata into two info panels …
Browse files Browse the repository at this point in the history
…and added links for URL type rights and license annotations for EBISPOT#474
  • Loading branch information
Erhun Giray Tuncay committed Jan 7, 2022
1 parent 99a886c commit 3096c78
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
13 changes: 13 additions & 0 deletions ols-web/src/main/resources/scss/new_ols.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,19 @@ a.nounderline.ontology-link {
padding: 10px 10px 10px 10px;
}

#ontology_info_box2 .panel-heading {
background: #00827c;
text-align: center;
}

#ontology_info_box2 .panel-heading h4 {
color: white;
}

#ontology_info_box2 .panel-body {
padding: 10px 10px 10px 10px;
}

#onto-tab-content .tabs-content {
min-height: 500px;
margin-bottom: 40px;
Expand Down
10 changes: 10 additions & 0 deletions ols-web/src/main/resources/static/css/new_ols.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ols-web/src/main/resources/static/css/new_ols.css.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ $("#diachron-link").on('click', function(){
$("#LegendDiv").fadeIn();
});

$("#ontology_info_box2").fadeOut(200, function(){
$("#LegendDiv").fadeIn();
});

})
})
})
Expand All @@ -85,6 +89,7 @@ function hideLegend() {
$("#LegendDiv").fadeOut(200, function() {
// alert('non-diachron tab clicked');
$("#ontology_info_box").fadeIn();
$("#ontology_info_box2").fadeIn();
});
}

Expand Down
23 changes: 18 additions & 5 deletions ols-web/src/main/resources/templates/ontology.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h3 style="font-size: 43px;" property="name" th:text="${ontologyDocument.getConf
<div id="right_info_box" class="small-4 columns">
<div id="ontology_info_box" class="panel">
<div class="panel-heading">
<h4 th:inline="text">[[${ontologyAlias}]] information</h4>
<h4 th:inline="text">[[${shortTitle}]] [[${ontologyAlias}]] information</h4>
</div>
<div class="panel-body">
<div>
Expand Down Expand Up @@ -259,16 +259,29 @@ <h4 th:inline="text">[[${ontologyAlias}]] information</h4>
<b>License URL: </b>
<a th:href="${ontologyDocument.getConfig().getLicense().getUrl()}" th:text="${ontologyDocument.getConfig().getLicense().getUrl()}">License URL</a>
</div>
</div>

<div id="ontology_info_box2" class="panel">
<div class="panel-heading">
<h4 th:inline="text">Original [[${ontologyAlias}]] information</h4>
</div>
<div class="panel-body">
<div th:each="annotations: ${ontologyDocument.getConfig().getAnnotations()}">
<b>
<a href="#"
th:href="@{../search(q=${annotations.key},exact='true', type=property, ontology=${ontologyDocument.getOntologyId()})}"
th:text="${annotations.key.replaceAll('_', ' ')}">property name</a>
</b>
<p th:unless="${annotations.key.equals('license')}" style="margin-left:9px;" th:each="annovalue : ${annotations.value}" th:text="${annovalue}">NCBI_9606</p>
<div th:if="${annotations.key.equals('license')}" th:each="annovalue : ${annotations.value}">
<a th:unless="${annovalue.startsWith('http://') or annovalue.startsWith('https://')}" style="margin-left:9px;" th:href="'https://' + ${annovalue}" th:text="${annovalue}">NCBI_9606</a>
<a th:if="${annovalue.startsWith('http://') or annovalue.startsWith('https://')}" style="margin-left:9px;" th:href="${annovalue}" th:text="${annovalue}">NCBI_9606</a>
<p th:unless="${annotations.key.equals('license') or annotations.key.equals('rights')}" style="margin-left:9px;" th:each="annovalue : ${annotations.value}" th:text="${annovalue}">NCBI_9606</p>
<div th:if="${annotations.key.equals('license') or annotations.key.equals('rights')}" th:each="annovalue : ${annotations.value}">
<div th:unless="${annovalue.split(' ').length > 1}">
<div th:unless="${annovalue.startsWith('http://') or annovalue.startsWith('https://')}">
<a th:if="${annovalue.startsWith('www')}" style="margin-left:9px;" th:href="'https://' + ${annovalue}" th:text="${annovalue}">NCBI_9606</a>
<p th:unless="${annovalue.startsWith('www')}" style="margin-left:9px;" th:text="${annovalue}" th:text="${annovalue}">NCBI_9606</p>
</div>
<a th:if="${annovalue.startsWith('http://') or annovalue.startsWith('https://')}" style="margin-left:9px;" th:href="${annovalue}" th:text="${annovalue}">NCBI_9606</a>
</div>
<p th:if="${annovalue.split(' ').length > 1}" style="margin-left:9px;" th:text="${annovalue}" th:text="${annovalue}">NCBI_9606</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 3096c78

Please sign in to comment.