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.

46 lines
1.9 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, item) 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="addLabel(label)"
  13. v-shortkey.once="[ label.shortcut ]"
  14. @shortkey="addLabel(label)">
  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="field is-grouped is-grouped-multiline">
  25. <div class="control" v-for="(annotation, index) in annotations[pageNumber]">
  26. <div class="tags has-addons">
  27. <span class="tag is-medium"
  28. v-bind:style="{ color: id2label[annotation.label].text_color, 'background-color': id2label[annotation.label].background_color }">
  29. [[ id2label[annotation.label].text ]]
  30. <button class="delete is-small" v-on:click="removeLabel(annotation)"></button>
  31. </span>
  32. </div>
  33. </div>
  34. </div>
  35. <hr>
  36. <div class="content" v-if="docs[pageNumber]">
  37. [[ docs[pageNumber].text ]]
  38. </div>
  39. </div>
  40. </div>
  41. {% endblock %}
  42. {% block footer %}
  43. <script type="text/javascript" src="{% static 'bundle/document_classification.js' %}"></script>
  44. {% endblock %}