summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-02-19 17:54:13 -0800
committerDouwe Maan <douwe@selenight.nl>2016-02-19 17:54:13 -0800
commit31682eb987ea6ab4f187a9e2bacb23d2ed86b1f5 (patch)
tree5a4177a685daa62164f0e0ea1902ed1a56684e5a /app/controllers
parent0c5abb1e0ba87a9e8c28dfc2f1cf455cf5b64ab9 (diff)
parentcec57275f0b96fcd5644239bfbe2773cdec0ed58 (diff)
downloadgitlab-ce-31682eb987ea6ab4f187a9e2bacb23d2ed86b1f5.tar.gz
Merge branch 'visibletrap/gitlab-ce-label'
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/labels_controller.rb2
-rw-r--r--app/controllers/concerns/issues_action.rb2
-rw-r--r--app/controllers/concerns/merge_requests_action.rb2
-rw-r--r--app/controllers/projects/issues_controller.rb1
-rw-r--r--app/controllers/projects/labels_controller.rb2
-rw-r--r--app/controllers/projects/merge_requests_controller.rb2
6 files changed, 9 insertions, 2 deletions
diff --git a/app/controllers/admin/labels_controller.rb b/app/controllers/admin/labels_controller.rb
index 3b070e65d0d..d79ce2b10fe 100644
--- a/app/controllers/admin/labels_controller.rb
+++ b/app/controllers/admin/labels_controller.rb
@@ -53,6 +53,6 @@ class Admin::LabelsController < Admin::ApplicationController
end
def label_params
- params[:label].permit(:title, :color)
+ params[:label].permit(:title, :description, :color)
end
end
diff --git a/app/controllers/concerns/issues_action.rb b/app/controllers/concerns/issues_action.rb
index effd4721949..5b098628557 100644
--- a/app/controllers/concerns/issues_action.rb
+++ b/app/controllers/concerns/issues_action.rb
@@ -6,6 +6,8 @@ module IssuesAction
@issues = @issues.page(params[:page]).per(ApplicationController::PER_PAGE)
@issues = @issues.preload(:author, :project)
+ @label = @issuable_finder.labels.first
+
respond_to do |format|
format.html
format.atom { render layout: false }
diff --git a/app/controllers/concerns/merge_requests_action.rb b/app/controllers/concerns/merge_requests_action.rb
index f7a25111db9..f6de696e84d 100644
--- a/app/controllers/concerns/merge_requests_action.rb
+++ b/app/controllers/concerns/merge_requests_action.rb
@@ -5,5 +5,7 @@ module MergeRequestsAction
@merge_requests = get_merge_requests_collection
@merge_requests = @merge_requests.page(params[:page]).per(ApplicationController::PER_PAGE)
@merge_requests = @merge_requests.preload(:author, :target_project)
+
+ @label = @issuable_finder.labels.first
end
end
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 68244883803..67faa1e4437 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -32,6 +32,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
@issues = @issues.page(params[:page]).per(PER_PAGE)
+ @label = @project.labels.find_by(title: params[:label_name])
respond_to do |format|
format.html
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb
index 86d6e3e0f6b..ecac3c395ec 100644
--- a/app/controllers/projects/labels_controller.rb
+++ b/app/controllers/projects/labels_controller.rb
@@ -69,7 +69,7 @@ class Projects::LabelsController < Projects::ApplicationController
end
def label_params
- params.require(:label).permit(:title, :color)
+ params.require(:label).permit(:title, :description, :color)
end
def label
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 9d588c370aa..86b8e7bdf2e 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -34,6 +34,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_requests = @merge_requests.page(params[:page]).per(PER_PAGE)
@merge_requests = @merge_requests.preload(:target_project)
+ @label = @project.labels.find_by(title: params[:label_name])
+
respond_to do |format|
format.html
format.json do