I really wanted to see this functionality but I all saw was talk so I
scratched my own itch. Code wise it is pretty clean but the UI is
functional but ugly. All the movements are via the page index page
with a little ajax for #3 and #4. It works on the “styled blog” test
This adds five movements to pages:
#1 Sort up in container
#2 Sort down in container
#3 Become a child of one of my parents siblings
#4 Become a child of one of my siblings
#5 Become a sibling of my parent
Sorting is via a sort attribute. On creation each page is assigned a
sort_id from a bottomless pool. Changes in the sort are via swaping
sort_id’s with the next page in the proper direction. The original
order of the sort presently used is maintained to some degree as the
sort attribute is assigned sequentially over time with has the same
effect of the ASC timestamp sort.
Reparenting is constrained to those movements that make sense. The
root node can not be preparented. moves that there is no where to
move to are also blocked at the UI level
Steps needed to use this:
run migrate to add column and add sort table
set sort id’s for existing pages " update pages set sort_id = id;"
wroks on postgresql and maintains the orginal sorting order
set the sequence used by the sort table to the id after the last
assigned one in the pages table. OR for other DB file the sort table
to the same point as pages table # put the icons inplace.
The icons I used are ugly.
Does not stop reparenting to virtual pages.
Moves could be made to display via AJAX without refreshing page.