attachments.jade 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. each board in getBoardsWithAttachments
  25. +moveBoardAttachments board
  26. template(name="moveBoardAttachments")
  27. hr
  28. .board-description
  29. table
  30. tr
  31. th {{_ 'board'}} ID
  32. th {{_ 'board-title'}}
  33. tr
  34. td {{ _id }}
  35. td {{ title }}
  36. .move-attachment-buttons
  37. .js-move-attachment
  38. button.js-move-all-attachments-of-board-to-fs {{_ 'move-all-attachments-of-board-to-fs'}}
  39. .js-move-attachment
  40. button.js-move-all-attachments-of-board-to-gridfs {{_ 'move-all-attachments-of-board-to-gridfs'}}
  41. .board-attachments
  42. table
  43. tr
  44. th {{_ 'card'}}-Id
  45. th {{_ 'attachment'}}-Id
  46. th {{_ 'name'}}
  47. th {{_ 'path'}}
  48. th {{_ 'version-name'}}
  49. th {{_ 'size'}} (B)
  50. th GridFsFileId
  51. th {{_ 'storage'}}
  52. th {{_ 'action'}}
  53. each attachment in attachments
  54. +moveAttachment attachment
  55. template(name="moveAttachment")
  56. each version in flatVersion
  57. tr
  58. td {{ meta.cardId }}
  59. td {{ _id }}
  60. td {{ name }}
  61. td {{ version.path }}
  62. td {{ version.versionName }}
  63. td {{ version.size }}
  64. td {{ version.meta.gridFsFileId }}
  65. td {{ version.storageName }}
  66. td
  67. if $neq version.storageName "fs"
  68. button.js-move-storage-fs
  69. i.fa.fa-arrow-right
  70. | {{_ 'attachment-move-storage-fs'}}
  71. if $neq version.storageName "gridfs"
  72. if version.storageName
  73. button.js-move-storage-gridfs
  74. i.fa.fa-arrow-right
  75. | {{_ 'attachment-move-storage-gridfs'}}