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

additional collapse mode for stacked inlines #265

Open
etanter opened this issue Aug 24, 2023 · 2 comments
Open

additional collapse mode for stacked inlines #265

etanter opened this issue Aug 24, 2023 · 2 comments

Comments

@etanter
Copy link

etanter commented Aug 24, 2023

Hi!

There are currently two options to collapse stacked inlines:

  • collapse: shows only the title when collapsed, but the title doesn't show the count of inlines, and when the title is expanded, each entry is expanded too
  • collapse-entry: shows title + collapsed entries, and title shows the count of inlines

I'm looking for a mix: show only title + count when collapsed, then clicking on title shows collapsed entries.
Another way to put it: a version of collapse-entry in which the title bar itself can be collapsed/expanded.

Do you think you could add this feature?

Thanks!

@abidibo
Copy link
Member

abidibo commented Sep 6, 2023

Hi @etanter, actually I cannot see the "count of inlines" in my apps. What am I missing? Can you share a screenshot?

@etanter
Copy link
Author

etanter commented Sep 7, 2023

@abidibo I looked into it and the count of inlines was there because of a (old?) edit_inline/stacked.html template (that I had customized in order to grab a custom name for the group of inlines), which has ({{ inline_admin_formset.formset|length }}). That must be legacy django admin template code.

Independent of this counting stuff, the main feature I was requesting is the option to have a version of collapse that when expanded shows the collapsed entries instead of all entries expanded (could be named collapse-collapsed-entries or something like that).

But I'm now pondering whether it would be a useful addition or not for my project. So feel free to close if you don't see it as an interesting feature.

Thanks again!

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

2 participants