gitlabhq/app/controllers/labels_controller.rb

26 lines
494 B
Ruby
Raw Normal View History

2012-08-24 12:05:40 +02:00
class LabelsController < ApplicationController
before_filter :authenticate_user!
before_filter :project
before_filter :module_enabled
layout "project"
# Authorize
before_filter :add_project_abilities
# Allow read any issue
before_filter :authorize_read_issue!
respond_to :js, :html
def index
2012-08-24 14:34:27 +02:00
@labels = @project.issues.tag_counts_on(:labels).order('count DESC')
2012-08-24 12:05:40 +02:00
end
protected
def module_enabled
return render_404 unless @project.issues_enabled
end
end