2015-04-02 22:50:30 +01:00
|
|
|
class Platforms::MaintainersController < Platforms::BaseController
|
2015-03-04 23:19:19 +00:00
|
|
|
before_action :authenticate_user!
|
|
|
|
skip_before_action :authenticate_user!, only: [:index] if APP_CONFIG['anonymous_access']
|
2012-05-31 12:43:40 +01:00
|
|
|
|
2012-05-29 13:40:25 +01:00
|
|
|
def index
|
2015-07-08 22:54:57 +01:00
|
|
|
@maintainer = BuildList::Package.new(build_list_package_params)
|
|
|
|
@packages = @platform.packages.actual.like_name(@maintainer.name)
|
|
|
|
@projects = @platform.projects.joins(:packages).merge( @packages ).
|
|
|
|
includes(:maintainer).group('projects.id').reorder(:name).paginate(page: params[:page])
|
|
|
|
@packages = @packages.where(project_id: @projects.map(&:id)).group_by(&:project_id)
|
2012-05-29 13:40:25 +01:00
|
|
|
end
|
2015-06-05 18:55:43 +01:00
|
|
|
|
|
|
|
def build_list_package_params
|
|
|
|
permit_params :build_list_package, :name
|
|
|
|
end
|
2012-05-29 13:40:25 +01:00
|
|
|
end
|