minicard.jade 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. template(name="minicard")
  2. .minicard(
  3. class="{{#if isImportedCard}}imported-card{{/if}}"
  4. class="{{#if isImportedBoard}}imported-board{{/if}}")
  5. if cover
  6. .minicard-cover(style="background-image: url('{{cover.url}}');")
  7. if labels
  8. .minicard-labels
  9. each labels
  10. .minicard-label(class="card-label-{{color}}" title="{{name}}")
  11. .minicard-title
  12. if $eq 'prefix-with-full-path' currentBoard.presentParentTask
  13. .parent-prefix
  14. | {{ parentString ' > ' }}
  15. if $eq 'prefix-with-parent' currentBoard.presentParentTask
  16. .parent-prefix
  17. | {{ parentCardName }}
  18. if isImportedBoard
  19. a.js-imported-link
  20. span.imported-icon.fa.fa-folder
  21. else if isImportedCard
  22. a.js-imported-link
  23. span.imported-icon.fa.fa-id-card
  24. if getArchived
  25. span.imported-icon.imported-archived.fa.fa-archive
  26. +viewer
  27. = getTitle
  28. if $eq 'subtext-with-full-path' currentBoard.presentParentTask
  29. .parent-subtext
  30. | {{ parentString ' > ' }}
  31. if $eq 'subtext-with-parent' currentBoard.presentParentTask
  32. .parent-subtext
  33. | {{ parentCardName }}
  34. .dates
  35. if getReceived
  36. unless getStart
  37. unless getDue
  38. unless getEnd
  39. .date
  40. +minicardReceivedDate
  41. if getStart
  42. .date
  43. +minicardStartDate
  44. if getDue
  45. .date
  46. +minicardDueDate
  47. if getSpentTime
  48. .date
  49. +cardSpentTime
  50. .minicard-custom-fields
  51. each customFieldsWD
  52. if definition.showOnCard
  53. .minicard-custom-field
  54. .minicard-custom-field-item
  55. = definition.name
  56. .minicard-custom-field-item
  57. +viewer
  58. = trueValue
  59. if getMembers
  60. .minicard-members.js-minicard-members
  61. each getMembers
  62. +userAvatar(userId=this)
  63. .badges
  64. if comments.count
  65. .badge(title="{{_ 'card-comments-title' comments.count }}")
  66. span.badge-icon.fa.fa-comment-o.badge-comment
  67. span.badge-text= comments.count
  68. if getDescription
  69. .badge.badge-state-image-only(title=getDescription)
  70. span.badge-icon.fa.fa-align-left
  71. if attachments.count
  72. .badge
  73. span.badge-icon.fa.fa-paperclip
  74. span.badge-text= attachments.count
  75. if checklists.count
  76. .badge(class="{{#if checklistFinished}}is-finished{{/if}}")
  77. span.badge-icon.fa.fa-check-square-o
  78. span.badge-text.check-list-text {{checklistFinishedCount}}/{{checklistItemCount}}