diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-27 05:13:49 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-27 05:13:49 +0300 |
commit | d6c8eefb5d0298f0c733ac4880e1e64f2a37b24c (patch) | |
tree | e96e4db577868913283a6fcdbd254ca08a998b78 /app/helpers/milestones_helper.rb | |
parent | 1c2711f7e38a7ca6adb8a0bca5166845405ad5fe (diff) |
Big refactoring of issues filters
* Squash project users selectbox and users selectbox into one class
* Move from API autocomplete to GitLab internal one
* Smarter filter for project/group/all issues
* Use selectbox with searchbox for assignee/author/milestone/label
* Switch to ajax filter for issue author/assignee
Diffstat (limited to 'app/helpers/milestones_helper.rb')
-rw-r--r-- | app/helpers/milestones_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 59fdc0d49cc..e1dec3ec628 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -19,4 +19,16 @@ module MilestonesHelper content_tag :div, nil, options end end + + def projects_milestones_options + milestones = + if @project + @project.milestones + else + Milestone.where(project_id: @projects) + end.active + + options_for_select([['Any', nil]]) + + options_from_collection_for_select(milestones, 'id', 'title', params[:milestone_id]) + end end |