attachments.jade 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. template(name="attachments")
  2. .setting-content.attachments-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-body
  7. .side-menu
  8. ul
  9. li
  10. a.js-move-attachments(data-id="move-attachments")
  11. i.fa.fa-arrow-right
  12. | {{_ 'attachment-move'}}
  13. .main-body
  14. if loading.get
  15. +spinner
  16. else if showMoveAttachments.get
  17. +moveAttachments
  18. template(name="moveAttachments")
  19. .move-attachment-buttons
  20. .js-move-attachment
  21. button.js-move-all-attachments-to-fs {{_ 'move-all-attachments-to-fs'}}
  22. .js-move-attachment
  23. button.js-move-all-attachments-to-gridfs {{_ 'move-all-attachments-to-gridfs'}}
  24. .js-move-attachment
  25. button.js-move-all-attachments-to-s3 {{_ 'move-all-attachments-to-s3'}}
  26. each board in getBoardsWithAttachments
  27. +moveBoardAttachments board
  28. template(name="moveBoardAttachments")
  29. hr
  30. .board-description
  31. table
  32. tr
  33. th {{_ 'board'}} ID
  34. th {{_ 'board-title'}}
  35. tr
  36. td {{ _id }}
  37. td {{ title }}
  38. .move-attachment-buttons
  39. .js-move-attachment
  40. button.js-move-all-attachments-of-board-to-fs {{_ 'move-all-attachments-of-board-to-fs'}}
  41. .js-move-attachment
  42. button.js-move-all-attachments-of-board-to-gridfs {{_ 'move-all-attachments-of-board-to-gridfs'}}
  43. .js-move-attachment
  44. button.js-move-all-attachments-of-board-to-s3 {{_ 'move-all-attachments-of-board-to-s3'}}
  45. .board-attachments
  46. table
  47. tr
  48. th {{_ 'card'}}-Id
  49. th {{_ 'attachment'}}-Id
  50. th {{_ 'name'}}
  51. th {{_ 'path'}}
  52. th {{_ 'version-name'}}
  53. th {{_ 'size'}}
  54. th GridFsFileId
  55. th S3FileId
  56. th {{_ 'storage'}}
  57. th {{_ 'action'}}
  58. each attachment in attachments
  59. +moveAttachment attachment
  60. template(name="moveAttachment")
  61. each version in flatVersion
  62. tr
  63. td {{ meta.cardId }}
  64. td {{ _id }}
  65. td {{ name }}
  66. td {{ version.path }}
  67. td {{ version.versionName }}
  68. td {{ fileSize version.size }}
  69. td {{ version.meta.gridFsFileId }}
  70. td {{ version.meta.s3FileId }}
  71. td {{ version.storageName }}
  72. td
  73. if $neq version.storageName "fs"
  74. button.js-move-storage-fs
  75. i.fa.fa-arrow-right
  76. | {{_ 'attachment-move-storage-fs'}}
  77. if $neq version.storageName "gridfs"
  78. if version.storageName
  79. button.js-move-storage-gridfs
  80. i.fa.fa-arrow-right
  81. | {{_ 'attachment-move-storage-gridfs'}}
  82. if $neq version.storageName "s3"
  83. if version.storageName
  84. button.js-move-storage-s3
  85. i.fa.fa-arrow-right
  86. | {{_ 'attachment-move-storage-s3'}}