minicard.jade 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. template(name="minicard")
  2. .minicard(
  3. class="{{#if isLinkedCard}}linked-card{{/if}}"
  4. class="{{#if isLinkedBoard}}linked-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 isLinkedBoard
  19. a.js-linked-link
  20. span.linked-icon.fa.fa-folder
  21. else if isLinkedCard
  22. a.js-linked-link
  23. span.linked-icon.fa.fa-id-card
  24. if getArchived
  25. span.linked-icon.linked-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. if definition.showLabelOnMiniCard
  55. .minicard-custom-field-item
  56. = definition.name
  57. .minicard-custom-field-item
  58. +viewer
  59. = trueValue
  60. if getMembers
  61. .minicard-members.js-minicard-members
  62. each getMembers
  63. +userAvatar(userId=this)
  64. .badges
  65. unless currentUser.isNoComments
  66. if comments.count
  67. .badge(title="{{_ 'card-comments-title' comments.count }}")
  68. span.badge-icon.fa.fa-comment-o.badge-comment
  69. span.badge-text= comments.count
  70. if getDescription
  71. .badge.badge-state-image-only(title=getDescription)
  72. span.badge-icon.fa.fa-align-left
  73. if attachments.count
  74. .badge
  75. span.badge-icon.fa.fa-paperclip
  76. span.badge-text= attachments.count
  77. if checklists.count
  78. .badge(class="{{#if checklistFinished}}is-finished{{/if}}")
  79. span.badge-icon.fa.fa-check-square-o
  80. span.badge-text.check-list-text {{checklistFinishedCount}}/{{checklistItemCount}}