e45a9f5bff
changelog entry added adds merge request number adds test for milestone dropdown selected text removes calling unnecessary escape function adds changelog entry in 8.13.2 and removed redundant changelog sections moves changelog entry to 8.14 as there is conflict
21 lines
1.4 KiB
Text
21 lines
1.4 KiB
Text
- project = @target_project || @project
|
|
- extra_class = extra_class || ''
|
|
- show_menu_above = show_menu_above || false
|
|
- selected_text = selected.try(:title) || params[:milestone_title]
|
|
- dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone")
|
|
- if selected.present?
|
|
= hidden_field_tag(name, name == :milestone_title ? selected_text : selected.id)
|
|
= dropdown_tag(milestone_dropdown_label(selected_text), options: { title: dropdown_title, 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: 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
|
|
%li
|
|
= link_to new_namespace_project_milestone_path(project.namespace, project), title: "New Milestone" do
|
|
Create new
|
|
%li
|
|
= link_to namespace_project_milestones_path(project.namespace, project) do
|
|
- if can? current_user, :admin_milestone, project
|
|
Manage milestones
|
|
- else
|
|
View milestones
|