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

menu nesting/submenu items #28

Open
ericjgreen opened this issue Apr 15, 2021 · 7 comments
Open

menu nesting/submenu items #28

ericjgreen opened this issue Apr 15, 2021 · 7 comments

Comments

@ericjgreen
Copy link

HI, wanted to start by saying this has been a very useful tool, but one apparent limitation is the potential to nest menus (sub-menus). Any possibility this functionality could come in a future release?
Cheers!
Eric

@cdrx
Copy link
Owner

cdrx commented Apr 15, 2021

I won't write this personally, but if someone implements it and opens a PR, I'd love to include it.

@vladdoster
Copy link

@ericjgreen Mind elaborating this feature request? I think I will implement an open PR, but not sure if we want the same thing in the submenu.

Current:

admin-menu

I plan on:

  1. Moving Welcome { username } / view site / change password / signoutvertically to a drop downmenu in the nav bar to
    match rest of styling.
  2. Add a submenu on each model to easily:
    • Create a new record of the model

@vladdoster
Copy link

@cdrx Have any concerns about my additions? I can add a toggle setting to allow users to swap to the modified layout I want to add?

Feel free to assign this issue to me as well once we get through fleshing out details.

@ericjgreen
Copy link
Author

Hi Vlad, Hope you are well.

What my suggestion/request was is to add a submenu that would allow.. let's say Under the world menu item, we have 3 items: cities, continents, and countries. Let's say that we wanted to make the countries item a submenu item. Under the countries submenu we would setup 5 regions: Americas, APAC, Eastern Europe, Western Europe, Africa, Other. Each of these 5 regions would be a menu item which then linked to the countries in those regions.

As I think the above isn't the best description, I'll describe a real-world scenario I'm facing. I have a project.. let's say purchase orders. In this purchase order project, I have multiple apps. Each app has both transactional and master data which is how I want to list them in the Admin Menu.

My menu would look something like this:
Purchase Orders --> Transactional Data --> Headers (my actual model/table)
Purchase Orders --> Transactional Data --> Details
Purchase Orders --> Master Data --> Item Details
Purchase Orders --> Master Data --> Stores
Purchase Orders --> Master Data --> Salesmen

Customers --> Transactional Data --> Invoices
Customers --> Transactional Data --> Payments
Customers --> Master Data --> Customer Details
Customers --> Master Data --> Locations
Customers --> Master Data --> Contacts

arguably, we could find a scenario where multiple submenus could be used:

Purchase Orders --> Master Data --> Salesmen -->Info (name, email, etc.)
Purchase Orders --> Master Data --> Salesmen --> Phones (each phone, home, mobile, business, a different record in this table)

while the above may not be the best example, I think it gives way to the need for submenu of submenu items.
Today, django-admin-menu (while it's a GREAT tool which I use daily), doesn't allow me to create sub menu layers.

Additionally, I'm still picking up Python, Django, etc. and I don't feel confident enough in my skills yet to contribute in a productive way to this endeavor. Now, I'm more than happy to help test the fire out of it :o)

If you have other questions, please feel free to give me a shout and I'll be more than happy to help in any way i can.

Cheers,
Eric

@ericjgreen
Copy link
Author

for what it's worth... I also love this idea.

1. Moving Welcome { username } / view site / change password / signout vertically to a drop downmenu in the nav bar to
match rest of styling.

@merwok
Copy link

merwok commented Apr 23, 2021

Is there also a spot for change language in that list? 🙂
(it’s a feature that’s provided by django admin but not automatically enabled in URLs or shown in template)

@cdrx
Copy link
Owner

cdrx commented Apr 24, 2021

@cdrx Have any concerns about my additions? I can add a toggle setting to allow users to swap to the modified layout I want to add?

Adding a top right hand side drop down menu sounds great.

Adding a submenu to every admin with an "create new record" link I am not so sure about. If this menu only had "create" option, it will not be clear to the user how to get to the list of records. Having "add record" and "list record" options feels redundant.

It could be useful if there was some function to link to pre-defined filters. For example, with a Country admin, there could be

"All Regions" loads /admin/countries/
"Americas" loads /admin/countries/?region=Americas
"APAC" loads /admin/countries/?region=APAC
.. and so on

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

No branches or pull requests

4 participants