0

I am new in ruby and generated an admin panel using devise and active admin but I want to change the default layout and design of whole active admin. I have researched this but mostly information is outdated and not providing a proper way to do this most of the information is incomplete.

Is there any way to do this?

Vaibhav Dhoke
  • 459
  • 6
  • 14
john
  • 611
  • 1
  • 7
  • 33
  • Possible duplicate of [How can I customize the active admin layout?](https://stackoverflow.com/questions/7452418/how-can-i-customize-the-active-admin-layout) – Vaibhav Dhoke Sep 27 '17 at 10:22
  • Why not just monkey-patch the necessary views from here? https://github.com/activeadmin/activeadmin/tree/master/lib/active_admin/views – NM Pennypacker Sep 27 '17 at 11:57
  • Yes, it's a duplicate. The original answer discusses how to override the Arbre views, my answer below is a plugin that uses an Erb template at the top level instead. – Piers C Sep 27 '17 at 20:20

2 Answers2

0

You can use this for changing theme of active admin https://github.com/paladini/activeadmin-themes

Vaibhav Dhoke
  • 459
  • 6
  • 14
  • Thanks but what if I want to use my own theme?? – john Sep 27 '17 at 10:22
  • Well, you can override the views from here, active admin does not generate a view but it programmatically generates a view, for more details you can have a look at view that is generated in this [link](https://github.com/activeadmin/activeadmin/tree/master/lib/active_admin/views) – Vaibhav Dhoke Sep 27 '17 at 10:29
  • I have seen your provided link but my answer is still there that I want a method to override the default views.The material you have provided does not address my issue. – john Sep 27 '17 at 10:33
  • I have my own theme now what is the method/procedure/steps to override the default theme with my own theme? – john Sep 27 '17 at 10:35
  • Can you share which part you want to customise, footer, tabbed_navigation, header, tab as navigation? – Vaibhav Dhoke Sep 27 '17 at 10:39
  • I have metronic theme I want to change login,forgot password page and then the dashboard page. I want to modify them according to metronic theme. – john Sep 27 '17 at 10:41
  • specifically header, footer ,sidebar, content means according to my own theme. – john Sep 27 '17 at 10:42
  • Login Part, this is the view of [login](https://github.com/activeadmin/activeadmin/blob/92ed4174bf9ced41193b2572711729d6daffeffa/app/views/active_admin/devise/sessions/new.html.erb), Css of [login](https://github.com/activeadmin/activeadmin/blob/d01155f73a0e2cc27d712792270357e2b3759d05/app/assets/stylesheets/active_admin/pages/_logged_out.scss). – Vaibhav Dhoke Sep 27 '17 at 10:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/155413/discussion-between-vaibhav-dhoke-and-john). – Vaibhav Dhoke Sep 27 '17 at 10:46
  • Changing themes changes CSS but not the layout. An updated list of themes is maintained on the [wiki](https://github.com/activeadmin/activeadmin/wiki/Themes). – Piers C Sep 27 '17 at 20:13
0

You can use the ActiveAdmin custom layout plugin. However, if you find yourself wanting to customize everything consider whether you might be better off with regular Rails scaffolding, without ActiveAdmin.

Piers C
  • 2,880
  • 1
  • 23
  • 29