Commit 82f06c29 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-ee-master' into 'master'

Move EE helper to proper namespace

See merge request !933
parents 8b37fc68 3f55b866
module EE
module IssuablesHelper
def weight_dropdown_label(weight)
if Issue.weight_options.include?(weight)
weight
else
h(weight.presence || 'Weight')
end
end
end
end
module EE
module IssuesHelper
def weight_dropdown_tag(issuable, opts = {}, &block)
title = issuable.weight || 'Weight'
additional_toggle_class = opts.delete(:toggle_class)
options = {
toggle_class: "js-weight-select #{additional_toggle_class}",
dropdown_class: 'dropdown-menu-selectable dropdown-menu-weight',
title: 'Select weight',
placeholder: 'Search weight',
data: {
field_name: "#{issuable.class.model_name.param_key}[weight]",
default_label: 'Weight'
}
}.deep_merge(opts)
dropdown_tag(title, options: options) do
capture(&block)
end
end
def weight_dropdown_label(weight)
if Issue.weight_options.include?(weight)
weight
else
h(weight.presence || 'Weight')
end
end
end
end
module EeIssuesHelper
def weight_dropdown_tag(issuable, opts = {}, &block)
title = issuable.weight || 'Weight'
additional_toggle_class = opts.delete(:toggle_class)
options = {
toggle_class: "js-weight-select #{additional_toggle_class}",
dropdown_class: 'dropdown-menu-selectable dropdown-menu-weight',
title: 'Select weight',
placeholder: 'Search weight',
data: {
field_name: "#{issuable.class.model_name.param_key}[weight]",
default_label: 'Weight'
}
}.deep_merge(opts)
dropdown_tag(title, options: options) do
capture(&block)
end
end
def weight_dropdown_label(weight)
if Issue.weight_filter_options.include?(weight)
weight
else
h(weight.presence || 'Weight')
end
end
end
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