diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-17 17:43:06 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-20 10:48:02 +0100 |
commit | eb49e28ca0145fa7df6ef1077ae97e90ce39fc6b (patch) | |
tree | 5a81f88a69d7806156d34499c77ef0088ba69c36 /app/views/shared/issuable/_milestone_dropdown.html.haml | |
parent | 02ce5fba8d7aa94d5fb53bd717e77c93c6bd61b7 (diff) | |
download | gitlab-ce-eb49e28ca0145fa7df6ef1077ae97e90ce39fc6b.tar.gz |
Fixed milestone dropdown tests
Diffstat (limited to 'app/views/shared/issuable/_milestone_dropdown.html.haml')
-rw-r--r-- | app/views/shared/issuable/_milestone_dropdown.html.haml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml index 9dd54546cb6..0b8fd3daad7 100644 --- a/app/views/shared/issuable/_milestone_dropdown.html.haml +++ b/app/views/shared/issuable/_milestone_dropdown.html.haml @@ -1,11 +1,11 @@ -- project = @target_project || @project +- project = @target_project || @project || @projects - extra_class = extra_class || '' -- selected_text = project.milestones.find_by_id(selected).try(:name) +- selected_text = milestone_dropdown_selected_text - if selected.present? = hidden_field_tag(name, selected) = 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, project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do - - if project + - if project && project.respond_to?(:namespace) %ul.dropdown-footer-list - if can? current_user, :admin_milestone, project %li |