diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-07 10:27:52 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-07 10:27:52 +0200 |
commit | dbb3c28088b63c8cf40a90c599b6eedb4dfbbb66 (patch) | |
tree | 9e6c4d495e45355ef62c56c0c3e102f95220f89f /app/views/shared/issuable/_label_dropdown.html.haml | |
parent | a924152219c1367bf494f3f387d050ac3ff2d7d3 (diff) | |
parent | dddc54aa0aea4088e5a233d18a62cb2435590fe9 (diff) | |
download | gitlab-ce-dbb3c28088b63c8cf40a90c599b6eedb4dfbbb66.tar.gz |
Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch
# Conflicts:
# app/models/project_services/prometheus_service.rb
# app/views/projects/services/_form.html.haml
Diffstat (limited to 'app/views/shared/issuable/_label_dropdown.html.haml')
-rw-r--r-- | app/views/shared/issuable/_label_dropdown.html.haml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/shared/issuable/_label_dropdown.html.haml b/app/views/shared/issuable/_label_dropdown.html.haml index 1cf662e29c4..34911fd2712 100644 --- a/app/views/shared/issuable/_label_dropdown.html.haml +++ b/app/views/shared/issuable/_label_dropdown.html.haml @@ -11,6 +11,8 @@ - dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by label") - dropdown_data = {toggle: 'dropdown', field_name: "label_name[]", show_no: "true", show_any: "true", namespace_path: @project.try(:namespace).try(:full_path), project_path: @project.try(:path), labels: labels_filter_path, default_label: "Labels"} - dropdown_data.merge!(data_options) +- label_name = local_assigns.fetch(:label_name, "Labels") +- no_default_styles = local_assigns.fetch(:no_default_styles, false) - classes << 'js-extra-options' if extra_options - classes << 'js-filter-submit' if filter_submit @@ -20,8 +22,9 @@ .dropdown %button.dropdown-menu-toggle.js-label-select.js-multiselect{ class: classes.join(' '), type: "button", data: dropdown_data } - %span.dropdown-toggle-text{ class: ("is-default" if selected.nil? || selected.empty?) } - = multi_label_name(selected, "Labels") + - apply_is_default_styles = (selected.nil? || selected.empty?) && !no_default_styles + %span.dropdown-toggle-text{ class: ("is-default" if apply_is_default_styles) } + = multi_label_name(selected, label_name) = icon('chevron-down') .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable = render partial: "shared/issuable/label_page_default", locals: { title: dropdown_title, show_footer: show_footer, show_create: show_create } |