adminReports.jade 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. template(name="adminReports")
  2. .setting-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-body
  7. .side-menu
  8. ul
  9. li
  10. a.js-report-broken(data-id="report-broken")
  11. i.fa.fa-chain-broken
  12. | {{_ 'broken-cards'}}
  13. li
  14. a.js-report-files(data-id="report-orphaned-files")
  15. i.fa.fa-paperclip
  16. | {{_ 'orphanedFilesReportTitle'}}
  17. li
  18. a.js-report-files(data-id="report-files")
  19. i.fa.fa-paperclip
  20. | {{_ 'filesReportTitle'}}
  21. .main-body
  22. if loading.get
  23. +spinner
  24. else if showBrokenCardsReport.get
  25. +brokenCardsReport
  26. else if showFilesReport.get
  27. +filesReport
  28. else if showOrphanedFilesReport.get
  29. +orphanedFilesReport
  30. template(name="brokenCardsReport")
  31. .global-search-results-list-wrapper
  32. h1 {{_ 'broken-cards'}}
  33. if resultsCount
  34. +resultsPaged(this)
  35. else
  36. div {{_ 'no-results' }}
  37. template(name="filesReport")
  38. h1 {{_ 'filesReportTitle'}}
  39. if resultsCount
  40. table.table
  41. tr
  42. th Filename
  43. th.right Size (kB)
  44. th MIME Type
  45. th.center Usage
  46. th MD5 Sum
  47. th ID
  48. each att in attachmentFiles
  49. tr
  50. td {{ att.filename }}
  51. td.right {{fileSize att.length }}
  52. td {{ att.contentType }}
  53. td.center {{usageCount att._id.toHexString }}
  54. td {{ att.md5 }}
  55. td {{ att._id.toHexString }}
  56. else
  57. div {{_ 'no-results' }}
  58. template(name="orphanedFilesReport")
  59. h1 {{_ 'orphanedFilesReportTitle'}}
  60. if resultsCount
  61. table.table
  62. tr
  63. th Filename
  64. th.right Size (kB)
  65. th MIME Type
  66. th MD5 Sum
  67. th ID
  68. each att in attachmentFiles
  69. tr
  70. td {{ att.filename }}
  71. td.right {{fileSize att.length }}
  72. td {{ att.contentType }}
  73. td {{ att.md5 }}
  74. td {{ att._id.toHexString }}
  75. else
  76. div {{_ 'no-results' }}