attachments.jade 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. template(name="cardAttachmentsPopup")
  2. ul.pop-over-list
  3. li
  4. input.js-attach-file.hide(type="file" name="file" multiple)
  5. a.js-computer-upload {{_ 'computer'}}
  6. li
  7. a.js-upload-clipboard-image {{_ 'clipboard'}}
  8. template(name="previewClipboardImagePopup")
  9. p <kbd>Ctrl</kbd>+<kbd>V</kbd> {{_ "paste-or-dragdrop"}}
  10. img.preview-clipboard-image()
  11. button.primary.js-upload-pasted-image {{_ 'upload'}}
  12. template(name="previewAttachedImagePopup")
  13. img.preview-large-image.js-large-image-clicked(src="{{url}}")
  14. template(name="attachmentDeletePopup")
  15. p {{_ "attachment-delete-pop"}}
  16. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  17. template(name="attachmentsGalery")
  18. .attachments-galery
  19. each attachments
  20. .attachment-item
  21. a.attachment-thumbnail.swipebox(href="{{url}}" title="{{name}}")
  22. if isUploaded
  23. if isImage
  24. img.attachment-thumbnail-img(src="{{url}}")
  25. else if($eq extension 'mp3')
  26. video(width="100%" height="100%" controls="true")
  27. source(src="{{url}}" type="audio/mpeg")
  28. else if($eq extension 'ogg')
  29. video(width="100%" height="100%" controls="true")
  30. source(src="{{url}}" type="video/ogg")
  31. else if($eq extension 'webm')
  32. video(width="100%" height="100%" controls="true")
  33. source(src="{{url}}" type="video/webm")
  34. else if($eq extension 'mp4')
  35. video(width="100%" height="100%" controls="true")
  36. source(src="{{url}}" type="video/mp4")
  37. else
  38. span.attachment-thumbnail-ext= extension
  39. else
  40. +spinner
  41. p.attachment-details
  42. = name
  43. span.file-size ({{fileSize size}} KB)
  44. span.attachment-details-actions
  45. a.js-download(href="{{url download=true}}")
  46. i.fa.fa-download
  47. | {{_ 'download'}}
  48. if currentUser.isBoardMember
  49. unless currentUser.isCommentOnly
  50. unless currentUser.isWorker
  51. if isImage
  52. a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}")
  53. i.fa.fa-thumb-tack
  54. if($eq ../coverId _id)
  55. | {{_ 'remove-cover'}}
  56. else
  57. | {{_ 'add-cover'}}
  58. if currentUser.isBoardAdmin
  59. a.js-confirm-delete
  60. i.fa.fa-close
  61. | {{_ 'delete'}}
  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