summaryrefslogtreecommitdiff
path: root/app/views/shared/boards/components/sidebar/_labels.html.haml
blob: 1f540bdaf935725569130f404ee74759c2673af7 (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
.block.labels
  .title
    Labels
    - if can_admin_issue?
      = icon("spinner spin", class: "block-loading")
      = link_to "Edit", "#", class: "js-sidebar-dropdown-toggle edit-link pull-right"
  .value.issuable-show-labels
    %span.no-value{ "v-if" => "issue.labels && issue.labels.length === 0" }
      None
    %a{ href: "#",
      "v-for" => "label in issue.labels" }
      %span.label.color-label.has-tooltip{ ":style" => "{ backgroundColor: label.color, color: label.textColor }" }
        {{ label.title }}
  - if can_admin_issue?
    .selectbox
      %input{ type: "hidden",
        name: "issue[label_names][]",
        "v-for" => "label in issue.labels",
        ":value" => "label.id" }
      .dropdown
        %button.dropdown-menu-toggle.js-label-select.js-multiselect.js-issue-board-sidebar{ type: "button",
          data: { toggle: "dropdown",
            field_name: "issue[label_names][]",
            show_no: "true",
            show_any: "true",
            project_id: @project&.try(:id),
            labels: labels_filter_path(false),
            namespace_path: @project.try(:namespace).try(:full_path),
            project_path: @project.try(:path) },
          ":data-issue-update" => "'#{build_issue_link_base}/' + issue.iid + '.json'" }
          %span.dropdown-toggle-text
            Label
          = icon('chevron-down')
        .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
          = render partial: "shared/issuable/label_page_default"
          - if can?(current_user, :admin_label, current_board_parent)
            = render partial: "shared/issuable/label_page_create"