Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add button to ActiveAdmin's index page

I created a collection action for ActiveAdmin rescource and want to link to it from the resource index page.

But how do I customize the resource index page?

The manual gives some options, but none to add html / buttons on the page (or I cannot see where).

http://activeadmin.info/docs/3-index-pages.html

like image 858
hakunin Avatar asked Oct 24 '14 12:10

hakunin


1 Answers

You can create buttons on index page with action_item block:

action_item only: :index do
  link_to 'Button text', post_path(post)
end

https://github.com/activeadmin/activeadmin/blob/master/docs/8-custom-actions.md#action-items

like image 194
nistvan Avatar answered Oct 12 '22 11:10

nistvan