diem-project / diem

Diem CMF CMS for symfony 1.4
http://diem-project.org/
MIT License
184 stars 85 forks source link

DmSortable alike interface for NestedSets in admin #269

Closed 4levels closed 13 years ago

4levels commented 14 years ago

Hi Diem Team,

Diem provides a very nice jQuery drag'n'drop feature in the admin to sort records having the DmSortable behaviour. Can this also be achieved for records behaving as NestedSets? Instead of showing a flat list of draggable buttons as the DmSortable interface, the same jQuery tree as seen on the seo/pages module could be used instead. As the seo/pages already features a very clever drag'n'drop tree interface, this looks really possible to implement this for any nestedSet module.

To me a nestedSet is also a sortable behaviour, actually an even more advanced sorting, hence I feel like this is really lacking in the admin. My clients really don't understand the root_id, lft, rgt, level columns ...

To summarize: as soon as an admin module has a NestedSet model, a link 'Sort' is provided taking the user to a tree view where the records can be drag'n'dropped around the tree.

4levels commented 14 years ago

Hi Diem Team,

I can imagine that the nestedSet:hasManyRoots option can be a real trouble to implement this easily. Therefore I think it is totally acceptable to limit this feature to nestedSets without multiple root id's. IMO the only difference is one general root node for the customers, which doesn't affect the nestedSets functionality in any negative way.

4levels commented 14 years ago

Hi Team,

can someone get me started on how the Sort feature for modules with DmSortable models is implemented? I'd love to give this a try..

4levels commented 14 years ago

I figured the following (as posted in the forum topic 108):