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.

29 lines
1.2 KiB

  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 has-background-royalblue" style="padding:1.5rem;">
  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" v-bind:style="{ color: label.text_color, backgroundColor: label.background_color }" v-on:click="annotate(label.id)"
  11. v-shortkey.once="[ label.shortcut ]" @shortkey="annotate(label.id)">
  12. [[ label.text ]]
  13. </a>
  14. <span class="tag is-medium">[[ label.shortcut ]]</span>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </header>
  20. <div class="card-content">
  21. <div class="content" v-if="docs[pageNumber] && annotations[pageNumber]">
  22. <annotator ref="annotator" v-bind:labels="labels" v-bind:entity-positions="annotations[pageNumber]" v-bind:text="docs[pageNumber].text"
  23. @remove-label="removeLabel" @add-label="addLabel"></annotator>
  24. </div>
  25. </div>
  26. </div>
  27. {% endblock %}
  28. {% block footer %}
  29. <script src="{% static 'bundle/sequence_labeling.js' %}"></script>
  30. {% endblock %}