Commit 034ddb85fe86c1a3e13bda959a732b6bec11bbaa
1 parent
2dd17623
Exists in
master
and in
4 other branches
Assignee filter for issues
Showing
4 changed files
with
9 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap.scss
app/controllers/issues_controller.rb
... | ... | @@ -137,6 +137,7 @@ class IssuesController < ApplicationController |
137 | 137 | else @project.issues.opened |
138 | 138 | end |
139 | 139 | |
140 | + @issues = @issues.where(:assignee_id => params[:assignee_id]) if params[:assignee_id].present? | |
140 | 141 | @issues = @issues.where(:milestone_id => params[:milestone_id]) if params[:milestone_id].present? |
141 | 142 | @issues = @issues.includes(:author, :project).order("critical, updated_at") |
142 | 143 | @issues | ... | ... |
app/views/issues/_issues.html.haml
app/views/issues/index.html.haml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | %div#issues-table-holder.ui-box |
18 | 18 | .title |
19 | 19 | .row |
20 | - .span6 | |
20 | + .span4 | |
21 | 21 | %ul.nav.nav-pills.left |
22 | 22 | %li{:class => ("active" if (params[:f] == "0" || !params[:f]))} |
23 | 23 | = link_to project_issues_path(@project, :f => 0, :milestone_id => params[:milestone_id]) do |
... | ... | @@ -32,9 +32,10 @@ |
32 | 32 | = link_to project_issues_path(@project, :f => 1, :milestone_id => params[:milestone_id]) do |
33 | 33 | All |
34 | 34 | |
35 | - .span4.right | |
35 | + .span6.right | |
36 | 36 | = form_tag project_issues_path(@project), :method => :get, :class => :right do |
37 | - = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Select milestone") | |
37 | + = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee") | |
38 | + = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone") | |
38 | 39 | = hidden_field_tag :f, params[:f] |
39 | 40 | |
40 | 41 | %ul#issues-table.unstyled |
... | ... | @@ -44,8 +45,9 @@ |
44 | 45 | $(function(){ |
45 | 46 | initIssuesSearch(); |
46 | 47 | setSortable(); |
48 | + $("#assignee_id").chosen(); | |
47 | 49 | $("#milestone_id").chosen(); |
48 | - $("#milestone_id").live("change", function(){ | |
50 | + $("#milestone_id, #assignee_id").live("change", function(){ | |
49 | 51 | $(this).closest("form").submit(); |
50 | 52 | }); |
51 | 53 | }) | ... | ... |