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.

190 lines
6.6 KiB

  1. div.columns(v-cloak="")
  2. aside.column.is-3.aside.hero.is-fullheight
  3. div
  4. div.main.pr20.pl20
  5. div.field.has-addons
  6. div.control.is-expanded
  7. input.input(
  8. v-model="searchQuery"
  9. v-on:keyup.enter="submit"
  10. type="text"
  11. placeholder="Search document"
  12. style="border-right: none; box-shadow: none; -webkit-box-shadow: none;"
  13. )
  14. div.control
  15. div.dropdown.is-hoverable.is-right
  16. div.dropdown-trigger
  17. button.button(
  18. aria-haspopup="true"
  19. aria-controls="dropdown-menu"
  20. style="border-left: none"
  21. )
  22. span.icon.has-text-grey.pr0
  23. i.fas.fa-angle-down(aria-hidden="true")
  24. div.dropdown-menu.pt0#dropdown-menu(role="menu")
  25. div.dropdown-content
  26. a.dropdown-item
  27. label.radio
  28. input(
  29. v-model="picked"
  30. type="radio"
  31. value="all"
  32. checked=""
  33. )
  34. | All
  35. a.dropdown-item
  36. label.radio
  37. input(
  38. v-model="picked"
  39. type="radio"
  40. value="active"
  41. )
  42. | Active
  43. a.dropdown-item
  44. label.radio
  45. input(
  46. v-model="picked"
  47. type="radio"
  48. value="completed"
  49. )
  50. | Completed
  51. div.main.pt0.pb0.pr20.pl20
  52. span About {{ count }} results (page {{ paginationPage }} of {{ paginationPages }})
  53. div.main.pt0.pb0.pr20.pl20
  54. div.select
  55. select(v-model="ordering")
  56. option(value="", disabled, selected) Sort by
  57. option(value="created_at") Created : Ascending
  58. option(value="-created_at") Created : Descending
  59. option(value="updated_at") Updated : Ascending
  60. option(value="-updated_at") Updated : Descending
  61. div.main.sidebar-scrollable
  62. a.item(
  63. v-for="(doc, index) in docs"
  64. v-bind:class="{ active: index == pageNumber }"
  65. v-bind:data-preview-id="index"
  66. v-on:click="pageNumber = index"
  67. href="#"
  68. )
  69. span.icon
  70. i.fa.fa-check(v-show="annotations[index] && annotations[index].length")
  71. span.name {{ doc.text.slice(0, 60) }}...
  72. div.column.is-7.is-offset-1.message.hero.is-fullheight#message-pane
  73. div.modal(v-bind:class="{ 'is-active': isAnnotationGuidelineActive }")
  74. div.modal-background
  75. div.modal-card
  76. header.modal-card-head
  77. p.modal-card-title Annotation Guideline
  78. button.delete(
  79. v-on:click="isAnnotationGuidelineActive = !isAnnotationGuidelineActive"
  80. aria-label="close"
  81. )
  82. section.modal-card-body.modal-card-body-footer.content(
  83. v-html="compiledMarkdown"
  84. style="line-height: 150%"
  85. )
  86. div.modal(v-bind:class="{ 'is-active': isMetadataActive }")
  87. div.modal-background
  88. div.modal-card
  89. header.modal-card-head
  90. p.modal-card-title Document Metadata
  91. button.delete(
  92. v-on:click="isMetadataActive = !isMetadataActive"
  93. aria-label="close"
  94. )
  95. section.modal-card-body.modal-card-body-footer
  96. vue-json-pretty(
  97. v-bind:data="documentMetadata"
  98. v-bind:show-double-quotes="false"
  99. v-bind:show-line="false"
  100. )
  101. div.columns.is-multiline.is-gapless.is-mobile.is-vertical-center
  102. div.column.is-3
  103. progress.progress.is-inline-block(
  104. v-bind:class="progressColor"
  105. v-bind:value="achievement"
  106. max="100"
  107. ) 30%
  108. div.column.is-6
  109. span.ml10
  110. strong {{ total - remaining }}
  111. | /
  112. span {{ total }}
  113. div.column.is-1.has-text-right
  114. a.button.tooltip.is-tooltip-bottom(
  115. v-if="isAnnotationApprover"
  116. v-on:click="approveDocumentAnnotations"
  117. v-bind:data-tooltip="documentAnnotationsApprovalTooltip"
  118. )
  119. span.icon
  120. i.far(v-bind:class="[documentAnnotationsAreApproved ? 'fa-check-circle' : 'fa-circle']")
  121. div.column.is-1.has-text-right
  122. a.button(v-on:click="isAnnotationGuidelineActive = !isAnnotationGuidelineActive")
  123. span.icon
  124. i.fas.fa-book
  125. div.column.is-1.has-text-right
  126. a.button(
  127. v-on:click="isMetadataActive = !isMetadataActive && documentMetadata != null"
  128. v-bind:disabled="documentMetadata == null"
  129. v-bind:title="documentMetadata == null ? 'No document metadata available.' : null"
  130. )
  131. span.icon
  132. i.fas.fa-box
  133. div.columns
  134. div.column
  135. block annotation-area
  136. div.column(v-if="documentMetadata != null && documentMetadata.documentSourceUrl != null")
  137. preview(v-bind:url="documentMetadata.documentSourceUrl")
  138. div.level.mt30
  139. div.level-left
  140. div.buttons
  141. a.button(
  142. v-shortkey="{ prev1: ['shift', 'ctrl', 'p'], prev2: ['shift', 'arrowup'], prev3: ['shift', 'arrowleft'] }"
  143. v-on:click="prevPagination"
  144. v-on:shortkey="prevPagination"
  145. )
  146. span.icon.tooltip(data-tooltip="Previous page")
  147. i.fas.fa-arrow-left
  148. a.button(
  149. v-shortkey="{ prev1: ['ctrl', 'p'], prev2: ['arrowup'], prev3: ['arrowleft'] }"
  150. v-on:click="prevPage"
  151. v-on:shortkey="prevPage"
  152. )
  153. span.icon.tooltip(data-tooltip="Previous document")
  154. i.fas.fa-chevron-left
  155. div.level-center
  156. span.button.is-static {{ offset + pageNumber + 1 }} / {{ count }}
  157. div.level-right
  158. div.buttons
  159. a.button(
  160. v-shortkey="{ next1: ['ctrl', 'n'], next2: ['arrowdown'], next3: ['arrowright'] }"
  161. v-on:click="nextPage"
  162. v-on:shortkey="nextPage"
  163. )
  164. span.icon.tooltip(data-tooltip="Next document")
  165. i.fas.fa-chevron-right
  166. a.button(
  167. v-shortkey="{ next1: ['shift', 'ctrl', 'n'], next2: ['shift', 'arrowdown'], next3: ['shift', 'arrowright'] }"
  168. v-on:click="nextPagination"
  169. v-on:shortkey="nextPagination"
  170. )
  171. span.icon.tooltip(data-tooltip="Next page")
  172. i.fas.fa-arrow-right