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.

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