-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add enabled
to actions to allow enabling/disabling links
#1765
Milestone
Comments
(And, yes, I would be willing to provide a pull request, if others think this is useful.) |
👍 |
1 similar comment
👍 |
Already implemented by 10655cb, forcing |
I lied, not implemented yet 🙇 |
Hello! New message, please read http://thomascart.com/girl.php?ooy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the
visible
options allows controlling which (member) actions should be shown. When making a member action invisible, the positions of subsequent links to other member actions change. This is not good from a UI perspective, because a user might click the wrong button after it has moved away from where it normally would appear.An image says more than 1000 words. So, I added a custom action
publish!
, which should be available for unpublished objects only. Currently, when hiding my action for already published objects, the buttons afterpublish!
change position:What I am suggesting is a new option called
enabled
, which will always render an icon for an action. However, ifenabled
isfalse
, the button would be rendered in gray and no link would be rendered. Inconfig/initializers/rails_admin.rb
, theenabled
option would be set for individual members.And the final result would look like so:
This way, all buttons will always stay at the same position.
This would require small changes in the RailsAdmin
application_helper.rb
, namely inmenu_for
. Links should only be rendered if theenabled
option returnstrue
for a member.What do you think?
The text was updated successfully, but these errors were encountered: