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

Hierarchical CRUD does not allow to add new root nodes #1443

Open
nursix opened this issue Jan 23, 2018 · 0 comments
Open

Hierarchical CRUD does not allow to add new root nodes #1443

nursix opened this issue Jan 23, 2018 · 0 comments

Comments

@nursix
Copy link
Member

nursix commented Jan 23, 2018

S3HierarchyCRUD:
https://github.com/sahana/eden/blob/master/modules/s3/s3hierarchy.py#L46

...allows to add child categories to existing categories, but it doesn't have an option to add new root categories.

While for some use-cases (e.g. branch hierarchy of an organization) this is deliberate, other use-cases (e.g. type hierarchies) would need an option to add new root nodes - so should be extended to support that.

One possible way could be to add a pseudo-root node (labeled with the title_list CRUD string of the entity itself), so that it offers a context menu with (just) "Add". Detection of the special nature of this node in the client-side script could be achieved by mapping it to id=0.

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

1 participant