diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 51e8af5dd..29e0fd5fe 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -72,11 +72,22 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected this.toggleProperty('summaryCollapsed'); }, - moveSelected: function() { + splitTopic: function() { var modalController = this.get('controllers.modal'); if (!modalController) return; - modalController.show(Discourse.MoveSelectedView.create({ + modalController.show(Discourse.SplitTopicView.create({ + topicController: this, + topic: this.get('content'), + selectedPosts: this.get('selectedPosts') + })); + }, + + mergeTopic: function() { + var modalController = this.get('controllers.modal'); + if (!modalController) return; + + modalController.show(Discourse.MergeTopicView.create({ topicController: this, topic: this.get('content'), selectedPosts: this.get('selectedPosts') diff --git a/app/assets/javascripts/discourse/templates/modal/move_selected_existing_topic.js.handlebars b/app/assets/javascripts/discourse/templates/modal/merge_topic.js.handlebars similarity index 82% rename from app/assets/javascripts/discourse/templates/modal/move_selected_existing_topic.js.handlebars rename to app/assets/javascripts/discourse/templates/modal/merge_topic.js.handlebars index 8fbc1febe..2f3325bb4 100644 --- a/app/assets/javascripts/discourse/templates/modal/move_selected_existing_topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/merge_topic.js.handlebars @@ -5,7 +5,7 @@ {{/if}} -
{{{i18n topic.move_selected.existing_topic.instructions count="view.selectedPostsCount"}}}
+{{{i18n topic.merge_topic.instructions count="view.selectedPostsCount"}}}
{{view Discourse.ChooseTopicView selectedTopicIdBinding="view.selectedTopicId"}} diff --git a/app/assets/javascripts/discourse/templates/modal/move_selected.js.handlebars b/app/assets/javascripts/discourse/templates/modal/move_selected.js.handlebars deleted file mode 100644 index 4946725cc..000000000 --- a/app/assets/javascripts/discourse/templates/modal/move_selected.js.handlebars +++ /dev/null @@ -1,8 +0,0 @@ -{{{i18n topic.move_selected.instructions count="view.selectedPostsCount"}}}
- - - - -