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
_navigation.html.erb: Hide resources without index #1524
Conversation
Thank you for this @bekicot! I think you are on the right track, but this perhaps could be simpler? Would it be possible to use the existing |
After re-read your comment properly at #1418, I think I have to support my assumtion that Above comment was made with premature knowledge. |
Sorry, I don't understand your example :-( Did you mean "products" when you said "orders"? In your spec, you make Product Meta Tags not have an index page. Therefore it doesn't show on the navigation. I expect that it will not show in the navigation in any page: it will not show in products/index, products/show, product_meta_tags/show, etc. The navigation partial is the same in all pages, regardless of what resource we are looking at. Also, I have tried implementing it with |
I was wrong, I wasn't carefully read the source code and made some wrong assumptions. Looks like #1418 is aiming toward to fix the same issue. If you prefer to wait on that PR to be fixed, you can close this one since this PR is later. If you think you prefer this PR and request some change, let me know. |
I think that your solution was much closer, and it will be easier for you to adapt it to what I'm asking. If you do it, I'll approve this PR. |
I've already used |
Oh sorry, I didn't notice you had pushed changes! |
This will hide link on the navigation bar for resources without an index page.
Add interface
actions
to Administrate::Namespace::Resource that can be a solution to #1517.