As a follow-up to #2311957: Add weights to linkit profiles which allows giving profiles precedence via a weight field, we should allow sorting the list of profiles in the UI by weight!
I tried to come up with a combined "Enabled, weight" sort and was unable to figure a way to combine those into a single rational sorting value.
I also couldn't figure out how to make a sort the default - making it the default on the form was easy (that's just overriding the ::list_form()
method) but it didn't actually make it the default when the form was loaded initially. So, it's just one of many options and not the default.
I'll attach a patch in a moment!
Comment | File | Size | Author |
---|---|---|---|
#2 | linkit-profile-weight-sort-2820268-2.patch | 933 bytes | dsnopek |
Comments
Comment #2
dsnopekHere's the patch! Please let me know what you think :-)
Comment #3
cboyden CreditAttribution: cboyden commentedWe've been using this patch for a while and it's working as expected.
Comment #4
anonThanks for patch.