attachments.jade 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. template(name="cardAttachmentsPopup")
  2. with currentUpload
  3. .attachment-upload {{_ 'uploading'}}
  4. table
  5. tr
  6. th.upload-file-name-descr {{_ 'name'}}
  7. th.upload-progress-descr {{_ 'progress'}}
  8. th.upload-remaining-descr {{_ 'remaining_time'}}
  9. th.upload-speed-descr {{_ 'speed'}}
  10. tr
  11. td.upload-file-name-value {{file.name}}
  12. td.upload-progress-value {{progress.get}}%
  13. td.upload-remaining-value {{getEstimateTime}}
  14. td.upload-speed-value {{getEstimateSpeed}}
  15. else
  16. ul.pop-over-list
  17. li
  18. input.js-attach-file.hide(type="file" name="file" multiple)
  19. a.js-computer-upload {{_ 'computer'}}
  20. li
  21. a.js-upload-clipboard-image {{_ 'clipboard'}}
  22. template(name="previewClipboardImagePopup")
  23. p <kbd>Ctrl</kbd>+<kbd>V</kbd> {{_ "paste-or-dragdrop"}}
  24. img.preview-clipboard-image()
  25. button.primary.js-upload-pasted-image {{_ 'upload'}}
  26. template(name="attachmentDeletePopup")
  27. p {{_ "attachment-delete-pop"}}
  28. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  29. template(name="attachmentsGalery")
  30. .attachments-galery
  31. each attachments
  32. .attachment-item
  33. a.attachment-thumbnail.swipebox(href="{{link}}" title="{{name}}")
  34. if link
  35. if isImage
  36. img.attachment-thumbnail-img(src="{{link}}")
  37. else if($eq extension 'mp3')
  38. video(width="100%" height="100%" controls="true")
  39. source(src="{{link}}" type="audio/mpeg")
  40. else if($eq extension 'ogg')
  41. video(width="100%" height="100%" controls="true")
  42. source(src="{{link}}" type="video/ogg")
  43. else if($eq extension 'webm')
  44. video(width="100%" height="100%" controls="true")
  45. source(src="{{link}}" type="video/webm")
  46. else if($eq extension 'mp4')
  47. video(width="100%" height="100%" controls="true")
  48. source(src="{{link}}" type="video/mp4")
  49. else
  50. span.attachment-thumbnail-ext= extension
  51. p.attachment-details
  52. = name
  53. span.file-size ({{fileSize size}} KB)
  54. span.attachment-details-actions
  55. a.js-download(href="{{link}}?download=true", download="{{name}}")
  56. i.fa.fa-download
  57. | {{_ 'download'}}
  58. if currentUser.isBoardMember
  59. unless currentUser.isCommentOnly
  60. unless currentUser.isWorker
  61. a.fa.fa-navicon.attachment-details-menu.js-open-attachment-menu(title="{{_ 'attachmentActionsPopup-title'}}")
  62. if currentUser.isBoardMember
  63. unless currentUser.isCommentOnly
  64. unless currentUser.isWorker
  65. //li.attachment-item.add-attachment
  66. a.js-add-attachment(title="{{_ 'add-attachment' }}")
  67. i.fa.fa-plus
  68. template(name="attachmentActionsPopup")
  69. ul.pop-over-list
  70. li
  71. if isImage
  72. a(class="{{#if isCover}}js-remove-cover{{else}}js-add-cover{{/if}}")
  73. i.fa.fa-thumb-tack
  74. if isCover
  75. | {{_ 'remove-cover'}}
  76. else
  77. | {{_ 'add-cover'}}
  78. if currentUser.isBoardAdmin
  79. a.js-rename
  80. i.fa.fa-pencil-square-o
  81. | {{_ 'rename'}}
  82. a.js-confirm-delete
  83. i.fa.fa-close
  84. | {{_ 'delete'}}
  85. p.attachment-storage
  86. | {{versions.original.storage}}
  87. if $neq versions.original.storage "fs"
  88. a.js-move-storage-fs
  89. i.fa.fa-arrow-right
  90. | {{_ 'attachment-move-storage-fs'}}
  91. if $neq versions.original.storage "gridfs"
  92. if versions.original.storage
  93. a.js-move-storage-gridfs
  94. i.fa.fa-arrow-right
  95. | {{_ 'attachment-move-storage-gridfs'}}
  96. template(name="attachmentRenamePopup")
  97. input.js-edit-attachment-name(type='text' autofocus value="{{getNameWithoutExtension}}" dir="auto")
  98. .edit-controls.clearfix
  99. button.primary.confirm.js-submit-edit-attachment-name(type="submit") {{_ 'save'}}