mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Show tags on flags too
This commit is contained in:
@@ -11,11 +11,12 @@ class ReviewableSerializer < ApplicationSerializer
|
||||
:type,
|
||||
:topic_id,
|
||||
:topic_url,
|
||||
:topic_tags,
|
||||
:category_id,
|
||||
:created_at,
|
||||
:can_edit,
|
||||
:score,
|
||||
:version
|
||||
:version,
|
||||
)
|
||||
|
||||
has_one :created_by, serializer: BasicUserSerializer, root: 'users'
|
||||
@@ -87,6 +88,14 @@ class ReviewableSerializer < ApplicationSerializer
|
||||
data
|
||||
end
|
||||
|
||||
def topic_tags
|
||||
object.topic.tags.map(&:name)
|
||||
end
|
||||
|
||||
def include_topic_tags?
|
||||
object.topic.present? && SiteSetting.tagging_enabled?
|
||||
end
|
||||
|
||||
def topic_url
|
||||
return object.target.url if object.target.is_a?(Post)
|
||||
return object.topic.url
|
||||
|
||||
Reference in New Issue
Block a user