gitlab-org--gitlab-foss/app/views/shared/issuable/_milestone_dropdown.html.haml

20 lines
1.2 KiB
Text
Raw Normal View History

- project = @target_project || @project
- extra_class = extra_class || ''
- 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",
placeholder: "Search milestones", footer_content: project.present?, data: { show_no: 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
2016-07-17 12:43:06 -04:00
- if project && project.respond_to?(:namespace)
%ul.dropdown-footer-list
2016-07-16 03:23:02 -04:00
- if can? current_user, :admin_milestone, project
%li
2016-07-16 03:23:02 -04:00
= link_to new_namespace_project_milestone_path(project.namespace, project), title: "New Milestone" do
Create new
%li
2016-07-16 03:23:02 -04:00
= link_to namespace_project_milestones_path(project.namespace, project) do
- if can? current_user, :admin_milestone, project
Manage milestones
- else
View milestones