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!

CommentFileSizeAuthor
#2 linkit-profile-weight-sort-2820268-2.patch933 bytesdsnopek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
FileSize
933 bytes

Here's the patch! Please let me know what you think :-)

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

We've been using this patch for a while and it's working as expected.

anon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for patch.

  • anon committed 05472a1 on 7.x-3.x authored by dsnopek
    Issue #2820268 by dsnopek, anon: Allow sorting profiles by weight in UI
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.