diff --git a/app/assets/javascripts/discourse/routes/topic_route.js b/app/assets/javascripts/discourse/routes/topic_route.js index 94821fc08..b1f0ac802 100644 --- a/app/assets/javascripts/discourse/routes/topic_route.js +++ b/app/assets/javascripts/discourse/routes/topic_route.js @@ -23,9 +23,8 @@ Discourse.TopicRoute = Discourse.Route.extend({ composePrivateMessage: function(user) { var self = this; - - Discourse.URL.routeTo("/users/" + user.get('username_lower') + "/private-messages").then(function () { - self.controllerFor('userActivity').send('composePrivateMessage') + this.transitionTo('userPrivateMessages', user).then(function () { + self.controllerFor('userActivity').send('composePrivateMessage'); }); }, diff --git a/app/assets/javascripts/discourse/templates/poster_expansion.handlebars b/app/assets/javascripts/discourse/templates/poster_expansion.handlebars index 859871fc7..0f5a0c7de 100644 --- a/app/assets/javascripts/discourse/templates/poster_expansion.handlebars +++ b/app/assets/javascripts/discourse/templates/poster_expansion.handlebars @@ -8,7 +8,9 @@
{{#if bio_cooked}}
{{{bio_cooked}}}
{{/if}} - + {{#if can_send_private_message_to_user}} + + {{/if}} {{#link-to 'user' model class="btn"}}{{i18n user.profile}}{{/link-to}} diff --git a/app/assets/stylesheets/desktop/poster_expansion.scss b/app/assets/stylesheets/desktop/poster_expansion.scss index 8a3a62891..5c499a178 100644 --- a/app/assets/stylesheets/desktop/poster_expansion.scss +++ b/app/assets/stylesheets/desktop/poster_expansion.scss @@ -45,7 +45,7 @@ margin: 0 0 5px 0; } - button { + .btn { margin: 0 0 7px 0; } }