_card.html.haml 1.45 KB
Newer Older
Phil Hughes's avatar
Phil Hughes committed
1
%board-card{ "inline-template" => true,
Phil Hughes's avatar
Phil Hughes committed
2
  "v-for" => "issue in issues | orderBy 'priority'",
Phil Hughes's avatar
Phil Hughes committed
3 4
  "v-ref:issue" => true,
  ":index" => "$index",
Phil Hughes's avatar
Phil Hughes committed
5
  ":list" => "list",
Phil Hughes's avatar
Phil Hughes committed
6 7 8 9
  ":issue" => "issue",
  ":issue-link-base" => "issueLinkBase",
  ":disabled" => "disabled",
  "track-by" => "id" }
Phil Hughes's avatar
Phil Hughes committed
10 11
  %li.card{ ":class" => "{ 'user-can-drag': !disabled }",
    ":index" => "index" }
Phil Hughes's avatar
Phil Hughes committed
12
    = icon("align-justify", class: "board-mobile-handle js-card-drag-handle", "v-if" => "!disabled")
Phil Hughes's avatar
Phil Hughes committed
13
    %h4.card-title
Phil Hughes's avatar
Phil Hughes committed
14
      = icon("eye-slash", class: "confidential-icon", "v-if" => "issue.confidential")
Phil Hughes's avatar
Phil Hughes committed
15 16 17 18 19 20 21 22 23
      %a{ ":href" => "issueLinkBase + '/' + issue.id",
        ":title" => "issue.title" }
        {{ issue.title }}
    .card-footer
      %span.card-number
        = precede '#' do
          {{ issue.id }}
      %button.label.color-label.has-tooltip{ "v-for" => "label in issue.labels",
        type: "button",
Phil Hughes's avatar
Phil Hughes committed
24
        "v-if" => "(!list.label || label.id !== list.label.id)",
Phil Hughes's avatar
Phil Hughes committed
25 26
        "@click" => "filterByLabel(label, $event)",
        ":style" => "{ backgroundColor: label.color, color: label.textColor }",
27 28
        ":title" => "label.description",
        data: { container: 'body' } }
Phil Hughes's avatar
Phil Hughes committed
29 30 31
        {{ label.title }}
      %a.has-tooltip{ ":href" => "'/u/' + issue.assignee.username",
        ":title" => "'Assigned to ' + issue.assignee.name",
Phil Hughes's avatar
Phil Hughes committed
32 33
        "v-if" => "issue.assignee",
        data: { container: 'body' } }
Phil Hughes's avatar
Phil Hughes committed
34
        %img.avatar.avatar-inline.s20{ ":src" => "issue.assignee.avatar", width: 20, height: 20 }