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.

191 lines
6.7 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-thumbs-up(v-show="annotations[index] && docs[index].annotation_approver")
  71. i.fa.fa-check(v-show="annotations[index] && annotations[index].length && !docs[index].annotation_approver")
  72. span.name {{ doc.text.slice(0, 60) }}...
  73. div.column.is-7.is-offset-1.message.hero.is-fullheight#message-pane
  74. div.modal(v-bind:class="{ 'is-active': isAnnotationGuidelineActive }")
  75. div.modal-background
  76. div.modal-card
  77. header.modal-card-head
  78. p.modal-card-title Annotation Guideline
  79. button.delete(
  80. v-on:click="isAnnotationGuidelineActive = !isAnnotationGuidelineActive"
  81. aria-label="close"
  82. )
  83. section.modal-card-body.modal-card-body-footer.content(
  84. v-html="compiledMarkdown"
  85. style="line-height: 150%"
  86. )
  87. div.modal(v-bind:class="{ 'is-active': isMetadataActive }")
  88. div.modal-background
  89. div.modal-card
  90. header.modal-card-head
  91. p.modal-card-title Document Metadata
  92. button.delete(
  93. v-on:click="isMetadataActive = !isMetadataActive"
  94. aria-label="close"
  95. )
  96. section.modal-card-body.modal-card-body-footer
  97. vue-json-pretty(
  98. v-bind:data="documentMetadata"
  99. v-bind:show-double-quotes="false"
  100. v-bind:show-line="false"
  101. )
  102. div.columns.is-multiline.is-gapless.is-mobile.is-vertical-center
  103. div.column.is-3
  104. progress.progress.is-inline-block(
  105. v-bind:class="progressColor"
  106. v-bind:value="achievement"
  107. max="100"
  108. ) 30%
  109. div.column.is-6
  110. span.ml10
  111. strong {{ total - remaining }}
  112. | /
  113. span {{ total }}
  114. div.column.is-1.has-text-right
  115. a.button.tooltip.is-tooltip-bottom(
  116. v-if="isAnnotationApprover"
  117. v-on:click="approveDocumentAnnotations"
  118. v-bind:data-tooltip="documentAnnotationsApprovalTooltip"
  119. )
  120. span.icon
  121. i.far(v-bind:class="[documentAnnotationsAreApproved ? 'fa-check-circle' : 'fa-circle']")
  122. div.column.is-1.has-text-right
  123. a.button(v-on:click="isAnnotationGuidelineActive = !isAnnotationGuidelineActive")
  124. span.icon
  125. i.fas.fa-book
  126. div.column.is-1.has-text-right
  127. a.button(
  128. v-on:click="isMetadataActive = !isMetadataActive && documentMetadata != null"
  129. v-bind:disabled="documentMetadata == null"
  130. v-bind:title="documentMetadata == null ? 'No document metadata available.' : null"
  131. )
  132. span.icon
  133. i.fas.fa-box
  134. div.columns
  135. div.column
  136. block annotation-area
  137. div.column(v-if="documentMetadata != null && documentMetadata.documentSourceUrl != null")
  138. preview(v-bind:url="documentMetadata.documentSourceUrl")
  139. div.level.mt30
  140. div.level-left
  141. div.buttons
  142. a.button(
  143. v-shortkey="{ prev1: ['shift', 'ctrl', 'p'], prev2: ['shift', 'arrowup'], prev3: ['shift', 'arrowleft'] }"
  144. v-on:click="prevPagination"
  145. v-on:shortkey="prevPagination"
  146. )
  147. span.icon.tooltip(data-tooltip="Previous page")
  148. i.fas.fa-arrow-left
  149. a.button(
  150. v-shortkey="{ prev1: ['ctrl', 'p'], prev2: ['arrowup'], prev3: ['arrowleft'] }"
  151. v-on:click="prevPage"
  152. v-on:shortkey="prevPage"
  153. )
  154. span.icon.tooltip(data-tooltip="Previous document")
  155. i.fas.fa-chevron-left
  156. div.level-center
  157. span.button.is-static {{ offset + pageNumber + 1 }} / {{ count }}
  158. div.level-right
  159. div.buttons
  160. a.button(
  161. v-shortkey="{ next1: ['ctrl', 'n'], next2: ['arrowdown'], next3: ['arrowright'] }"
  162. v-on:click="nextPage"
  163. v-on:shortkey="nextPage"
  164. )
  165. span.icon.tooltip(data-tooltip="Next document")
  166. i.fas.fa-chevron-right
  167. a.button(
  168. v-shortkey="{ next1: ['shift', 'ctrl', 'n'], next2: ['shift', 'arrowdown'], next3: ['shift', 'arrowright'] }"
  169. v-on:click="nextPagination"
  170. v-on:shortkey="nextPagination"
  171. )
  172. span.icon.tooltip(data-tooltip="Next page")
  173. i.fas.fa-arrow-right