Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-06-18 21:50:06 +0400
committerrandx <dmitriy.zaporozhets@gmail.com>2012-06-18 21:50:06 +0400
commit034ddb85fe86c1a3e13bda959a732b6bec11bbaa (patch)
tree4f84cb2997447751d8eee77b2915a9f7352d2b7c /app
parent2dd17623c9388fb98ae53ba80c904455e0c7f432 (diff)
Assignee filter for issues
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap.scss1
-rw-r--r--app/controllers/issues_controller.rb1
-rw-r--r--app/views/issues/_issues.html.haml2
-rw-r--r--app/views/issues/index.html.haml10
4 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss
index 8bab17791a0..4df2b7e2684 100644
--- a/app/assets/stylesheets/gitlab_bootstrap.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap.scss
@@ -400,6 +400,7 @@ form {
*
*/
.ui-box {
+ background:#F9F9F9;
margin-bottom: 40px;
@include round-borders-all(4px);
border-color: #CCC;
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 0e31f04deb5..48e8d72ad1e 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -137,6 +137,7 @@ class IssuesController < ApplicationController
else @project.issues.opened
end
+ @issues = @issues.where(:assignee_id => params[:assignee_id]) if params[:assignee_id].present?
@issues = @issues.where(:milestone_id => params[:milestone_id]) if params[:milestone_id].present?
@issues = @issues.includes(:author, :project).order("critical, updated_at")
@issues
diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml
index fd269066bae..e1d0be08713 100644
--- a/app/views/issues/_issues.html.haml
+++ b/app/views/issues/_issues.html.haml
@@ -12,4 +12,4 @@
%span.cgray.right #{@issues.total_count} issues for this filter
- else
%li
- %p.padded Nothing to show here
+ %h4.nothing_here_message Nothing to show here
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 98cbb7d2eef..1a321e6f8e0 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -17,7 +17,7 @@
%div#issues-table-holder.ui-box
.title
.row
- .span6
+ .span4
%ul.nav.nav-pills.left
%li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
= link_to project_issues_path(@project, :f => 0, :milestone_id => params[:milestone_id]) do
@@ -32,9 +32,10 @@
= link_to project_issues_path(@project, :f => 1, :milestone_id => params[:milestone_id]) do
All
- .span4.right
+ .span6.right
= form_tag project_issues_path(@project), :method => :get, :class => :right do
- = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Select milestone")
+ = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee")
+ = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone")
= hidden_field_tag :f, params[:f]
%ul#issues-table.unstyled
@@ -44,8 +45,9 @@
$(function(){
initIssuesSearch();
setSortable();
+ $("#assignee_id").chosen();
$("#milestone_id").chosen();
- $("#milestone_id").live("change", function(){
+ $("#milestone_id, #assignee_id").live("change", function(){
$(this).closest("form").submit();
});
})