-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize action item label #3035
Comments
IRC Discussion on this topic. Summary of temporary workaround: config.action_items[0] = ActiveAdmin::ActionItem.new only: :index do
link_to "Foo", new_admin_foo_path
end This would keep all the other action items in place (i.e. edit, destroy) without having to redefine them. There is some brainstorming further down in the IRC discussing ways to make this easier, but not sure if it or anything like it is going to get implemented any time soon. |
Thanks @shekibobo for your support. Yes it's nicer to not have to redefine all the action items. Personally I would see something like the following: action_item :new, only: :index, label: 'Nouvelle Page' but it does not seem obvious to change this by reading the code. Unfortunately, I fell back with the customization of the locale file with a more generic (but uglier) word because the page title kept the old one, in my case Nouveau Page. Feel free to close the case if you will ;) |
#2823 fix this |
Hi,
Is there a clean way to customise the label of an action item ?
Note : Active Admin 1.0.0.pre
For example, if I register a Page resource with locale set to
:fr
I then have a new action link with the label Nouveau Page but in french page is feminine so the right way would be Nouvelle Page.I found the following solution:
but I would only like to change the label and not rewrite the whole stuff ?
By the way, thanks for the job on ActiveAdmin.
The text was updated successfully, but these errors were encountered: