Rename 'popular' to 'latest'. First stab at 'Hot' tab.

This commit is contained in:
Robin Ward
2013-03-27 16:17:49 -04:00
parent d1945057fd
commit 36269cfbaa
52 changed files with 946 additions and 323 deletions

View File

@ -103,8 +103,8 @@ class TopicQuery
TopicList.new(@user, results)
end
# The popular view of topics
def list_popular
# The latest view of topics
def list_latest
TopicList.new(@user, default_list)
end
@ -121,6 +121,16 @@ class TopicQuery
end
end
def list_hot
return_list(unordered: true) do |list|
# Let's not include topic categories on hot
list = list.where("categories.topic_id <> topics.id")
list =list.order("coalesce(categories.hotness, 5) desc, topics.bumped_at desc")
end
end
def list_new
TopicList.new(@user, new_results)
end