attachments.jade 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 {{_ 'storage'}}
  56. th {{_ 'action'}}
  57. each attachment in attachments
  58. +moveAttachment attachment
  59. template(name="moveAttachment")
  60. each version in flatVersion
  61. tr
  62. td {{ meta.cardId }}
  63. td {{ _id }}
  64. td {{ name }}
  65. td {{ version.path }}
  66. td {{ version.versionName }}
  67. td {{ fileSize version.size }}
  68. td {{ version.meta.gridFsFileId }}
  69. td {{ version.meta.s3FileId }}
  70. td {{ version.storageName }}
  71. td
  72. if $neq version.storageName "fs"
  73. button.js-move-storage-fs
  74. i.fa.fa-arrow-right
  75. | {{_ 'attachment-move-storage-fs'}}
  76. if $neq version.storageName "gridfs"
  77. if version.storageName
  78. button.js-move-storage-gridfs
  79. i.fa.fa-arrow-right
  80. | {{_ 'attachment-move-storage-gridfs'}}
  81. if $neq version.storageName "s3"
  82. if version.storageName
  83. button.js-move-storage-s3
  84. i.fa.fa-arrow-right
  85. | {{_ 'attachment-move-storage-s3'}}