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

Add collapsible attribute to lists #1231

Merged
merged 2 commits into from
Sep 26, 2017

Conversation

newbthenewbd
Copy link
Contributor

It doesn't occur to me that collapsing a list with a single field in it has any use aside from looking ugly. Fieldsets already have this, too, so here we go. The attribute defaults to true, so both backward and forward compatibility should be preserved just fine. (well, if an older grav-plugin-admin version tried to load a blueprint with this attribute set to 0, it would just be ignored, I suppose that's nice enough compatibility)

@w00fz
Copy link
Member

w00fz commented Sep 26, 2017

This was not going to work, the check should have been field.collapsible is not defined or field.collapsible instead of if field.collapsible is empty or field.collapsible.

I updated it for you. I like the idea and consistency this change makes with fieldsets, thanks!

@rhukster rhukster merged commit 230bdcc into getgrav:develop Sep 26, 2017
@newbthenewbd
Copy link
Contributor Author

Thank You for the update and merging!

In my tests, is empty worked, but I sure do not have enough expertise with Twig to rate as to which way is the correct one. After the update, however, there is still a single is empty check at line 68 of list.html.twig. Is that intentional?

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

Successfully merging this pull request may close these issues.

3 participants