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.

128 lines
4.8 KiB

  1. {% extends "base.html" %}
  2. {% load static %}
  3. {% block header %}
  4. <link rel="stylesheet" href="{% static 'css/annotation.css' %}">
  5. <script src="https://unpkg.com/marked@0.3.6"></script>
  6. <script src="https://unpkg.com/lodash@4.16.0"></script>
  7. {% endblock %}
  8. {% block navigation %}
  9. <a class="navbar-item" href="{% url 'dataset' view.kwargs.project_id %}">
  10. <span class="icon">
  11. <i class="fas fa-edit"></i>
  12. </span>
  13. <b>Edit Data</b>
  14. </a>
  15. {% endblock %}
  16. {% block content %}
  17. <div class="columns" id="mail-app" v-cloak>
  18. <aside class="column is-3 aside hero is-fullheight">
  19. <div>
  20. <div class="main pr20 pl20">
  21. <div class="field has-addons">
  22. <div class="control is-expanded">
  23. <input class="input" type="text" placeholder="Search document" v-model="searchQuery" @keyup.enter="submit" style="border-right:none;box-shadow: none;-webkit-box-shadow: none;">
  24. </div>
  25. <div class="control">
  26. <div class="dropdown is-hoverable is-right">
  27. <div class="dropdown-trigger">
  28. <button class="button" aria-haspopup="true" aria-controls="dropdown-menu" style="border-left:none">
  29. <span class="icon has-text-grey pr0">
  30. <i class="fas fa-angle-down" aria-hidden="true"></i>
  31. </span>
  32. </button>
  33. </div>
  34. <div class="dropdown-menu pt0" id="dropdown-menu" role="menu">
  35. <div class="dropdown-content">
  36. <a class="dropdown-item">
  37. <label class="radio">
  38. <input type="radio" value="all" v-model="picked" checked> All
  39. </label>
  40. </a>
  41. <a class="dropdown-item">
  42. <label class="radio">
  43. <input type="radio" value="active" v-model="picked"> Active
  44. </label>
  45. </a>
  46. <a class="dropdown-item">
  47. <label class="radio">
  48. <input type="radio" value="completed" v-model="picked"> Completed
  49. </label>
  50. </a>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="main pt0 pb0 pr20 pl20">
  58. <span>About [[ count ]] results</span>
  59. </div>
  60. <div class="main">
  61. <a href="#" class="item" v-for="(doc, index) in docs" v-bind:class="{ active: index == pageNumber }" v-on:click="pageNumber = index"
  62. v-bind:data-preview-id="index">
  63. <span class="icon">
  64. <i class="fa fa-check" v-show="annotations[index] && annotations[index].length"></i>
  65. </span>
  66. <span class="name">[[ doc.text.slice(0, 60) ]]...</span>
  67. </a>
  68. </div>
  69. </div>
  70. </aside>
  71. <div class="column is-7 is-offset-1 message hero is-fullheight" id="message-pane">
  72. <!-- Modal card for creating project. -->
  73. <div class="modal" :class="{ 'is-active': isActive }">
  74. <div class="modal-background"></div>
  75. <div class="modal-card">
  76. <header class="modal-card-head">
  77. <p class="modal-card-title">Annotation Guideline</p>
  78. <button class="delete" aria-label="close" @click="isActive=!isActive"></button>
  79. </header>
  80. <section class="modal-card-body modal-card-body-footer content"
  81. style="line-height:150%"
  82. v-html="compiledMarkdown"></section>
  83. </div>
  84. </div>
  85. <div class="columns is-multiline is-gapless is-mobile is-vertical-center">
  86. <div class="column is-3">
  87. <progress class="progress is-inline-block" v-bind:class="progressColor" v-bind:value="achievement" max="100">30%</progress>
  88. </div>
  89. <div class="column is-8">
  90. <span class="ml10"><strong>[[ total - remaining ]]</strong></span>/<span>[[ total ]]</span>
  91. </div>
  92. <div class="column is-1 has-text-right">
  93. <a class="button" @click="isActive=!isActive">
  94. <span class="icon">
  95. <i class="fas fa-book"></i>
  96. </span>
  97. </a>
  98. </div>
  99. </div>
  100. {% block annotation-area %} {% endblock %}
  101. <div class="level mt30">
  102. <a class="button level-left" v-on:click="prevPage" v-shortkey="{prev1: ['ctrl', 'p'], prev2: ['arrowup'], prev3: ['arrowleft']}"
  103. @shortkey="prevPage">
  104. <span class="icon">
  105. <i class="fas fa-chevron-left"></i>
  106. </span>
  107. <span>Prev</span>
  108. </a>
  109. <a class="button level-right" v-on:click="nextPage" v-shortkey="{next1: ['ctrl', 'n'], next2: ['arrowdown'], next3: ['arrowright']}"
  110. @shortkey="nextPage">
  111. <span>Next</span>
  112. <span class="icon">
  113. <i class="fas fa-chevron-right"></i>
  114. </span>
  115. </a>
  116. </div>
  117. </div>
  118. </div>
  119. {% endblock %}