binary-file-header.pug 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. div.binary-file-header
  2. // Linked Files: URL
  3. div(ng-if="openFile.linkedFileData.provider == 'url'")
  4. p
  5. i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
  6. | Imported from
  7. |
  8. a(ng-href='{{openFile.linkedFileData.url}}') {{ displayUrl(openFile.linkedFileData.url) }}
  9. |
  10. | at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}
  11. // Linked Files: Project File
  12. div(ng-if="openFile.linkedFileData.provider == 'project_file'")
  13. p
  14. i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
  15. | Imported from
  16. |
  17. a(ng-if='!openFile.linkedFileData.v1_source_doc_id'
  18. ng-href='/project/{{openFile.linkedFileData.source_project_id}}' target="_blank")
  19. | Another project
  20. span(ng-if='openFile.linkedFileData.v1_source_doc_id')
  21. | Another project
  22. | /{{ openFile.linkedFileData.source_entity_path.slice(1) }},
  23. |
  24. | at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}
  25. // Linked Files: Project Output File
  26. div(ng-if="openFile.linkedFileData.provider == 'project_output_file'")
  27. p
  28. i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
  29. | Imported from the output of
  30. |
  31. a(ng-if='!openFile.linkedFileData.v1_source_doc_id'
  32. ng-href='/project/{{openFile.linkedFileData.source_project_id}}' target="_blank")
  33. | Another project
  34. span(ng-if='openFile.linkedFileData.v1_source_doc_id')
  35. | Another project
  36. | : {{ openFile.linkedFileData.source_output_file_path }},
  37. |
  38. | at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}
  39. != moduleIncludes("binaryFile:linkedFileInfo", locals)
  40. // Bottom Controls
  41. span(ng-if="openFile.linkedFileData.provider")
  42. button.btn.btn-success(
  43. href, ng-click="refreshFile(openFile)",
  44. ng-disabled="refreshing"
  45. )
  46. i.fa.fa-fw.fa-refresh(ng-class={'fa-spin': refreshing})
  47. |
  48. span(ng-show="!refreshing") Refresh
  49. span(ng-show="refreshing") Refreshing…
  50. |  
  51. a.btn.btn-info(
  52. ng-href="/project/{{ project_id }}/file/{{ openFile.id }}"
  53. )
  54. i.fa.fa-fw.fa-download
  55. |
  56. | #{translate("download")}
  57. // Refresh Error
  58. div(ng-if="refreshError").row
  59. br
  60. .alert.alert-danger.col-md-6.col-md-offset-3
  61. | Error: {{ refreshError}}
  62. != moduleIncludes("binaryFile:linkedFileRefreshError", locals)