Enable column sorting main topic list

This commit is contained in:
Robin Ward
2013-11-14 15:50:36 -05:00
parent 67041d1c6d
commit 968c0672ef
10 changed files with 78 additions and 50 deletions

View File

@ -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