mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Enable column sorting main topic list
This commit is contained in:
parent
67041d1c6d
commit
968c0672ef
10 changed files with 78 additions and 50 deletions
|
@ -42,6 +42,10 @@ module TopicQuerySQL
|
|||
end
|
||||
end
|
||||
|
||||
def order_by_category_sql(dir)
|
||||
"CASE WHEN categories.id = #{SiteSetting.uncategorized_category_id.to_i} THEN '' ELSE categories.name END #{dir}"
|
||||
end
|
||||
|
||||
# If you've clearned the pin, use bumped_at, otherwise put it at the top
|
||||
def order_nocategory_with_pinned_sql
|
||||
"CASE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue