Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As mentioned here, I've split this feature off from actually getting the admin forms ordered by Role Weight.
The idea in this issue is to improve the UI for setting role weights - ideally the admin_user_roles form should not only sort by role weight, but should contain select fields or similar to allow the weights to be set. This form currently exists for adding roles, not setting their properties, so we need to deal with two submit buttons/functions.
Might also be worth considering Drupal 6's AJAX sorting à la menu items/blocks.
Comment | File | Size | Author |
---|---|---|---|
#5 | role_weights-sort_by_drag-257478.patch | 9.03 KB | heltem |
Comments
Comment #1
pfaocleGah, incorrect link in there that makes no sense. First line of that should've been:
"As mentioned here, I've split this feature off from actually getting the admin forms ordered by Role Weight."
Comment #2
1kenthomas CreditAttribution: 1kenthomas commentedAny traction here? This would certainly be better than the current available ordering method, prepending with digits...
Comment #3
pfaocleI'm committing some changes to the 5.x-1.x-dev branch at the moment (tokens, ordering admin forms). I want to get another 5.x release tagged with these long-overdue features in. After that, I plan to try and spend some time on a 6.x port. It makes sense to leave this UI feature until the 6.x port is underway so we can (hopefully) take full advantage of the new drag n' drop stuff.
PS I wasn't quite sure what you meant by "prepending with digits"? I guessed you prepend role names with 1, 2, 3 etc - do you do this alongside using Role Weights?
Comment #4
pfaoclehttp://api.drupal.org/api/function/drupal_add_tabledrag/6
Comment #5
heltem CreditAttribution: heltem commentedHi,
Here is a patch to remove current role weight setting relying on hook_form_alter() and add the js drag&drop sorting gui on admin/user/role/weight menu item.
Please review.
Comment #6
pfaocleWow, thanks! Will try to test/review as soon as I can!
Comment #7
heltem CreditAttribution: heltem commentedAny comment ?
Comment #8
pfaocleHave not had time to test the patch I'm afraid, but I'm not sure I like the idea of a separate admin page. Is it possible for the drag/drop JS elements of the patch to be applied to the existing table of roles at admin/user/roles?
Comment #9
lpalgarvio CreditAttribution: lpalgarvio commentedhey
please "steal" the code from Role Weight
http://drupal.org/project/roleweight
it should help.
Comment #10
lpalgarvio CreditAttribution: lpalgarvio commented#421624: Role Weight Vs. Role Weights
Comment #11
pfaocleWon't be adding this to 6.x - role weighting taken care of in core for > 7.x. Sorry, D6 folks.