Reputation: 1695
I'm using active admin gem. In one table i want admins page to have some extra fields apart from the default functionalities. Is it possible to have a default active admin page + a provision to render some html.
I want something like this in picture
The extra feature that i was talking was about push notification and message and that text area part
Upvotes: 0
Views: 784
Reputation: 441
Unfortunately, it seems index doesn't support custom rendering: https://github.com/gregbell/active_admin/issues/813#issuecomment-3059957
However, you might have luck using panel
, except in my experience that renders above the table ActiveAdmin generates.
Upvotes: 0
Reputation: 2970
If you want a page with your own content, you could register a page: http://www.activeadmin.info/docs/10-custom-pages.html
But if you want to customise the default html strucure of the index page, you have to re-open the ActiveAdmin::Views::Pages module and override the build_page_content method. You can do this inside your app, for example create a new file in app/lib folder and override the method.
https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/pages/base.rb#L62
or if you want to customise the index table: https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/pages/index.rb
Not a nice solution, but it's work. :/
Upvotes: 1