mirror of https://github.com/doccano/doccano.git
Hironsan
6 years ago
4 changed files with 102 additions and 263 deletions
Split View
Diff Options
-
115doccano/app/server/templates/annotation.1.html
-
237doccano/app/server/templates/annotation.html
-
3doccano/app/server/urls.py
-
10doccano/app/server/views.py
@ -1,115 +0,0 @@ |
|||
{% extends "base.html" %} {% load static %} {% block header %} |
|||
<link rel="stylesheet" type="text/css" href="{% static 'inbox.css' %}"> {% endblock %} {% block content %} |
|||
<div class="columns" id="mail-app"> |
|||
<aside class="column is-2 aside hero is-fullheight"> |
|||
<div> |
|||
<aside class="menu"> |
|||
<p class="menu-label" style="color:#f2f2f2;"> |
|||
Progress |
|||
</p> |
|||
<ul class="menu-list"> |
|||
<li> |
|||
<progress class="progress" v-bind:class="progressColor" v-bind:value="achievement" max="100">30%</progress> |
|||
</li> |
|||
<!-- |
|||
<li class="level-right has-text-white"> |
|||
[[ achievement ]]% |
|||
</li> |
|||
--> |
|||
</ul> |
|||
</aside> |
|||
<aside class="menu"> |
|||
|
|||
<p class="menu-label" style="color:#f2f2f2;"> |
|||
Labels |
|||
</p> |
|||
<ul class="menu-list"> |
|||
<div class="control" v-for="label in labels"> |
|||
<li class="tags has-addons"> |
|||
<span class="tag is-primary">[[label.shortcut]]</span> |
|||
<a class="tag is-grey" v-on:click="addLabel(label.text)" v-shortkey.once="['ctrl', [[ label.shortcut ]]]" @shortkey="addLabel(label.text)">[[label.text]]</a> |
|||
</li> |
|||
</div> |
|||
</ul> |
|||
</aside> |
|||
</div> |
|||
</aside> |
|||
<div class="column is-3 messages hero is-fullheight" id="message-feed"> |
|||
<div class="field has-addons" style="margin:0 10px;"> |
|||
<div class="control is-expanded"> |
|||
<input class="input" type="text" placeholder="Find a document" v-model="searchQuery" @keyup.enter="submit"> |
|||
</div> |
|||
<div class="control"> |
|||
<a class="button is-primary"> |
|||
<span class="icon is-small"> |
|||
<i class="fas fa-search"></i> |
|||
</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="inbox-messages" id="inbox-messages"> |
|||
<div v-for="(msg, index) in items" class="card" v-bind:id="'msg-card-'+index" v-on:click="showMessage(index)" v-bind:data-preview-id="index"> |
|||
<div class="card-content"> |
|||
<div class="msg-header"> |
|||
<span class="msg-from"> |
|||
<div class="field is-grouped is-grouped-multiline"> |
|||
<div class="control" v-for="(label, index) in msg.labels"> |
|||
<div class="tags has-addons"> |
|||
<span class="tag is-dark"> |
|||
<button class="delete is-small" v-on:click="deleteLabel(index)"></button> |
|||
[[label.text]] |
|||
</span> |
|||
<span class="tag is-primary" v-if="label.prob">[[label.prob]]</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</span> |
|||
</div> |
|||
<div class="msg-snippet"> |
|||
<p id="fake-snippet-1">[[ msg.text.slice(0, 100) ]]</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="column is-7 message hero is-fullheight" id="message-pane"> |
|||
<div class="action-buttons"> |
|||
<div class="control is-grouped"> |
|||
<a class="button is-small" v-on:click="prevPage" v-shortkey="['ctrl', 'p']" @shortkey="prevPage"> |
|||
<i class="fa fa-chevron-left"></i> |
|||
</a> |
|||
<a class="button is-small" v-on:click="nextPage" v-shortkey="['ctrl', 'n']" @shortkey="nextPage"> |
|||
<i class="fa fa-chevron-right"></i> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="box message-preview"> |
|||
<div class="top"> |
|||
<div class="field is-grouped is-grouped-multiline"> |
|||
<div class="control" v-for="(label, index) in items[cur].labels"> |
|||
<div class="tags has-addons"> |
|||
<span class="tag is-dark"> |
|||
<button class="delete is-small" v-on:click="deleteLabel(index)"></button> |
|||
[[label.text]] |
|||
</span> |
|||
<span class="tag is-primary" v-if="label.prob">[[label.prob]]</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<hr> |
|||
<div class="content"> |
|||
[[ message_body ]] |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" |
|||
crossorigin="anonymous"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js" integrity="sha256-QHdJObhDO++VITP6S4tMlDHRWMaUOk+s/xWIRgF/YY0=" |
|||
crossorigin="anonymous"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js" integrity="sha256-4PIvl58L9q7iwjT654TQJM+C/acEyoG738iL8B8nhXg=" |
|||
crossorigin="anonymous"></script> |
|||
<script type="text/javascript" src="{% static 'main.js' %}"></script> |
|||
{% endblock %} |
@ -1,152 +1,115 @@ |
|||
{% extends "base.html" %} |
|||
{% load static %} |
|||
{% extends "base.html" %} {% load static %} {% block header %} |
|||
<link rel="stylesheet" type="text/css" href="{% static 'inbox.css' %}"> {% endblock %} {% block content %} |
|||
<div class="columns" id="mail-app"> |
|||
<aside class="column is-2 aside hero is-fullheight"> |
|||
<div> |
|||
<aside class="menu"> |
|||
<p class="menu-label" style="color:#f2f2f2;"> |
|||
Progress |
|||
</p> |
|||
<ul class="menu-list"> |
|||
<li> |
|||
<progress class="progress" v-bind:class="progressColor" v-bind:value="achievement" max="100">30%</progress> |
|||
</li> |
|||
<!-- |
|||
<li class="level-right has-text-white"> |
|||
[[ achievement ]]% |
|||
</li> |
|||
--> |
|||
</ul> |
|||
</aside> |
|||
<aside class="menu"> |
|||
|
|||
{% block content %} |
|||
<section class="container" id="root"> |
|||
<div class="columns"> |
|||
|
|||
<div class="column is-8"> |
|||
<tabs> |
|||
<tab name="Document" :selected="true"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4> |
|||
<div class="field is-grouped is-grouped-multiline"> |
|||
<div class="control" v-for="(label, index) in items[cur].labels"> |
|||
<div class="tags has-addons"> |
|||
<span class="tag is-grey"> |
|||
<button class="delete is-small" v-on:click="deleteLabel(index)"></button> |
|||
[[label.text]] |
|||
</span> |
|||
<span class="tag is-primary" v-if="label.prob">[[label.prob]]</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
<p> |
|||
[[ items[cur]['text'] ]] |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
</div> |
|||
<div class="is-clearfix "> |
|||
<div class="buttons has-addons is-left is-pulled-left"> |
|||
<a class="button is-small" v-on:click="prevPage" :disabled="cur == 0"> |
|||
<span class="icon"> |
|||
<i class="fas fa-chevron-circle-left"></i> |
|||
</span> |
|||
<span>Prev</span> |
|||
</a> |
|||
</div> |
|||
<div class="buttons has-addons is-right"> |
|||
<a class="button is-small" v-on:click="nextPage" :disabled="remaining == 1"> |
|||
<span>Next</span> |
|||
<span class="icon"> |
|||
<i class="fas fa-chevron-circle-right"></i> |
|||
</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</tab> |
|||
|
|||
<tab name="Guideline"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4> |
|||
Annotation Guideline |
|||
</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
<p role="textbox" contenteditable="true"> |
|||
[[ guideline ]] |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
<p class="menu-label" style="color:#f2f2f2;"> |
|||
Labels |
|||
</p> |
|||
<ul class="menu-list"> |
|||
<div class="control" v-for="label in labels"> |
|||
<li class="tags has-addons"> |
|||
<span class="tag is-primary">[[label.shortcut]]</span> |
|||
<a class="tag is-grey" v-on:click="addLabel(label.text)" v-shortkey.once="['ctrl', [[ label.shortcut ]]]" @shortkey="addLabel(label.text)">[[label.text]]</a> |
|||
</li> |
|||
</div> |
|||
</tab> |
|||
|
|||
</tabs> |
|||
</ul> |
|||
</aside> |
|||
</div> |
|||
</aside> |
|||
<div class="column is-3 messages hero is-fullheight" id="message-feed"> |
|||
<div class="field has-addons" style="margin:0 10px;"> |
|||
<div class="control is-expanded"> |
|||
<input class="input" type="text" placeholder="Find a document" v-model="searchQuery" @keyup.enter="submit"> |
|||
</div> |
|||
<div class="control"> |
|||
<a class="button is-primary"> |
|||
<span class="icon is-small"> |
|||
<i class="fas fa-search"></i> |
|||
</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="column is-4"> |
|||
<tabs> |
|||
<tab name="Annotation" :selected="true"> |
|||
<div class="box content"> |
|||
|
|||
<aside class="menu" style="padding-top:0rem;"> |
|||
<p class="menu-label" style="padding-left:0;"> |
|||
Active Learning |
|||
</p> |
|||
<p> |
|||
<a class="button is-primary is-small" v-on:click="activeLearn"> |
|||
<b>Do It!</b> |
|||
</a> |
|||
</p> |
|||
</aside> |
|||
|
|||
<aside class="menu" style="padding-top:1.5rem;"> |
|||
<p class="menu-label" style="padding-left:0;"> |
|||
Progress |
|||
</p> |
|||
<p> |
|||
<a class="button is-info is-small" style="height:1.5em;">[[ total ]] in set</a> |
|||
<a class="button is-success is-small" style="height:1.5em;">[[ done ]] done</a> |
|||
<a class="button is-danger is-small" style="height:1.5em;">[[ remaining ]] remaining</a> |
|||
</p> |
|||
</aside> |
|||
|
|||
<aside class="menu" style="padding-top:1.5rem;"> |
|||
<p class="menu-label" style="padding-left:0;"> |
|||
Tags |
|||
</p> |
|||
<div class="inbox-messages" id="inbox-messages"> |
|||
<div v-for="(msg, index) in items" class="card" v-bind:id="'msg-card-'+index" v-on:click="showMessage(index)" v-bind:data-preview-id="index"> |
|||
<div class="card-content"> |
|||
<div class="msg-header"> |
|||
<span class="msg-from"> |
|||
<div class="field is-grouped is-grouped-multiline"> |
|||
<div class="control" v-for="label in labels"> |
|||
<div class="control" v-for="(label, index) in msg.labels"> |
|||
<div class="tags has-addons"> |
|||
<a class="tag is-grey" v-on:click="addLabel(label.text)">[[label.text]]</a> |
|||
<span class="tag is-primary">[[label.shortcut]]</span> |
|||
<span class="tag is-dark"> |
|||
<button class="delete is-small" v-on:click="deleteLabel(index)"></button> |
|||
[[label.text]] |
|||
</span> |
|||
<span class="tag is-primary" v-if="label.prob">[[label.prob]]</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</aside> |
|||
</span> |
|||
</div> |
|||
</tab> |
|||
|
|||
<tab name="History"> |
|||
<div class="box content"> |
|||
<div class="field"> |
|||
<label class="label">Search</label> |
|||
<div class="control"> |
|||
<input class="input" type="text" placeholder="Text input" v-model="searchQuery" @keyup.enter="submit"> |
|||
</div> |
|||
</div> |
|||
<div class="card" v-for="item in history"> |
|||
<div class="card-content"> |
|||
<div class="content"> |
|||
<p> |
|||
[[ item['text'].slice(0, 100) ]] |
|||
</p> |
|||
<div class="tags"> |
|||
<a class="tag is-grey" v-for="label in item.labels">[[ label.text ]]</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="msg-snippet"> |
|||
<p id="fake-snippet-1">[[ msg.text.slice(0, 100) ]]</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="column is-7 message hero is-fullheight" id="message-pane"> |
|||
<div class="action-buttons"> |
|||
<div class="control is-grouped"> |
|||
<a class="button is-small" v-on:click="prevPage" v-shortkey="['ctrl', 'p']" @shortkey="prevPage"> |
|||
<i class="fa fa-chevron-left"></i> |
|||
</a> |
|||
<a class="button is-small" v-on:click="nextPage" v-shortkey="['ctrl', 'n']" @shortkey="nextPage"> |
|||
<i class="fa fa-chevron-right"></i> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="box message-preview"> |
|||
<div class="top"> |
|||
<div class="field is-grouped is-grouped-multiline"> |
|||
<div class="control" v-for="(label, index) in items[cur].labels"> |
|||
<div class="tags has-addons"> |
|||
<span class="tag is-dark"> |
|||
<button class="delete is-small" v-on:click="deleteLabel(index)"></button> |
|||
[[label.text]] |
|||
</span> |
|||
<span class="tag is-primary" v-if="label.prob">[[label.prob]]</span> |
|||
</div> |
|||
</div> |
|||
</tab> |
|||
</tabs> |
|||
|
|||
</div> |
|||
<hr> |
|||
<div class="content"> |
|||
[[ message_body ]] |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</section> |
|||
<script type="text/javascript" src="{% static 'annotation.js' %}"></script> |
|||
</div> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" |
|||
crossorigin="anonymous"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js" integrity="sha256-QHdJObhDO++VITP6S4tMlDHRWMaUOk+s/xWIRgF/YY0=" |
|||
crossorigin="anonymous"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js" integrity="sha256-4PIvl58L9q7iwjT654TQJM+C/acEyoG738iL8B8nhXg=" |
|||
crossorigin="anonymous"></script> |
|||
<script type="text/javascript" src="{% static 'main.js' %}"></script> |
|||
{% endblock %} |
Write
Preview
Loading…
Cancel
Save