summaryrefslogtreecommitdiffstats
path: root/client/components/cards/minicard.jade
blob: 001208824461412c4204f4de7eb715cdaead75ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
template(name="minicard")
  .minicard(
    class="{{#if isImportedCard}}imported-card{{/if}}"
    class="{{#if isImportedBoard}}imported-board{{/if}}")
    if cover
      .minicard-cover(style="background-image: url('{{cover.url}}');")
    if labels
      .minicard-labels
        each labels
          .minicard-label(class="card-label-{{color}}" title="{{name}}")
    .minicard-title
      if $eq 'prefix-with-full-path' currentBoard.presentParentTask
        .parent-prefix
          | {{ parentString ' > ' }}
      if $eq 'prefix-with-parent' currentBoard.presentParentTask
        .parent-prefix
          | {{ parentCardName }}
      if isImported
        span.imported-icon.fa.fa-share-alt
      +viewer
        | {{ title }}
      if $eq 'subtext-with-full-path' currentBoard.presentParentTask
        .parent-subtext
          | {{ parentString ' > ' }}
      if $eq 'subtext-with-parent' currentBoard.presentParentTask
        .parent-subtext
          | {{ parentCardName }}

    .dates
      if receivedAt
        unless startAt
          unless dueAt
            unless endAt
              .date
                +minicardReceivedDate
      if startAt
        .date
          +minicardStartDate
      if dueAt
        unless endAt
          .date
            +minicardDueDate
      if endAt
        .date
          +minicardEndDate
      if spentTime
        .date
          +cardSpentTime

    .minicard-custom-fields
      each customFieldsWD
        if definition.showOnCard
          .minicard-custom-field
            .minicard-custom-field-item
              = definition.name
            .minicard-custom-field-item
              +viewer
                = trueValue

    if getMembers
      .minicard-members.js-minicard-members
        each getMembers
          +userAvatar(userId=this)

    .badges
      if comments.count
        .badge(title="{{_ 'card-comments-title' comments.count }}")
          span.badge-icon.fa.fa-comment-o.badge-comment
          span.badge-text= comments.count
      if getDescription
        .badge.badge-state-image-only(title=getDescription)
          span.badge-icon.fa.fa-align-left
      if attachments.count
        .badge
          span.badge-icon.fa.fa-paperclip
          span.badge-text= attachments.count
      if checklists.count
        .badge(class="{{#if checklistFinished}}is-finished{{/if}}")
          span.badge-icon.fa.fa-check-square-o
          span.badge-text.check-list-text {{checklistFinishedCount}}/{{checklistItemCount}}