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

Select all subpages when checking parent page #1052

Closed
timobrembeck opened this issue Dec 7, 2021 · 1 comment · Fixed by #1250
Closed

Select all subpages when checking parent page #1052

timobrembeck opened this issue Dec 7, 2021 · 1 comment · Fixed by #1250
Assignees
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working
Milestone

Comments

@timobrembeck
Copy link
Member

Motivation

In the page tree, typically a parent page should include all its subpages for all bulk actions.

Proposed Solution

When selecting a parent page in the page tree, all its sub-pages should be selected as well. This also applies to de-selecting a page. After that, it should be possible to (de-)select individual subpages without changing the selection status of the parent page.

Alternatives

Additional Context

@timobrembeck timobrembeck added 💡 feature New feature or request ⁉️ prio: low Not urgent, can be resolved in the distant future. labels Dec 7, 2021
@timobrembeck timobrembeck added this to the Version 1.2 milestone Dec 7, 2021
@svenseeberg svenseeberg added ‼️ prio: high Needs to be resolved ASAP. and removed ⁉️ prio: low Not urgent, can be resolved in the distant future. labels Feb 21, 2022
@svenseeberg svenseeberg modified the milestones: Version 1.2, Version 1.1 Feb 21, 2022
@svenseeberg svenseeberg self-assigned this Feb 21, 2022
@svenseeberg svenseeberg added the 🐛 bug Something isn't working label Feb 21, 2022
@svenseeberg svenseeberg modified the milestones: Version 1.1, Version 1.0 Feb 21, 2022
@svenseeberg svenseeberg removed the 💡 feature New feature or request label Feb 21, 2022
@timobrembeck timobrembeck modified the milestones: Version 1.0, Version 1.1 Feb 21, 2022
@svenseeberg svenseeberg removed their assignment Feb 21, 2022
@svenseeberg
Copy link
Member

svenseeberg commented Feb 23, 2022

Basic concept: when executing a bulk action (XLIFF & PDF export), the view needs to check which checkboxes/pages are in the HTTP Post variables and which pages actually exist. All existing pages that are not in the HTTP POST inherit the "checked" status from the parent that is in the post.

We could create a decorator that can be applied to bulk action views/methods. This decorator could expand the post variables to all objects in the tree.

We have one special case to consider: if children are already loaded but collapsed again. To address this, we need to send a "collapsed=(True|False)" along for the parent node that indicates how to handle the check boxes that are not visible to the user but exist in the POST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants