|
| 1 | +ActiveAdmin.setup do |config| |
| 2 | + |
| 3 | + # == Site Title |
| 4 | + # |
| 5 | + # Set the title that is displayed on the main layout |
| 6 | + # for each of the active admin pages. |
| 7 | + # |
| 8 | + config.site_title = "Test App" |
| 9 | + |
| 10 | + # Set the link url for the title. For example, to take |
| 11 | + # users to your main site. Defaults to no link. |
| 12 | + # |
| 13 | + # config.site_title_link = "/" |
| 14 | + |
| 15 | + # Set an optional image to be displayed for the header |
| 16 | + # instead of a string (overrides :site_title) |
| 17 | + # |
| 18 | + # Note: Recommended image height is 21px to properly fit in the header |
| 19 | + # |
| 20 | + # config.site_title_image = "/images/logo.png" |
| 21 | + |
| 22 | + # == Default Namespace |
| 23 | + # |
| 24 | + # Set the default namespace each administration resource |
| 25 | + # will be added to. |
| 26 | + # |
| 27 | + # eg: |
| 28 | + # config.default_namespace = :hello_world |
| 29 | + # |
| 30 | + # This will create resources in the HelloWorld module and |
| 31 | + # will namespace routes to /hello_world/* |
| 32 | + # |
| 33 | + # To set no namespace by default, use: |
| 34 | + # config.default_namespace = false |
| 35 | + # |
| 36 | + # Default: |
| 37 | + # config.default_namespace = :admin |
| 38 | + # |
| 39 | + # You can customize the settings for each namespace by using |
| 40 | + # a namespace block. For example, to change the site title |
| 41 | + # within a namespace: |
| 42 | + # |
| 43 | + # config.namespace :admin do |admin| |
| 44 | + # admin.site_title = "Custom Admin Title" |
| 45 | + # end |
| 46 | + # |
| 47 | + # This will ONLY change the title for the admin section. Other |
| 48 | + # namespaces will continue to use the main "site_title" configuration. |
| 49 | + |
| 50 | + # == User Authentication |
| 51 | + # |
| 52 | + # Active Admin will automatically call an authentication |
| 53 | + # method in a before filter of all controller actions to |
| 54 | + # ensure that there is a currently logged in admin user. |
| 55 | + # |
| 56 | + # This setting changes the method which Active Admin calls |
| 57 | + # within the controller. |
| 58 | + config.authentication_method = :authenticate_admin_user! |
| 59 | + |
| 60 | + |
| 61 | + # == Current User |
| 62 | + # |
| 63 | + # Active Admin will associate actions with the current |
| 64 | + # user performing them. |
| 65 | + # |
| 66 | + # This setting changes the method which Active Admin calls |
| 67 | + # to return the currently logged in user. |
| 68 | + config.current_user_method = :current_admin_user |
| 69 | + |
| 70 | + |
| 71 | + # == Logging Out |
| 72 | + # |
| 73 | + # Active Admin displays a logout link on each screen. These |
| 74 | + # settings configure the location and method used for the link. |
| 75 | + # |
| 76 | + # This setting changes the path where the link points to. If it's |
| 77 | + # a string, the strings is used as the path. If it's a Symbol, we |
| 78 | + # will call the method to return the path. |
| 79 | + # |
| 80 | + # Default: |
| 81 | + config.logout_link_path = :destroy_admin_user_session_path |
| 82 | + |
| 83 | + # This setting changes the http method used when rendering the |
| 84 | + # link. For example :get, :delete, :put, etc.. |
| 85 | + # |
| 86 | + # Default: |
| 87 | + # config.logout_link_method = :get |
| 88 | + |
| 89 | + # == Root |
| 90 | + # |
| 91 | + # Set the action to call for the root path. You can set different |
| 92 | + # roots for each namespace. |
| 93 | + # |
| 94 | + # Default: |
| 95 | + # config.root_to = 'dashboard#index' |
| 96 | + |
| 97 | + # == Admin Comments |
| 98 | + # |
| 99 | + # Admin comments allow you to add comments to any model for admin use. |
| 100 | + # Admin comments are enabled by default. |
| 101 | + # |
| 102 | + # Default: |
| 103 | + # config.allow_comments = true |
| 104 | + # |
| 105 | + # You can turn them on and off for any given namespace by using a |
| 106 | + # namespace config block. |
| 107 | + # |
| 108 | + # Eg: |
| 109 | + # config.namespace :without_comments do |without_comments| |
| 110 | + # without_comments.allow_comments = false |
| 111 | + # end |
| 112 | + |
| 113 | + |
| 114 | + # == Batch Actions |
| 115 | + # |
| 116 | + # Enable and disable Batch Actions |
| 117 | + # |
| 118 | + config.batch_actions = true |
| 119 | + |
| 120 | + |
| 121 | + # == Controller Filters |
| 122 | + # |
| 123 | + # You can add before, after and around filters to all of your |
| 124 | + # Active Admin resources and pages from here. |
| 125 | + # |
| 126 | + # config.before_filter :do_something_awesome |
| 127 | + |
| 128 | + |
| 129 | + # == Register Stylesheets & Javascripts |
| 130 | + # |
| 131 | + # We recommend using the built in Active Admin layout and loading |
| 132 | + # up your own stylesheets / javascripts to customize the look |
| 133 | + # and feel. |
| 134 | + # |
| 135 | + # To load a stylesheet: |
| 136 | + # config.register_stylesheet 'my_stylesheet.css' |
| 137 | + |
| 138 | + # You can provide an options hash for more control, which is passed along to stylesheet_link_tag(): |
| 139 | + # config.register_stylesheet 'my_print_stylesheet.css', :media => :print |
| 140 | + # |
| 141 | + # To load a javascript file: |
| 142 | + # config.register_javascript 'my_javascript.js' |
| 143 | + |
| 144 | + |
| 145 | + # == CSV options |
| 146 | + # |
| 147 | + # Set the CSV builder separator (default is ",") |
| 148 | + # config.csv_column_separator = ',' |
| 149 | + # |
| 150 | + # Set the CSV builder options (default is {}) |
| 151 | + # config.csv_options = {} |
| 152 | + |
| 153 | + |
| 154 | + # == Menu System |
| 155 | + # |
| 156 | + # You can add a navigation menu to be used in your application, or configure a provided menu |
| 157 | + # |
| 158 | + # To change the default utility navigation to show a link to your website & a logout btn |
| 159 | + # |
| 160 | + # config.namespace :admin do |admin| |
| 161 | + # admin.build_menu :utility_navigation do |menu| |
| 162 | + # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } |
| 163 | + # admin.add_logout_button_to_menu menu |
| 164 | + # end |
| 165 | + # end |
| 166 | + # |
| 167 | + # If you wanted to add a static menu item to the default menu provided: |
| 168 | + # |
| 169 | + # config.namespace :admin do |admin| |
| 170 | + # admin.build_menu :default do |menu| |
| 171 | + # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } |
| 172 | + # end |
| 173 | + # end |
| 174 | + |
| 175 | + # == Download Links |
| 176 | + # |
| 177 | + # You can disable download links on resource listing pages, |
| 178 | + # or customize the formats shown per namespace/globally |
| 179 | + # |
| 180 | + # To disable/customize for the :admin namespace: |
| 181 | + # |
| 182 | + # config.namespace :admin do |admin| |
| 183 | + # |
| 184 | + # # Disable the links entirely |
| 185 | + # admin.download_links = false |
| 186 | + # |
| 187 | + # # Only show XML & PDF options |
| 188 | + # admin.download_links = [:xml, :pdf] |
| 189 | + # |
| 190 | + # end |
| 191 | + |
| 192 | + |
| 193 | + # == Pagination |
| 194 | + # |
| 195 | + # Pagination is enabled by default for all resources. |
| 196 | + # You can control the default per page count for all resources here. |
| 197 | + # |
| 198 | + # config.default_per_page = 30 |
| 199 | + |
| 200 | + |
| 201 | + # == Filters |
| 202 | + # |
| 203 | + # By default the index screen includes a “Filters” sidebar on the right |
| 204 | + # hand side with a filter for each attribute of the registered model. |
| 205 | + # You can enable or disable them for all resources here. |
| 206 | + # |
| 207 | + # config.filters = true |
| 208 | + |
| 209 | + |
| 210 | +end |
0 commit comments