FEATURE: Allow admin to change timestamp of topic.

This commit is contained in:
Guo Xiang Tan
2015-07-26 00:06:49 +08:00
parent 90388aa18e
commit c7a21b7c23
11 changed files with 257 additions and 0 deletions

View File

@@ -1241,6 +1241,13 @@ en:
other: "Please choose the new owner of the {{count}} posts by <b>{{old_user}}</b>."
instructions_warn: "Note that any notifications about this post will not be transferred to the new user retroactively.<br>Warning: Currently, no post-dependent data is transferred over to the new user. Use with caution."
change_timestamp:
title: "Change Timestamp"
action: "change timestamp"
invalid_timestamp: "Timestamp cannot be in the future."
error: "There was an error changing the timestamp of the topic."
instructions: "Please select the new timestamp of the topic. Posts in the topic will be updated to have the same time difference."
multi_select:
select: 'select'
selected: 'selected ({{count}})'

View File

@@ -466,6 +466,7 @@ Discourse::Application.routes.draw do
post "t/:topic_id/move-posts" => "topics#move_posts", constraints: {topic_id: /\d+/}
post "t/:topic_id/merge-topic" => "topics#merge_topic", constraints: {topic_id: /\d+/}
post "t/:topic_id/change-owner" => "topics#change_post_owners", constraints: {topic_id: /\d+/}
put "t/:topic_id/change-timestamp" => "topics#change_timestamps", constraints: {topic_id: /\d+/}
delete "t/:topic_id/timings" => "topics#destroy_timings", constraints: {topic_id: /\d+/}
put "t/:topic_id/bookmark" => "topics#bookmark", constraints: {topic_id: /\d+/}
put "t/:topic_id/remove_bookmarks" => "topics#remove_bookmarks", constraints: {topic_id: /\d+/}