Skip to content
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

Submenu for less important models? #261

Closed
heri opened this issue Nov 21, 2015 · 5 comments
Closed

Submenu for less important models? #261

heri opened this issue Nov 21, 2015 · 5 comments

Comments

@heri
Copy link

heri commented Nov 21, 2015

Hi

I am looking to use administrate for a healthcare site. There are many models, and I am looking to have a main right menu, clicking on a main model would expand on additional models.

For example:

- Users
- Categories
- Services
- Conversations
- Transactions

When the user clicks on conversations then it would show :

- Users
- Categories
- Services
- Conversations
   * Messages
   * Bookings
- Transactions

Same for transactions which would then show transactions_processes transitions shipping addresses payments checkout_accounts, and so on.

The benefit is to show a simpler interface when the user logs in, but still being able to have a more complex interface, if required.

Has anyone done something similar? What would be the optimal way to do this?

Thank you

@heri
Copy link
Author

heri commented Nov 21, 2015

I have an array in DashboardManifest

  MINOR = [
    :listings,
    :listing_availabilities,
    :messages,
    :locations,
    :transactions,
    :testimonials
  ]

and have added padding for those "minor" models (see commit )
screen shot 2015-11-21 at 2 56 35 pm

But still wondering if someone had done something more elegant

Thank you

@c-lliope
Copy link
Contributor

Hello, Heri!

I think the best way for you to do this would be to copy the sidebar template into your host application, at app/views/admin/application/_sidebar.html.erb, and make the customizations in your host application instead of in your fork of Administrate.

You can also copy over application.scss into your app/assets/stylesheets/administrate/application.scss for custom stylesheets.

To make this process easier, I'm adding generators to copy over the files automatically. (#269)

@carlosramireziii
Copy link
Collaborator

@heri

#269 has been merged so you can now generate the sidebar view with the following command

rails generate administrate:views:sidebar

See the documentation for more information.

@neidiom
Copy link

neidiom commented Dec 18, 2021

How do we handle this issue in 2021?

@pablobm
Copy link
Collaborator

pablobm commented Dec 30, 2021

Nowadays, the generator is called administrate:views:navigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants