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.

101 lines
4.9 KiB

  1. {% extends "base.html" %} {% load static %} {% block header %}
  2. <link rel="stylesheet" type="text/css" href="{% static 'inbox.css' %}"> {% endblock %} {% block content %}
  3. <div class="columns" id="mail-app">
  4. <aside class="column is-2 aside hero is-fullheight">
  5. <div>
  6. <aside class="menu">
  7. <p class="menu-label" style="color:#f2f2f2;">
  8. Progress
  9. </p>
  10. <ul class="menu-list">
  11. <li class="has-text-grey-light level" style="padding-left:10px;margin-bottom:0;font-size:14px">
  12. <span class="level-left">Achievement</span>
  13. <span class="level-right">[[ achievement ]]%</span>
  14. </li>
  15. <li>
  16. <progress class="progress" v-bind:class="progressColor" v-bind:value="achievement" max="100">30%</progress>
  17. </li>
  18. </ul>
  19. </aside>
  20. <aside class="menu">
  21. <p class="menu-label" style="color:#f2f2f2;">
  22. Labels
  23. </p>
  24. <ul class="menu-list">
  25. <div class="control" v-for="(label, label_id) in labels">
  26. <li class="tags has-addons">
  27. <span class="tag is-primary">[[label.shortcut]]</span>
  28. <a class="tag is-grey" v-on:click="addLabel(label.id)" v-shortkey.once="['ctrl', [[ label.shortcut ]]]" @shortkey="addLabel(label.id)">[[label.text]]</a>
  29. </li>
  30. </div>
  31. </ul>
  32. </aside>
  33. </div>
  34. </aside>
  35. <div class="column is-3 messages hero is-fullheight" id="message-feed">
  36. <div class="field has-addons" style="margin:0 10px;">
  37. <div class="control is-expanded">
  38. <input class="input" type="text" placeholder="Find a document" v-model="searchQuery" @keyup.enter="submit" style="border-right:none;box-shadow: none;-webkit-box-shadow: none;">
  39. </div>
  40. <div class="control">
  41. <div class="dropdown is-hoverable">
  42. <div class="dropdown-trigger">
  43. <button class="button" aria-haspopup="true" aria-controls="dropdown-menu" style="border-left:none">
  44. <span class="icon">
  45. <i class="fas fa-angle-down" aria-hidden="true"></i>
  46. </span>
  47. </button>
  48. </div>
  49. <div class="dropdown-menu" id="dropdown-menu" role="menu">
  50. <div class="dropdown-content">
  51. <a href="#" class="dropdown-item">
  52. Default
  53. </a>
  54. <a class="dropdown-item">
  55. Active
  56. </a>
  57. <a href="#" class="dropdown-item">
  58. Complete
  59. </a>
  60. <a href="#" class="dropdown-item">
  61. Probability
  62. </a>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="inbox-messages" id="inbox-messages" v-if="items.length">
  69. <div v-for="(msg, index) in items" class="card" v-bind:class="{ active: index == cur }" v-on:click="showMessage(index)" v-bind:data-preview-id="index">
  70. <div class="card-content" style="padding:1.2rem;">
  71. <div class="msg-snippet">
  72. <p>[[ msg.text.slice(0, 100) ]]</p>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="column is-7 message hero is-fullheight" id="message-pane">
  79. <div class="action-buttons">
  80. <div class="control is-grouped">
  81. <a class="button is-small" v-on:click="prevPage" v-shortkey="['ctrl', 'p']" @shortkey="prevPage">
  82. <i class="fa fa-chevron-left"></i>
  83. </a>
  84. <a class="button is-small" v-on:click="nextPage" v-shortkey="['ctrl', 'n']" @shortkey="nextPage">
  85. <i class="fa fa-chevron-right"></i>
  86. </a>
  87. </div>
  88. </div>
  89. <div class="box message-preview">
  90. <div class="tags">
  91. <a v-for="label in labels" class="tag" v-bind:style="{ color: label.text_color, backgroundColor: label.background_color }" v-on:click="annotate(label.id)">[[ label.text ]]</a>
  92. </div>
  93. <hr>
  94. <annotator ref="annotator" v-bind:labels="labels" v-bind:entity-positions="items[cur].labels.slice()" v-bind:text="items[cur].text" @delete-label="deleteLabel"></annotator>
  95. </div>
  96. </div>
  97. </div>
  98. <script type="text/javascript" src="{% static 'sequence_labeling.js' %}"></script>
  99. {% endblock %}