minicard.jade 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 isImported
  19. span.imported-icon.fa.fa-share-alt
  20. +viewer
  21. = getTitle
  22. if $eq 'subtext-with-full-path' currentBoard.presentParentTask
  23. .parent-subtext
  24. | {{ parentString ' > ' }}
  25. if $eq 'subtext-with-parent' currentBoard.presentParentTask
  26. .parent-subtext
  27. | {{ parentCardName }}
  28. .dates
  29. if getReceived
  30. unless getStart
  31. unless getDue
  32. unless getEnd
  33. .date
  34. +minicardReceivedDate
  35. if getStart
  36. .date
  37. +minicardStartDate
  38. if getDue
  39. .date
  40. +minicardDueDate
  41. if getSpentTime
  42. .date
  43. +cardSpentTime
  44. .minicard-custom-fields
  45. each customFieldsWD
  46. if definition.showOnCard
  47. .minicard-custom-field
  48. .minicard-custom-field-item
  49. = definition.name
  50. .minicard-custom-field-item
  51. +viewer
  52. = trueValue
  53. if getMembers
  54. .minicard-members.js-minicard-members
  55. each getMembers
  56. +userAvatar(userId=this)
  57. .badges
  58. if comments.count
  59. .badge(title="{{_ 'card-comments-title' comments.count }}")
  60. span.badge-icon.fa.fa-comment-o.badge-comment
  61. span.badge-text= comments.count
  62. if getDescription
  63. .badge.badge-state-image-only(title=getDescription)
  64. span.badge-icon.fa.fa-align-left
  65. if attachments.count
  66. .badge
  67. span.badge-icon.fa.fa-paperclip
  68. span.badge-text= attachments.count
  69. if checklists.count
  70. .badge(class="{{#if checklistFinished}}is-finished{{/if}}")
  71. span.badge-icon.fa.fa-check-square-o
  72. span.badge-text.check-list-text {{checklistFinishedCount}}/{{checklistItemCount}}