The permission "reorder children" is currently ignored. The only reference to it seems to be in hook_perm. The attached patch makes it so that only users with this permission can access the children tab.
Thanks,
David
| Comment | File | Size | Author |
|---|---|---|---|
| nodehierarchy-reorder-children-perm.patch | 497 bytes | davidmprice |
Comments
Comment #1
dgorton commentedAgreed - this is being ignored. I think there are reasons to access the Children tab that don't include reordering, however (e.g. to see what children are there and in what order). So - I think this ought to be be a check before giving the reorder functionality within the child tab - not a check to view the child tab at all.
Comment #2
davidmprice commentedFair enough. The behavior that you describe would also have worked for me. I'm no longer on the project where I needed this patch so am unlikely to do anything more on it. Thanks for following it up though.
Comment #3
ronan commentedJust going to put this out there: Does anybody care about this permission? Since it's been there for however long and nobody noticed that it doesn't work, I'd vote we just remove it altogether and have one less thing to worry about.
Comment #4
markhalliwellYes, I am interested in implementing this. I would like to make a reference to #386530: Option to hide Children tab per node type as well. I think that viewing and reordering children needs to have a little more control. I will upload a patch later today for implementing #0.
Comment #5
mustanggb commentedI would also find this handy
Started to look at this a couple of weeks ago actually
But didn't get anything useful out of it
Comment #6
markhalliwellThe reference in #4 is now:
#921198: Rework administration and node create/edit with new features and clean design
In the latest patch of that issue, I created a new permission "view children". EDIT: I removed "view site outline", no longer used in 6.x-2.x
I went ahead and removed the "reorder children" perm becauseI would like to seriously rework how the children table functions.Essentially, Node Hierarchy takes over Drupal's core menu system. EDIT: I added a "per node type" optional feature to hide the default core menu fieldset on the edit form. Because of this, nodes are listed in the menus in the order they were created. When you reorder the list, they take a negative value and any new nodes are listed at the bottom.
I would like to propose the following potential new features for children before we allow the "reorder children" perm back in:
* Sort alphabetically (A-Z) -- should be new default
* Sort alphabetically (Z-A)
* Sort by creation date -- current default
* Sort by updated date
* Sort manually (TableDrag) -- also current default, which can confuse people
Another concept that I recently thought about is:
* Sticky Children
This is actually a nifty idea because it would allow nodes to always appear at the top regardless of whichever sort you define above. We could also create a secondary sort for these as well using the same sort method mentioned above. This would obviously have it's own perms so that moderators or site admins could sticky at will while others couldn't.
Let me know your thoughts and let's get coding :)
EDIT: Sorry that I forgot to upload a patch like I said I would. It's been a little busy with my day job and I was also working on the above issue patch :)
Comment #7
markhalliwellAny thoughts on this?