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
@@ -400,6 +400,7 @@ form { | @@ -400,6 +400,7 @@ form { | ||
400 | * | 400 | * |
401 | */ | 401 | */ |
402 | .ui-box { | 402 | .ui-box { |
403 | + background:#F9F9F9; | ||
403 | margin-bottom: 40px; | 404 | margin-bottom: 40px; |
404 | @include round-borders-all(4px); | 405 | @include round-borders-all(4px); |
405 | border-color: #CCC; | 406 | border-color: #CCC; |
app/controllers/issues_controller.rb
@@ -137,6 +137,7 @@ class IssuesController < ApplicationController | @@ -137,6 +137,7 @@ class IssuesController < ApplicationController | ||
137 | else @project.issues.opened | 137 | else @project.issues.opened |
138 | end | 138 | end |
139 | 139 | ||
140 | + @issues = @issues.where(:assignee_id => params[:assignee_id]) if params[:assignee_id].present? | ||
140 | @issues = @issues.where(:milestone_id => params[:milestone_id]) if params[:milestone_id].present? | 141 | @issues = @issues.where(:milestone_id => params[:milestone_id]) if params[:milestone_id].present? |
141 | @issues = @issues.includes(:author, :project).order("critical, updated_at") | 142 | @issues = @issues.includes(:author, :project).order("critical, updated_at") |
142 | @issues | 143 | @issues |
app/views/issues/_issues.html.haml
app/views/issues/index.html.haml
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | %div#issues-table-holder.ui-box | 17 | %div#issues-table-holder.ui-box |
18 | .title | 18 | .title |
19 | .row | 19 | .row |
20 | - .span6 | 20 | + .span4 |
21 | %ul.nav.nav-pills.left | 21 | %ul.nav.nav-pills.left |
22 | %li{:class => ("active" if (params[:f] == "0" || !params[:f]))} | 22 | %li{:class => ("active" if (params[:f] == "0" || !params[:f]))} |
23 | = link_to project_issues_path(@project, :f => 0, :milestone_id => params[:milestone_id]) do | 23 | = link_to project_issues_path(@project, :f => 0, :milestone_id => params[:milestone_id]) do |
@@ -32,9 +32,10 @@ | @@ -32,9 +32,10 @@ | ||
32 | = link_to project_issues_path(@project, :f => 1, :milestone_id => params[:milestone_id]) do | 32 | = link_to project_issues_path(@project, :f => 1, :milestone_id => params[:milestone_id]) do |
33 | All | 33 | All |
34 | 34 | ||
35 | - .span4.right | 35 | + .span6.right |
36 | = form_tag project_issues_path(@project), :method => :get, :class => :right do | 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 | = hidden_field_tag :f, params[:f] | 39 | = hidden_field_tag :f, params[:f] |
39 | 40 | ||
40 | %ul#issues-table.unstyled | 41 | %ul#issues-table.unstyled |
@@ -44,8 +45,9 @@ | @@ -44,8 +45,9 @@ | ||
44 | $(function(){ | 45 | $(function(){ |
45 | initIssuesSearch(); | 46 | initIssuesSearch(); |
46 | setSortable(); | 47 | setSortable(); |
48 | + $("#assignee_id").chosen(); | ||
47 | $("#milestone_id").chosen(); | 49 | $("#milestone_id").chosen(); |
48 | - $("#milestone_id").live("change", function(){ | 50 | + $("#milestone_id, #assignee_id").live("change", function(){ |
49 | $(this).closest("form").submit(); | 51 | $(this).closest("form").submit(); |
50 | }); | 52 | }); |
51 | }) | 53 | }) |