minicard.jade 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. template(name="minicard")
  2. .minicard(
  3. class="{{#if isLinkedCard}}linked-card{{/if}}"
  4. class="{{#if isLinkedBoard}}linked-board{{/if}}"
  5. class="minicard-{{colorClass}}")
  6. if isMiniScreen
  7. .handle
  8. .fa.fa-arrows
  9. unless isMiniScreen
  10. if showDesktopDragHandles
  11. .handle
  12. .fa.fa-arrows
  13. if cover
  14. .minicard-cover(style="background-image: url('{{cover.url}}');")
  15. if labels
  16. .minicard-labels
  17. each labels
  18. unless hiddenMinicardLabelText
  19. span.card-label(class="card-label-{{color}}" title=name)
  20. +viewer
  21. = name
  22. if hiddenMinicardLabelText
  23. .minicard-label(class="card-label-{{color}}" title="{{name}}")
  24. .minicard-title
  25. if $eq 'prefix-with-full-path' currentBoard.presentParentTask
  26. .parent-prefix
  27. | {{ parentString ' > ' }}
  28. if $eq 'prefix-with-parent' currentBoard.presentParentTask
  29. .parent-prefix
  30. | {{ parentCardName }}
  31. if isLinkedBoard
  32. a.js-linked-link
  33. span.linked-icon.fa.fa-folder
  34. else if isLinkedCard
  35. a.js-linked-link
  36. span.linked-icon.fa.fa-id-card
  37. if getArchived
  38. span.linked-icon.linked-archived.fa.fa-archive
  39. +viewer
  40. if currentBoard.allowsCardNumber
  41. span.card-number
  42. | ##{getCardNumber}
  43. = getTitle
  44. if $eq 'subtext-with-full-path' currentBoard.presentParentTask
  45. .parent-subtext
  46. | {{ parentString ' > ' }}
  47. if $eq 'subtext-with-parent' currentBoard.presentParentTask
  48. .parent-subtext
  49. | {{ parentCardName }}
  50. .dates
  51. if getReceived
  52. unless getStart
  53. unless getDue
  54. unless getEnd
  55. .date
  56. +minicardReceivedDate
  57. if getStart
  58. .date
  59. +minicardStartDate
  60. if getDue
  61. .date
  62. +minicardDueDate
  63. if getEnd
  64. +minicardEndDate
  65. if getSpentTime
  66. .date
  67. +cardSpentTime
  68. .minicard-custom-fields
  69. each customFieldsWD
  70. if definition.showOnCard
  71. if trueValue
  72. .minicard-custom-field
  73. if definition.showLabelOnMiniCard
  74. .minicard-custom-field-item
  75. +viewer
  76. = definition.name
  77. .minicard-custom-field-item
  78. if $eq definition.type "currency"
  79. +viewer
  80. = formattedCurrencyCustomFieldValue(definition)
  81. else if $eq definition.type "date"
  82. .date
  83. +minicardCustomFieldDate
  84. else if $eq definition.type "checkbox"
  85. .materialCheckBox(class="{{#if value }}is-checked{{/if}}")
  86. else if $eq definition.type "stringtemplate"
  87. +viewer
  88. = formattedStringtemplateCustomFieldValue(definition)
  89. else
  90. +viewer
  91. = trueValue
  92. if getAssignees
  93. .minicard-assignees.js-minicard-assignees
  94. each getAssignees
  95. +userAvatar(userId=this)
  96. if getMembers
  97. .minicard-members.js-minicard-members
  98. each getMembers
  99. +userAvatar(userId=this)
  100. if showCreator
  101. .minicard-creator
  102. +userAvatar(userId=this.userId noRemove=true)
  103. .badges
  104. unless currentUser.isNoComments
  105. if comments.count
  106. .badge(title="{{_ 'card-comments-title' comments.count }}")
  107. span.badge-icon.fa.fa-comment-o.badge-comment
  108. = ' '
  109. = comments.count
  110. //span.badge-comment.badge-text
  111. //| {{_ 'comment'}}
  112. if getDescription
  113. .badge.badge-state-image-only(title=getDescription)
  114. span.badge-icon.fa.fa-align-left
  115. if getVoteQuestion
  116. .badge.badge-state-image-only(title=getVoteQuestion)
  117. span.badge-icon.fa.fa-thumbs-up(class="{{#if voteState}}text-green{{/if}}")
  118. span.badge-text {{ voteCountPositive }}
  119. span.badge-icon.fa.fa-thumbs-down(class="{{#if $eq voteState false}}text-red{{/if}}")
  120. span.badge-text {{ voteCountNegative }}
  121. if getPokerQuestion
  122. .badge.badge-state-image-only(title=getPokerQuestion)
  123. span.badge-icon.fa.fa-check(class="{{#if pokerState}}text-green{{/if}}")
  124. if expiredPoker
  125. span.badge-text {{ getPokerEstimation }}
  126. if attachments.count
  127. .badge
  128. span.badge-icon.fa.fa-paperclip
  129. span.badge-text= attachments.count
  130. if checklists.count
  131. .badge(class="{{#if checklistFinished}}is-finished{{/if}}")
  132. span.badge-icon.fa.fa-check-square-o
  133. span.badge-text.check-list-text {{checklistFinishedCount}}/{{checklistItemCount}}
  134. if allSubtasks.count
  135. .badge
  136. span.badge-icon.fa.fa-sitemap
  137. span.badge-text.check-list-text {{subtasksFinishedCount}}/{{allSubtasksCount}}
  138. //{{subtasksFinishedCount}}/{{subtasksCount}} does not work because when a subtaks is archived, the count goes down
  139. if currentBoard.allowsCardSortingByNumber
  140. .badge
  141. span.badge-icon.fa.fa-sort
  142. span.badge-text.check-list-sort {{ sort }}
  143. template(name="editCardSortOrderPopup")
  144. input.js-edit-card-sort-popup(type='text' autofocus value=sort dir="auto")
  145. .edit-controls.clearfix
  146. button.primary.confirm.js-submit-edit-card-sort-popup(type="submit") {{_ 'save'}}