Sha256: 37bab50481db681825f258792f43e8ca44de4f38467365bdc33314fd33142332

Contents?: true

Size: 949 Bytes

Versions: 37

Compression:

Stored size: 949 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  module ModeratedUsers
    module Admin
      module Filterable
        extend ActiveSupport::Concern

        included do
          include Decidim::Admin::Filterable

          private

          def base_query
            collection
          end

          def filters
            [
              :reports_reason_eq
            ]
          end

          def filters_with_values
            {
              reports_reason_eq: report_reasons
            }
          end

          def dynamically_translated_filters
            []
          end

          def search_field_predicate
            :user_name_or_user_nickname_or_user_email_cont
          end

          def report_reasons
            Decidim::UserReport::REASONS
          end

          def extra_allowed_params
            [:per_page, :blocked]
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.4 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.27.9 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.29.0 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.3 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.27.8 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.29.0.rc4 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.29.0.rc3 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.29.0.rc2 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.29.0.rc1 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.2 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.27.7 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.1 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.27.6 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.26.10 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.26.9 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.0 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.27.5 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.0.rc5 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
decidim-admin-0.28.0.rc4 app/controllers/concerns/decidim/moderated_users/admin/filterable.rb