mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
UX: Display group topics in a topic list.
This commit is contained in:
parent
d3f5b4e4b0
commit
a35227918f
12 changed files with 269 additions and 18 deletions
|
@ -220,6 +220,16 @@ class TopicQuery
|
|||
.where('um.user_id IS NULL')
|
||||
end
|
||||
|
||||
def list_group_topics(group)
|
||||
list = default_results.where("
|
||||
topics.user_id IN (
|
||||
SELECT user_id FROM group_users gu WHERE gu.group_id = #{group.id.to_i}
|
||||
)
|
||||
")
|
||||
|
||||
create_list(:group_topics, {}, list)
|
||||
end
|
||||
|
||||
def list_private_messages(user)
|
||||
list = private_messages_for(user, :user)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue