2013-11-14 17:07:48 +01:00
|
|
|
ActiveAdmin.setup do |config|
|
|
|
|
# == Site Title
|
|
|
|
#
|
|
|
|
# Set the title that is displayed on the main layout
|
|
|
|
# for each of the active admin pages.
|
|
|
|
#
|
2014-08-06 14:47:47 +02:00
|
|
|
config.site_title = 'Agenda Du Libre'
|
2013-11-14 17:07:48 +01:00
|
|
|
|
|
|
|
# Set the link url for the title. For example, to take
|
|
|
|
# users to your main site. Defaults to no link.
|
|
|
|
#
|
2014-08-08 21:08:15 +02:00
|
|
|
config.site_title_link = '/'
|
2013-11-14 17:07:48 +01:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
#
|
2014-08-08 21:08:15 +02:00
|
|
|
# config.site_title_image = 'logo.png'
|
2013-11-14 17:07:48 +01:00
|
|
|
|
|
|
|
# == Default Namespace
|
|
|
|
#
|
|
|
|
# Set the default namespace each administration resource
|
|
|
|
# will be added to.
|
|
|
|
#
|
|
|
|
# eg:
|
|
|
|
# config.default_namespace = :hello_world
|
|
|
|
#
|
|
|
|
# This will create resources in the HelloWorld module and
|
|
|
|
# will namespace routes to /hello_world/*
|
|
|
|
#
|
|
|
|
# To set no namespace by default, use:
|
|
|
|
# config.default_namespace = false
|
|
|
|
#
|
|
|
|
# Default:
|
|
|
|
# config.default_namespace = :admin
|
|
|
|
#
|
|
|
|
# You can customize the settings for each namespace by using
|
|
|
|
# a namespace block. For example, to change the site title
|
|
|
|
# within a namespace:
|
|
|
|
#
|
|
|
|
# config.namespace :admin do |admin|
|
2014-08-08 21:08:15 +02:00
|
|
|
# admin.site_title = 'Custom Admin Title'
|
2013-11-14 17:07:48 +01:00
|
|
|
# end
|
|
|
|
#
|
|
|
|
# This will ONLY change the title for the admin section. Other
|
2014-08-08 21:08:15 +02:00
|
|
|
# namespaces will continue to use the main 'site_title' configuration.
|
2013-11-14 17:07:48 +01:00
|
|
|
|
|
|
|
# == User Authentication
|
|
|
|
#
|
|
|
|
# Active Admin will automatically call an authentication
|
|
|
|
# method in a before filter of all controller actions to
|
|
|
|
# ensure that there is a currently logged in admin user.
|
|
|
|
#
|
|
|
|
# This setting changes the method which Active Admin calls
|
|
|
|
# within the controller.
|
|
|
|
config.authentication_method = :authenticate_admin_user!
|
|
|
|
|
|
|
|
# == User Authorization
|
|
|
|
#
|
|
|
|
# Active Admin will automatically call an authorization
|
|
|
|
# method in a before filter of all controller actions to
|
|
|
|
# ensure that there is a user with proper rights. You can use
|
|
|
|
# CanCanAdapter or make your own. Please refer to documentation.
|
|
|
|
# config.authorization_adapter = ActiveAdmin::CanCanAdapter
|
|
|
|
|
|
|
|
# You can customize your CanCan Ability class name here.
|
2014-08-08 21:08:15 +02:00
|
|
|
# config.cancan_ability_class = 'Ability'
|
2013-11-14 17:07:48 +01:00
|
|
|
|
|
|
|
# You can specify a method to be called on unauthorized access.
|
|
|
|
# This is necessary in order to prevent a redirect loop which happens
|
|
|
|
# because, by default, user gets redirected to Dashboard. If user
|
|
|
|
# doesn't have access to Dashboard, he'll end up in a redirect loop.
|
|
|
|
# Method provided here should be defined in application_controller.rb.
|
|
|
|
# config.on_unauthorized_access = :access_denied
|
|
|
|
|
|
|
|
# == Current User
|
|
|
|
#
|
|
|
|
# Active Admin will associate actions with the current
|
|
|
|
# user performing them.
|
|
|
|
#
|
|
|
|
# This setting changes the method which Active Admin calls
|
|
|
|
# to return the currently logged in user.
|
|
|
|
config.current_user_method = :current_admin_user
|
|
|
|
|
|
|
|
# == Logging Out
|
|
|
|
#
|
|
|
|
# Active Admin displays a logout link on each screen. These
|
|
|
|
# settings configure the location and method used for the link.
|
|
|
|
#
|
|
|
|
# This setting changes the path where the link points to. If it's
|
|
|
|
# a string, the strings is used as the path. If it's a Symbol, we
|
|
|
|
# will call the method to return the path.
|
|
|
|
#
|
|
|
|
# Default:
|
|
|
|
config.logout_link_path = :destroy_admin_user_session_path
|
|
|
|
|
|
|
|
# This setting changes the http method used when rendering the
|
|
|
|
# link. For example :get, :delete, :put, etc..
|
|
|
|
#
|
|
|
|
# Default:
|
|
|
|
# config.logout_link_method = :get
|
|
|
|
|
|
|
|
# == Root
|
|
|
|
#
|
|
|
|
# Set the action to call for the root path. You can set different
|
|
|
|
# roots for each namespace.
|
|
|
|
#
|
|
|
|
# Default:
|
|
|
|
# config.root_to = 'dashboard#index'
|
|
|
|
|
|
|
|
# == Admin Comments
|
|
|
|
#
|
2014-08-06 14:47:47 +02:00
|
|
|
# This allows your users to comment on any resource registered with Active
|
|
|
|
# Admin.
|
2013-11-14 17:07:48 +01:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# You can change the name under which comments are registered:
|
|
|
|
# config.comments_registration_name = 'AdminComment'
|
|
|
|
|
|
|
|
# == Batch Actions
|
|
|
|
#
|
|
|
|
# Enable and disable Batch Actions
|
|
|
|
#
|
|
|
|
config.batch_actions = true
|
|
|
|
|
|
|
|
# == Controller Filters
|
|
|
|
#
|
|
|
|
# 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
|
2014-08-06 14:47:47 +02:00
|
|
|
|
2013-11-14 17:07:48 +01:00
|
|
|
# == Setting a Favicon
|
|
|
|
#
|
|
|
|
# config.favicon = '/assets/favicon.ico'
|
|
|
|
|
|
|
|
# == Register Stylesheets & Javascripts
|
|
|
|
#
|
|
|
|
# We recommend using the built in Active Admin layout and loading
|
|
|
|
# up your own stylesheets / javascripts to customize the look
|
|
|
|
# and feel.
|
|
|
|
#
|
|
|
|
# To load a stylesheet:
|
|
|
|
# config.register_stylesheet 'my_stylesheet.css'
|
|
|
|
#
|
2014-08-06 14:47:47 +02:00
|
|
|
# You can provide an options hash for more control, which is passed along to
|
|
|
|
# stylesheet_link_tag():
|
2013-11-14 17:07:48 +01:00
|
|
|
# config.register_stylesheet 'my_print_stylesheet.css', :media => :print
|
|
|
|
#
|
|
|
|
# To load a javascript file:
|
|
|
|
# config.register_javascript 'my_javascript.js'
|
|
|
|
|
|
|
|
# == CSV options
|
|
|
|
#
|
|
|
|
# Set the CSV builder separator
|
|
|
|
# config.csv_options = { :col_sep => ';' }
|
|
|
|
#
|
|
|
|
# Force the use of quotes
|
|
|
|
# config.csv_options = { :force_quotes => true }
|
|
|
|
|
|
|
|
# == Menu System
|
|
|
|
#
|
2014-08-06 14:47:47 +02:00
|
|
|
# You can add a navigation menu to be used in your application, or configure
|
|
|
|
# a provided menu
|
2013-11-14 17:07:48 +01:00
|
|
|
#
|
2014-08-06 14:47:47 +02:00
|
|
|
# To change the default utility navigation to show a link to your website & a
|
|
|
|
# logout btn
|
2013-11-14 17:07:48 +01:00
|
|
|
#
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
# admin.build_menu :utility_navigation do |menu|
|
2014-08-08 21:08:15 +02:00
|
|
|
# menu.add label: 'My Great Website',
|
|
|
|
# url: 'http://www.mygreatwebsite.com',
|
2014-08-06 14:47:47 +02:00
|
|
|
# html_options: { target: :blank }
|
2013-11-14 17:07:48 +01:00
|
|
|
# admin.add_logout_button_to_menu menu
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
#
|
|
|
|
# If you wanted to add a static menu item to the default menu provided:
|
|
|
|
#
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
# admin.build_menu :default do |menu|
|
2014-08-08 21:08:15 +02:00
|
|
|
# menu.add label: 'My Great Website',
|
|
|
|
# url: 'http://www.mygreatwebsite.com',
|
2014-08-06 14:47:47 +02:00
|
|
|
# html_options: { target: :blank }
|
2013-11-14 17:07:48 +01:00
|
|
|
# end
|
|
|
|
# end
|
|
|
|
|
|
|
|
# == Download Links
|
|
|
|
#
|
|
|
|
# You can disable download links on resource listing pages,
|
|
|
|
# or customize the formats shown per namespace/globally
|
|
|
|
#
|
|
|
|
# To disable/customize for the :admin namespace:
|
|
|
|
#
|
|
|
|
# config.namespace :admin do |admin|
|
|
|
|
#
|
|
|
|
# # Disable the links entirely
|
|
|
|
# admin.download_links = false
|
|
|
|
#
|
|
|
|
# # Only show XML & PDF options
|
|
|
|
# admin.download_links = [:xml, :pdf]
|
|
|
|
#
|
|
|
|
# # Enable/disable the links based on block
|
|
|
|
# # (for example, with cancan)
|
|
|
|
# admin.download_links = proc { can?(:view_download_links) }
|
|
|
|
#
|
|
|
|
# end
|
|
|
|
|
|
|
|
# == Pagination
|
|
|
|
#
|
|
|
|
# Pagination is enabled by default for all resources.
|
|
|
|
# You can control the default per page count for all resources here.
|
|
|
|
#
|
|
|
|
# config.default_per_page = 30
|
|
|
|
|
|
|
|
# == Filters
|
|
|
|
#
|
2014-08-08 21:08:15 +02:00
|
|
|
# By default the index screen includes a 'Filters' sidebar on the right hand
|
2014-08-06 14:47:47 +02:00
|
|
|
# side with a filter for each attribute of the registered model.
|
2013-11-14 17:07:48 +01:00
|
|
|
# You can enable or disable them for all resources here.
|
|
|
|
#
|
|
|
|
# config.filters = true
|
|
|
|
end
|