mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 14:20:13 +08:00
UX: moved posts message links to the first post at the destination topic
This commit is contained in:
parent
e8d35653ae
commit
3e9230714f
@ -182,9 +182,13 @@ class PostMover
|
|||||||
move_type_str = PostMover.move_types[@move_type].to_s
|
move_type_str = PostMover.move_types[@move_type].to_s
|
||||||
|
|
||||||
message = I18n.with_locale(SiteSetting.default_locale) do
|
message = I18n.with_locale(SiteSetting.default_locale) do
|
||||||
I18n.t("move_posts.#{move_type_str}_moderator_post",
|
I18n.t(
|
||||||
|
"move_posts.#{move_type_str}_moderator_post",
|
||||||
count: posts.length,
|
count: posts.length,
|
||||||
topic_link: "[#{destination_topic.title}](#{destination_topic.relative_url})")
|
topic_link: posts.first.is_first_post? ?
|
||||||
|
"[#{destination_topic.title}](#{destination_topic.relative_url})" :
|
||||||
|
"[#{destination_topic.title}](#{posts.first.url})"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
original_topic.add_moderator_post(
|
original_topic.add_moderator_post(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user