attachments.jade 2.3 KB

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