Hehe - I was working on an addon for some updates to the approval queue when I originally saw your message yesterday and responded.
So today I decided to try and add some functionality to my addon to allow users to reverse the default sort order of the approval queue.
After playing with some class extensions to override the
findUnapprovedContent
function I mentioned above - I realised that it was going to be far from trivial, because changing the sort order there broke a heap of other stuff in the UI (you couldn't ever change the sort order - the filter menu no longer worked because it assumed the default would be "ascending"
).
So after staring at my screen blankly for a while - I noticed the query parameters that show up when you reverse the sort order using the filter menu - which gave me a flash of inspiration.
Why not just change the link to the approval queue to include the query parameters?
So, here's how to reverse the approval queue's default sort order using nothing more than a template modification:
- Template modification type:
Public
- Template:
PAGE_CONTAINER
- Modification key:
reverseApprovalQueue
(or something else unique!)
- Description:
Changes the links to the approval queue to reverse the default sort order
(or whatever)
- Search type:
Simple replacement
- Find:
{{ link('approval-queue') }}
- Replace:
{{ link('approval-queue', null, {'order': 'content_date', 'direction': 'desc'}) }}
... and you're done!
This should automatically replace the two links to the approval queue (one of them is in the Moderator menu) and reverse the sort order by default - and you can swap it back using the filters menu.
Just in case you don't want to create the modification by hand, I'll be releasing my addon shortly which includes this functionality - will link to it when it's online.