diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index bdbe52b9c89..6f1ec69eb9e 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -228,7 +228,7 @@ export default DiscourseController.extend({ }).then(function(result) { if (result.responseJson.action === "enqueued") { - self.send('postWasEnqueued', {pending_count: result.responseJson.pending_count }); + self.send('postWasEnqueued', result.responseJson); self.destroyDraft(); self.close(); return result; diff --git a/app/assets/javascripts/discourse/controllers/post-enqueued.js.es6 b/app/assets/javascripts/discourse/controllers/post-enqueued.js.es6 index 77c79b724a7..5cb644f22e3 100644 --- a/app/assets/javascripts/discourse/controllers/post-enqueued.js.es6 +++ b/app/assets/javascripts/discourse/controllers/post-enqueued.js.es6 @@ -1 +1,6 @@ -export default Ember.Controller.extend(); +export default Ember.Controller.extend({ + description: Ember.computed('model.reason', function() { + const reason = this.get('model.reason'); + return reason ? I18n.t('queue_reason.' + reason + '.description') : I18n.t('queue.approval.description'); + }) +}); diff --git a/app/assets/javascripts/discourse/routes/application.js.es6 b/app/assets/javascripts/discourse/routes/application.js.es6 index 55967c0dbd9..03e1c453c35 100644 --- a/app/assets/javascripts/discourse/routes/application.js.es6 +++ b/app/assets/javascripts/discourse/routes/application.js.es6 @@ -38,7 +38,8 @@ const ApplicationRoute = Discourse.Route.extend({ }, postWasEnqueued(details) { - showModal('post-enqueued', {model: details, title: 'queue.approval.title' }); + const title = details.reason ? 'queue_reason.' + details.reason + '.title' : 'queue.approval.title'; + showModal('post-enqueued', {model: details, title }); }, composePrivateMessage(user, post) { diff --git a/app/assets/javascripts/discourse/templates/modal/post-enqueued.hbs b/app/assets/javascripts/discourse/templates/modal/post-enqueued.hbs index ad547994a39..1ebdd0c4c40 100644 --- a/app/assets/javascripts/discourse/templates/modal/post-enqueued.hbs +++ b/app/assets/javascripts/discourse/templates/modal/post-enqueued.hbs @@ -1,5 +1,5 @@
{{i18n "queue.approval.description"}}
+{{{description}}}
{{{i18n "queue.approval.pending_posts" count=model.pending_count}}}