mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Shared Drafts
This feature can be enabled by choosing a destination for the `shared drafts category` site setting. * Staff members can create shared drafts, choosing a destination category for the topic when it is published. * Shared Drafts can be viewed in their category, or above the topic list for the destination category where it will end up. * When the shared draft is ready, it can be published to the appropriate category by clicking a button on the topic view. * When published, Drafts change their timestamps to the current time, and any edits to the original post are removed.
This commit is contained in:
@@ -8,15 +8,21 @@ class TopicListSerializer < ApplicationSerializer
|
||||
:for_period,
|
||||
:per_page,
|
||||
:top_tags,
|
||||
:tags
|
||||
:tags,
|
||||
:shared_drafts
|
||||
|
||||
has_many :topics, serializer: TopicListItemSerializer, embed: :objects
|
||||
has_many :shared_drafts, serializer: TopicListItemSerializer, embed: :objects
|
||||
has_many :tags, serializer: TagSerializer, embed: :objects
|
||||
|
||||
def can_create_topic
|
||||
scope.can_create?(Topic)
|
||||
end
|
||||
|
||||
def include_shared_drafts?
|
||||
object.shared_drafts.present?
|
||||
end
|
||||
|
||||
def include_for_period?
|
||||
for_period.present?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user