-
Notifications
You must be signed in to change notification settings - Fork 9
Admin customization
You can customize the way the admin panel behaves with the following :
In the config initializer, just add :
config.admin_title = "Your admin title"
Para allows you to add javascripts and stylesheets to be requiered at the end of the admin.js and admin.css files.
Those files are required with the asset pipeline, so you can add requires inside, create your own directory structure, and require it in the right file. This allows you to require external scripts and stylesheets, from other gems for example.
Note: You must restart your server after creating the asset files in order to let the asset pipeline take into account your file. Once this is done, you won't need to restart your server when updating the files.
To add scripts loaded in the main admin.js
file, create a file at app/assets/javascripts/admin/app.(js|coffee)
and put your scripts inside.
To add stylesheets loaded in the main admin.css
file, create a file at app/assets/stylesheets/admin/app.(css|scss|sass)
and put your styles inside.
If the file you created isn't take into account when compiling your assets in staging / production, you can update your assets version in config/initializers/assets.rb
to force the complete recompilation of your assets.