summaryrefslogtreecommitdiff
path: root/app/views/shared/boards/components/sidebar/_labels.html.haml
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-09-06 15:50:13 +1000
committerSimon Knox <psimyn@gmail.com>2017-09-06 15:50:13 +1000
commitf1d92cd232d1f4877a18a6ae7839440540124a7a (patch)
treea5c5c664efa9566d07e7709192b7f19a3b2f89bb /app/views/shared/boards/components/sidebar/_labels.html.haml
parentc28d52a3a5e745d20981151b89bfcad07c68fa9c (diff)
downloadgitlab-ce-f1d92cd232d1f4877a18a6ae7839440540124a7a.tar.gz
move templates from projects to shared
Diffstat (limited to 'app/views/shared/boards/components/sidebar/_labels.html.haml')
-rw-r--r--app/views/shared/boards/components/sidebar/_labels.html.haml30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/shared/boards/components/sidebar/_labels.html.haml b/app/views/shared/boards/components/sidebar/_labels.html.haml
new file mode 100644
index 00000000000..6b389736e8b
--- /dev/null
+++ b/app/views/shared/boards/components/sidebar/_labels.html.haml
@@ -0,0 +1,30 @@
+.block.labels
+ .title
+ Labels
+ - if can?(current_user, :admin_issue, @project)
+ = 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?(current_user, :admin_issue, @project)
+ .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.id, labels: project_labels_path(@project, :json), namespace_path: @project.try(:namespace).try(:full_path), project_path: @project.try(:path) },
+ ":data-issue-update" => "'#{project_issues_path(@project)}/' + issue.id + '.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, @project and @project
+ = render partial: "shared/issuable/label_page_create"