summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-05 20:05:44 +0300
committerFatih Acet <acetfatih@gmail.com>2016-10-05 20:05:44 +0300
commit5c8c33c92dbc9afba077e4ae54a7bce39b591f68 (patch)
tree058dc0bf3d2d0bd34bb4bb55c8c066c1047f5b18
parent2a62f47bcd82ee692c2b19e70ed702a74bf1151a (diff)
downloadgitlab-ce-5c8c33c92dbc9afba077e4ae54a7bce39b591f68.tar.gz
Set default value for show_menu_above variable.
-rw-r--r--app/views/shared/issuable/_milestone_dropdown.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml
index 30d3c84666d..ab3cc33d18f 100644
--- a/app/views/shared/issuable/_milestone_dropdown.html.haml
+++ b/app/views/shared/issuable/_milestone_dropdown.html.haml
@@ -1,10 +1,11 @@
- project = @target_project || @project
- extra_class = extra_class || ''
+- show_menu_above = show_menu_above || false
- selected_text = selected.try(:title)
- if selected.present?
= hidden_field_tag(name, name == :milestone_title ? selected.title : selected.id)
= dropdown_tag(milestone_dropdown_label(selected_text), options: { title: "Filter by milestone", toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone",
- placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: true, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do
+ placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: show_menu_above, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do
- if project
%ul.dropdown-footer-list
- if can? current_user, :admin_milestone, project