2013-06-23 16:47:22 +00:00
|
|
|
class Projects::LabelsController < Projects::ApplicationController
|
2012-08-24 10:05:40 +00:00
|
|
|
before_filter :module_enabled
|
|
|
|
|
|
|
|
# Allow read any issue
|
|
|
|
before_filter :authorize_read_issue!
|
|
|
|
|
|
|
|
respond_to :js, :html
|
|
|
|
|
|
|
|
def index
|
2013-05-07 16:26:41 +00:00
|
|
|
@labels = @project.issues_labels
|
2012-08-24 10:05:40 +00:00
|
|
|
end
|
|
|
|
|
2013-05-07 14:57:29 +00:00
|
|
|
def generate
|
2013-05-07 16:26:41 +00:00
|
|
|
Gitlab::IssuesLabels.generate(@project)
|
2013-05-07 14:57:29 +00:00
|
|
|
|
|
|
|
redirect_to project_labels_path(@project)
|
|
|
|
end
|
|
|
|
|
2012-08-24 10:05:40 +00:00
|
|
|
protected
|
|
|
|
|
|
|
|
def module_enabled
|
|
|
|
return render_404 unless @project.issues_enabled
|
|
|
|
end
|
|
|
|
end
|