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.
 
 
 
 
 
 

41 lines
1.7 KiB

{% extends "annotation/annotation_base.html" %}
{% load static %}
{% block annotation-area %}
<div class="card">
<header class="card-header">
<div class="card-header-title has-background-royalblue" style="padding:1.5rem;">
<div class="field is-grouped is-grouped-multiline">
<div class="control" v-for="(label, item) in labels">
<div class="tags has-addons">
<a class="tag is-medium" v-bind:style="{ color: label.text_color, backgroundColor: label.background_color }" v-on:click="addLabel(label)"
v-shortkey.once="[ label.shortcut ]" @shortkey="addLabel(label)">
[[ label.text ]]
</a>
<span class="tag is-medium">[[ label.shortcut ]]</span>
</div>
</div>
</div>
</div>
</header>
<div class="card-content">
<div class="field is-grouped is-grouped-multiline">
<div class="control" v-for="(annotation, index) in annotations[pageNumber]">
<div class="tags has-addons" v-if="id2label[annotation.label]">
<span class="tag is-medium" v-bind:style="{ color: id2label[annotation.label].text_color, 'background-color': id2label[annotation.label].background_color }">
[[ id2label[annotation.label].text ]]
<button class="delete is-small" v-on:click="removeLabel(annotation)"></button>
</span>
</div>
</div>
</div>
<hr style="margin: 0.8rem 0;">
<div class="content" v-if="docs[pageNumber]">
<span style="white-space: pre-wrap;">[[ docs[pageNumber].text ]]</span>
</div>
</div>
</div>
{% endblock %}
{% block footer %}
<script src="{% static 'bundle/document_classification.js' %}"></script>
{% endblock %}