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.id)"
  13. v-shortkey.once="[ label.shortcut ]"
  14. @shortkey="addLabel(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" v-if="items.length">
  24. <div class="field is-grouped is-grouped-multiline">
  25. <div class="control" v-for="(annotation, index) in items[cur].labels">
  26. <div class="tags has-addons">
  27. <span class="tag is-dark">
  28. [[ annotation.label.text ]]
  29. <button class="delete is-small" v-on:click="deleteLabel(index)"></button>
  30. </span>
  31. <span class="tag is-primary" v-if="annotation.label.prob">[[ annotation.label.prob ]]</span>
  32. </div>
  33. </div>
  34. </div>
  35. <hr v-if="items[cur].labels.length">
  36. <div class="content">
  37. [[ items[cur].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 %}