BigW Consortium Gitlab

Commit c4847664 by Phil Hughes

Fixed issuable sidebar label dropdown

parent c9cd2715
......@@ -125,12 +125,13 @@
- else
%span.no-value None
.selectbox.hide-collapsed
- selected_labels = params["#{issuable.to_ability_name}[label_names]"].to_a
- issuable.labels_array.each do |label|
= hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil, data: { title: label.title }
.dropdown
%button.dropdown-menu-toggle.js-label-select.js-multiselect{type: "button", data: {toggle: "dropdown", default_label: "Labels", field_name: "#{issuable.to_ability_name}[label_names][]", ability_name: issuable.to_ability_name, show_no: "true", show_any: "true", project_id: (@project.id if @project), issue_update: issuable_json_path(issuable), labels: (namespace_project_labels_path(@project.namespace, @project, :json) if @project)}}
%span.dropdown-toggle-text{ class: ("is-default" if issuable.labels_array.empty?)}
= multi_label_name(issuable.labels_array, "Labels")
= multi_label_name(issuable.labels_array, h(selected_labels[0]), "Labels")
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
= render partial: "shared/issuable/label_page_default"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment