|
|
|
@ -9,14 +9,14 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# Set the link url for the title. For example, to take
|
|
|
|
|
# users to your main site. Defaults to no link.
|
|
|
|
|
#
|
|
|
|
|
config.site_title_link = '/'
|
|
|
|
|
# config.site_title_link = "/"
|
|
|
|
|
|
|
|
|
|
# Set an optional image to be displayed for the header
|
|
|
|
|
# instead of a string (overrides :site_title)
|
|
|
|
|
#
|
|
|
|
|
# Note: Aim for an image that's 21px high so it fits in the header.
|
|
|
|
|
#
|
|
|
|
|
# config.site_title_image = 'logo.png'
|
|
|
|
|
# config.site_title_image = "logo.png"
|
|
|
|
|
|
|
|
|
|
# == Default Namespace
|
|
|
|
|
#
|
|
|
|
@ -40,11 +40,11 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# within a namespace:
|
|
|
|
|
#
|
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
|
# admin.site_title = 'Custom Admin Title'
|
|
|
|
|
# admin.site_title = "Custom Admin Title"
|
|
|
|
|
# end
|
|
|
|
|
#
|
|
|
|
|
# This will ONLY change the title for the admin section. Other
|
|
|
|
|
# namespaces will continue to use the main 'site_title' configuration.
|
|
|
|
|
# namespaces will continue to use the main "site_title" configuration.
|
|
|
|
|
|
|
|
|
|
# == User Authentication
|
|
|
|
|
#
|
|
|
|
@ -53,7 +53,7 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# ensure that there is a currently logged in admin user.
|
|
|
|
|
#
|
|
|
|
|
# This setting changes the method which Active Admin calls
|
|
|
|
|
# within the controller.
|
|
|
|
|
# within the application controller.
|
|
|
|
|
config.authentication_method = :authenticate_admin_user!
|
|
|
|
|
|
|
|
|
|
# == User Authorization
|
|
|
|
@ -64,8 +64,13 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# CanCanAdapter or make your own. Please refer to documentation.
|
|
|
|
|
# config.authorization_adapter = ActiveAdmin::CanCanAdapter
|
|
|
|
|
|
|
|
|
|
# In case you prefer Pundit over other solutions you can here pass
|
|
|
|
|
# the name of default policy class. This policy will be used in every
|
|
|
|
|
# case when Pundit is unable to find suitable policy.
|
|
|
|
|
# config.pundit_default_policy = "MyDefaultPunditPolicy"
|
|
|
|
|
|
|
|
|
|
# You can customize your CanCan Ability class name here.
|
|
|
|
|
# config.cancan_ability_class = 'Ability'
|
|
|
|
|
# config.cancan_ability_class = "Ability"
|
|
|
|
|
|
|
|
|
|
# You can specify a method to be called on unauthorized access.
|
|
|
|
|
# This is necessary in order to prevent a redirect loop which happens
|
|
|
|
@ -80,7 +85,7 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# user performing them.
|
|
|
|
|
#
|
|
|
|
|
# This setting changes the method which Active Admin calls
|
|
|
|
|
# to return the currently logged in user.
|
|
|
|
|
# (within the application controller) to return the currently logged in user.
|
|
|
|
|
config.current_user_method = :current_admin_user
|
|
|
|
|
|
|
|
|
|
# == Logging Out
|
|
|
|
@ -115,13 +120,20 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# Admin.
|
|
|
|
|
#
|
|
|
|
|
# You can completely disable comments:
|
|
|
|
|
# config.allow_comments = false
|
|
|
|
|
#
|
|
|
|
|
# You can disable the menu item for the comments index page:
|
|
|
|
|
# config.show_comments_in_menu = false
|
|
|
|
|
# config.comments = false
|
|
|
|
|
#
|
|
|
|
|
# You can change the name under which comments are registered:
|
|
|
|
|
# config.comments_registration_name = 'AdminComment'
|
|
|
|
|
#
|
|
|
|
|
# You can change the order for the comments and you can change the column
|
|
|
|
|
# to be used for ordering:
|
|
|
|
|
# config.comments_order = 'created_at ASC'
|
|
|
|
|
#
|
|
|
|
|
# You can disable the menu item for the comments index page:
|
|
|
|
|
# config.comments_menu = false
|
|
|
|
|
#
|
|
|
|
|
# You can customize the comment menu:
|
|
|
|
|
# config.comments_menu = { parent: 'Admin', priority: 1 }
|
|
|
|
|
|
|
|
|
|
# == Batch Actions
|
|
|
|
|
#
|
|
|
|
@ -134,11 +146,46 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# You can add before, after and around filters to all of your
|
|
|
|
|
# Active Admin resources and pages from here.
|
|
|
|
|
#
|
|
|
|
|
# config.before_filter :do_something_awesome
|
|
|
|
|
# config.before_action :do_something_awesome
|
|
|
|
|
|
|
|
|
|
# == Localize Date/Time Format
|
|
|
|
|
#
|
|
|
|
|
# Set the localize format to display dates and times.
|
|
|
|
|
# To understand how to localize your app with I18n, read more at
|
|
|
|
|
# https://github.com/svenfuchs/i18n/blob/master/lib%2Fi18n%2Fbackend%2Fbase.rb#L52
|
|
|
|
|
#
|
|
|
|
|
config.localize_format = :long
|
|
|
|
|
|
|
|
|
|
# == Setting a Favicon
|
|
|
|
|
#
|
|
|
|
|
# config.favicon = '/assets/favicon.ico'
|
|
|
|
|
# config.favicon = 'favicon.ico'
|
|
|
|
|
|
|
|
|
|
# == Meta Tags
|
|
|
|
|
#
|
|
|
|
|
# Add additional meta tags to the head element of active admin pages.
|
|
|
|
|
#
|
|
|
|
|
# Add tags to all pages logged in users see:
|
|
|
|
|
# config.meta_tags = { author: 'My Company' }
|
|
|
|
|
|
|
|
|
|
# By default, sign up/sign in/recover password pages are excluded
|
|
|
|
|
# from showing up in search engine results by adding a robots meta
|
|
|
|
|
# tag. You can reset the hash of meta tags included in logged out
|
|
|
|
|
# pages:
|
|
|
|
|
# config.meta_tags_for_logged_out_pages = {}
|
|
|
|
|
|
|
|
|
|
# == Removing Breadcrumbs
|
|
|
|
|
#
|
|
|
|
|
# Breadcrumbs are enabled by default. You can customize them for individual
|
|
|
|
|
# resources or you can disable them globally from here.
|
|
|
|
|
#
|
|
|
|
|
# config.breadcrumb = false
|
|
|
|
|
|
|
|
|
|
# == Create Another Checkbox
|
|
|
|
|
#
|
|
|
|
|
# Create another checkbox is disabled by default. You can customize it for
|
|
|
|
|
# individual resources or you can enable them globally from here.
|
|
|
|
|
#
|
|
|
|
|
# config.create_another = true
|
|
|
|
|
|
|
|
|
|
# == Register Stylesheets & Javascripts
|
|
|
|
|
#
|
|
|
|
@ -151,7 +198,7 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
#
|
|
|
|
|
# You can provide an options hash for more control, which is passed along to
|
|
|
|
|
# stylesheet_link_tag():
|
|
|
|
|
# config.register_stylesheet 'my_print_stylesheet.css', :media => :print
|
|
|
|
|
# config.register_stylesheet 'my_print_stylesheet.css', media: :print
|
|
|
|
|
#
|
|
|
|
|
# To load a javascript file:
|
|
|
|
|
# config.register_javascript 'my_javascript.js'
|
|
|
|
@ -159,10 +206,10 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# == CSV options
|
|
|
|
|
#
|
|
|
|
|
# Set the CSV builder separator
|
|
|
|
|
# config.csv_options = { :col_sep => ';' }
|
|
|
|
|
# config.csv_options = { col_sep: ';' }
|
|
|
|
|
#
|
|
|
|
|
# Force the use of quotes
|
|
|
|
|
# config.csv_options = { :force_quotes => true }
|
|
|
|
|
# config.csv_options = { force_quotes: true }
|
|
|
|
|
|
|
|
|
|
# == Menu System
|
|
|
|
|
#
|
|
|
|
@ -174,9 +221,8 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
#
|
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
|
# admin.build_menu :utility_navigation do |menu|
|
|
|
|
|
# menu.add label: 'My Great Website',
|
|
|
|
|
# url: 'http://www.mygreatwebsite.com',
|
|
|
|
|
# html_options: { target: :blank }
|
|
|
|
|
# menu.add label: "My Great Website",
|
|
|
|
|
# url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
|
|
|
|
|
# admin.add_logout_button_to_menu menu
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
@ -185,9 +231,8 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
#
|
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
|
# admin.build_menu :default do |menu|
|
|
|
|
|
# menu.add label: 'My Great Website',
|
|
|
|
|
# url: 'http://www.mygreatwebsite.com',
|
|
|
|
|
# html_options: { target: :blank }
|
|
|
|
|
# menu.add label: "My Great Website",
|
|
|
|
|
# url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
@ -218,12 +263,37 @@ ActiveAdmin.setup do |config|
|
|
|
|
|
# You can control the default per page count for all resources here.
|
|
|
|
|
#
|
|
|
|
|
# config.default_per_page = 30
|
|
|
|
|
#
|
|
|
|
|
# You can control the max per page count too.
|
|
|
|
|
#
|
|
|
|
|
# config.max_per_page = 10_000
|
|
|
|
|
|
|
|
|
|
# == Filters
|
|
|
|
|
#
|
|
|
|
|
# By default the index screen includes a 'Filters' sidebar on the right hand
|
|
|
|
|
# side with a filter for each attribute of the registered model.
|
|
|
|
|
# By default the index screen includes a "Filters" sidebar on the right
|
|
|
|
|
# hand side with a filter for each attribute of the registered model.
|
|
|
|
|
# You can enable or disable them for all resources here.
|
|
|
|
|
#
|
|
|
|
|
# config.filters = true
|
|
|
|
|
#
|
|
|
|
|
# By default the filters include associations in a select, which means
|
|
|
|
|
# that every record will be loaded for each association.
|
|
|
|
|
# You can enabled or disable the inclusion
|
|
|
|
|
# of those filters by default here.
|
|
|
|
|
#
|
|
|
|
|
# config.include_default_association_filters = true
|
|
|
|
|
|
|
|
|
|
# == Footer
|
|
|
|
|
#
|
|
|
|
|
# By default, the footer shows the current Active Admin version. You can
|
|
|
|
|
# override the content of the footer here.
|
|
|
|
|
#
|
|
|
|
|
# config.footer = 'my custom footer text'
|
|
|
|
|
|
|
|
|
|
# == Sorting
|
|
|
|
|
#
|
|
|
|
|
# By default ActiveAdmin::OrderClause is used for sorting logic
|
|
|
|
|
# You can inherit it with own class and inject it for all resources
|
|
|
|
|
#
|
|
|
|
|
# config.order_clause = MyOrderClause
|
|
|
|
|
end
|
|
|
|
|