Alan Guo Xiang Tan
6e5e607072
DEV: Support ordering filters on /filter
route ( #21275 )
...
This commit adds support for the following ordering filters:
1. `order:activity` which orders the topics by `Topic#bumped_at` in descending order
2. `order:activity-asc` which orders the topics by `Topic#bumped_at` in ascending order
3. `order:latest-post` which orders the topics by `Topic#last_posted_at` in descending order
4. `order:latest-post-asc` which orders the topics by `Topic#last_posted_at` in ascending order
5. `order:created` which orders the topics by `Topic#created_at` in descending order
6. `order:created-asc` which orders the topics by `Topic#created_at` in ascending order
7. `order:views` which orders the topics by `Topic#views` in descending order
8. `order:views-asc` which orders the topics by `Topic#views` in ascending order
9. `order:likes` which orders the topics by `Topic#likes` in descending order
10. `order:likes-asc` which orders the topics by `Topic#likes` in ascending order
11. `order:likes-op` which orders the topics by `Post#like_count` of the first post in the topic in descending order
12. `order:likes-op-asc` which orders the topics by `Post#like_count` of the first post in the topic in ascending order
13. `order:posters` which orders the topics by `Topic#participant_count` in descending order
14. `order:posters-asc` which orders the topics by `Topic#participant_count` in ascending order
15. `order:category` which orders the topics by `Category#name` of the topic's category in descending order
16. `order:category-asc` which orders the topics by `Category#name` of the topic's category in ascending order
Multiple order filters can be composed together and the order of ordering is applied based on the position of the filter
in the query string. For example, `order:views order:created` will order the topics by `Topic#views` in descending order
and then order the topics by `Topics#created_at` in descending order.
2023-04-27 15:44:58 +08:00
..
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-03-16 16:09:22 +01:00
2022-04-28 11:51:03 +02:00
2023-01-20 12:52:49 -06:00
2023-03-27 09:22:38 -05:00
2023-01-09 12:10:19 +00:00
2023-04-20 10:53:10 +10:00
2023-02-27 17:20:00 +01:00
2023-02-16 10:47:01 +00:00
2023-02-20 06:20:47 +03:00
2023-01-09 12:10:19 +00:00
2023-03-24 10:16:53 +10:00
2023-03-16 15:27:09 -06:00
2023-04-21 19:35:00 +01:00
2021-08-20 11:29:06 +02:00
2023-04-25 13:37:29 +08:00
2023-01-31 16:53:24 +01:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-02-09 16:24:24 +00:00
2023-03-10 17:17:59 +08:00
2023-04-20 11:28:08 -05:00
2023-03-01 12:45:33 +01:00
2023-04-24 12:17:51 +01:00
2023-03-30 08:35:06 -04:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-16 09:08:44 +11:00
2023-04-03 11:09:36 -03:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-04-05 12:28:16 +01:00
2023-02-16 18:15:56 +03:00
2023-03-29 11:54:25 -04:00
2023-01-09 12:10:19 +00:00
2023-03-13 08:09:38 +08:00
2023-02-23 07:47:11 +10:00
2023-04-12 09:45:29 +01:00
2023-01-09 12:10:19 +00:00
2023-03-21 10:40:42 -04:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2020-04-30 16:48:53 +10:00
2023-01-27 12:28:47 +08:00
2021-05-21 11:43:47 +10:00
2023-01-05 08:43:58 +10:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-02-01 09:55:21 +00:00
2023-01-09 12:10:19 +00:00
2023-02-21 10:30:48 +01:00
2023-04-25 10:08:00 -05:00
2023-01-09 12:10:19 +00:00
2023-02-21 10:30:48 +01:00
2023-01-09 12:10:19 +00:00
2023-04-26 20:05:22 +03:00
2023-03-16 15:27:09 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2019-05-13 09:31:32 +08:00
2023-01-10 22:38:52 +02:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2021-06-14 20:34:44 +05:30
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-04-19 15:30:12 +02:00
2023-01-09 12:10:19 +00:00
2023-04-24 17:39:02 +01:00
2023-01-09 12:10:19 +00:00
2023-03-30 14:39:55 +11:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-04-18 11:01:11 -06:00
2023-01-09 12:10:19 +00:00
2023-04-24 12:17:51 +01:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2022-04-05 19:29:58 +02:00
2023-03-01 08:58:32 +11:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-04-20 14:57:40 +02:00
2023-01-09 12:10:19 +00:00
2019-05-13 09:31:32 +08:00
2023-01-09 12:10:19 +00:00
2023-02-21 10:30:48 +01:00
2023-03-08 15:27:17 +10:00
2023-01-09 12:10:19 +00:00
2022-01-21 17:54:18 +02:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2021-11-11 12:21:25 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-25 18:55:01 +02:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-04-24 20:22:37 -05:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-03-22 10:19:59 +10:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-25 18:55:33 +02:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-02-03 10:02:14 +08:00
2023-01-09 12:10:19 +00:00
2023-04-11 10:16:28 +01:00
2023-04-05 17:00:05 +01:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-02-21 10:30:48 +01:00
2023-03-02 16:40:53 +01:00
2023-02-21 10:30:48 +01:00
2019-05-13 09:31:32 +08:00
2023-01-09 12:10:19 +00:00
2023-04-05 13:31:31 -05:00
2023-03-20 16:56:43 +01:00
2023-04-20 14:57:40 +02:00
2023-03-30 13:52:10 +10:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-12 09:41:39 +10:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-02-13 12:39:45 +08:00
2019-12-03 10:05:53 +01:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-04-18 14:32:18 +08:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2019-05-13 09:31:32 +08:00
2023-01-09 12:10:19 +00:00
2023-03-20 11:41:23 -05:00
2023-02-17 18:38:21 -03:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-03-06 11:41:47 +03:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-20 12:52:49 -06:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-03-20 13:51:39 -05:00
2023-04-11 08:48:07 +08:00
2023-03-02 13:05:45 -03:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-03-31 09:03:15 +11:00
2023-01-09 12:10:19 +00:00
2023-04-27 15:44:58 +08:00
2023-03-01 15:35:21 +11:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2020-07-21 15:55:03 +08:00
2023-01-09 12:10:19 +00:00
2023-04-11 14:10:44 -04:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-03-09 11:52:26 +10:00
2023-03-23 12:01:04 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00
2023-04-18 16:14:41 +08:00
2023-01-09 12:10:19 +00:00
2023-01-09 12:10:19 +00:00