summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_milestone_dropdown.html.haml
blob: 37b25ea5b9eaf8d61f9b00020f5be37b2c412100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- if params[:milestone_title]
  = hidden_field_tag(:milestone_title, params[:milestone_title])
= dropdown_tag(h(params[:milestone_title].presence || "里程碑"), options: { title: "按里程碑过滤", toggle_class: 'js-milestone-select js-filter-submit', filter: true, dropdown_class: "dropdown-menu-selectable",
  placeholder: "搜索里程碑", footer_content: @project.present?, data: { show_no: true, show_any: true, field_name: "milestone_title", selected: params[:milestone_title], project_id: @project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "里程碑" } }) 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: "新里程碑" do
            创建新的
      %li
        = link_to namespace_project_milestones_path(@project.namespace, @project) do
          - if can? current_user, :admin_milestone, @project
            管理里程碑
          - else
            查看里程碑