blob: b037cf5650211051a3bc64e7e5ba5892d2108d6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
class Projects::LabelsController < Projects::ApplicationController
before_filter :module_enabled
before_filter :authorize_labels!
respond_to :js, :html
def index
@labels = @project.issues_labels
end
def generate
Gitlab::IssuesLabels.generate(@project)
if params[:redirect] == 'issues'
redirect_to project_issues_path(@project)
elsif params[:redirect] == 'merge_requests'
redirect_to project_merge_requests_path(@project)
end
end
protected
def module_enabled
unless @project.issues_enabled || @project.merge_requests_enabled
return render_404
end
end
end
|