2012-05-29 13:40:25 +01:00
|
|
|
# -*- encoding : utf-8 -*-
|
|
|
|
class Platforms::MaintainersController < ApplicationController
|
2012-08-24 20:45:58 +01:00
|
|
|
before_filter :authenticate_user!
|
2012-07-19 17:25:04 +01:00
|
|
|
skip_before_filter :authenticate_user!, :only => [:index] if APP_CONFIG['anonymous_access']
|
2012-08-24 20:45:58 +01:00
|
|
|
load_and_authorize_resource :platform
|
2012-05-31 12:43:40 +01:00
|
|
|
|
2012-05-29 13:40:25 +01:00
|
|
|
def index
|
2012-08-27 22:12:53 +01:00
|
|
|
@maintainers = BuildList::Package.actual.by_platform(@platform)
|
2012-08-30 17:19:12 +01:00
|
|
|
.order('lower(name) ASC, length(name) ASC')
|
2012-08-24 17:06:59 +01:00
|
|
|
.includes(:project)
|
2012-08-31 18:47:52 +01:00
|
|
|
@maintainers = @maintainers.where('name ILIKE ?', "%#{params[:q]}%") if params[:q].present?
|
2012-08-24 17:06:59 +01:00
|
|
|
@maintainers = @maintainers.paginate(:page => params[:page])
|
2012-05-29 13:40:25 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|