Skip to content
Permalink
Browse files

Refactor AnnotationView

Major changes include... (this is not fully done)

- AnnotationVIew now handles the property and value simultaneously, where they used to be one view for each of the property and the value. This matches mockups we decided on together and altogether makes annotations make more sense
- Wayyyy simpler code. I figured out some stuff wrt Popovers that made my life a lot easier
- The popover content is now backed by an Underscore template because it was getting messy
  • Loading branch information
amoeba committed Jun 28, 2019
1 parent 7bb33d5 commit a6c1d9ea9ec6bb83073b582c58166ac45db9dfdb
Showing with 234 additions and 100 deletions.
  1. +23 −0 src/js/templates/bioportalAnnotationTemplate.html
  2. +211 −100 src/js/views/AnnotationView.js
@@ -0,0 +1,23 @@
<div clas="annotation-popover-context">
<%= context %> <a href="<%= propertyURI %>"><%= propertyLabel %></a> <a href="<%= valueURI %>"><%= valueLabel %></a>
</div>
<div class="annotation-popover-definition">
<% if (propertyDefinition === null) { %>
No extra information could be found for <a href="<%= propertyURI %>"><%= propertyLabel %></a>.
<% } else {%>
<a href="<%= propertyURI %>"><%= propertyLabel %></a> is defined as "<%= propertyDefinition %>" in the <a href="<%= propertyOntology %>"><%= propertyOntology %></a> ontology.
<% } %>
</div>
<div class="annotation-popover-findmore">
Find more datasets annotated with the term <a href="<%= propertyURI %>"><%= propertyURI %></a>.
</div>
<div class="annotation-popover-definition">
<% if (valueDefinition === null) { %>
No extra information could be found for <a href="<%= valueURI %>"><%= valueLabel %></a>.
<% } else {%>
<a href="<%= valueURI %>"><%= valueLabel %></a> is defined as "<%= valueDefinition %>" in the <a href="<%= valueOntology %>"><%= valueOntology %> </a> ontology.
<% } %>
</div>
<div class="annotation-popover-findmore">
Find more datasets annotated with the term <a href="<%= valueURI %>"><%= valueURI %></a>.
</div>

0 comments on commit a6c1d9e

Please sign in to comment.
You can’t perform that action at this time.