You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.6 KiB

6 years ago
  1. {% extends "annotation/annotation_base.html" %}
  2. {% load static %}
  3. {% block annotation-area %}
  4. <div class="card">
  5. <header class="card-header">
  6. <div class="card-header-title" style="padding:1.5rem;background-color:royalblue;">
  7. <div class="field is-grouped is-grouped-multiline">
  8. <div class="control" v-for="label in labels">
  9. <div class="tags has-addons">
  10. <a class="tag is-medium"
  11. v-bind:style="{ color: label.text_color, backgroundColor: label.background_color }"
  12. v-on:click="annotate(label.id)"
  13. v-shortkey.once="[ label.shortcut ]"
  14. @shortkey="annotate(label.id)">
  15. [[ label.text ]]
  16. </a>
  17. <span class="tag is-medium">[[ label.shortcut ]]</span>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </header>
  23. <div class="card-content">
  24. <div class="content" v-if="docs[pageNumber] && annotations[pageNumber]">
  25. <annotator ref="annotator"
  26. v-bind:labels="labels"
  27. v-bind:entity-positions="annotations[pageNumber]"
  28. v-bind:text="docs[pageNumber].text"
  29. @remove-label="removeLabel"
  30. @add-label="addLabel"></annotator>
  31. </div>
  32. </div>
  33. </div>
  34. {% endblock %}
  35. {% block footer %}
  36. <script type="text/javascript" src="{% static 'bundle/sequence_labeling.js' %}"></script>
  37. {% endblock %}