Don't show private message button when not logged in

This commit is contained in:
Robin Ward 2013-10-03 15:51:12 -04:00
parent 88476800f8
commit db1f8370ee
3 changed files with 6 additions and 5 deletions

View file

@ -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');
});
},

View file

@ -8,7 +8,9 @@
<div class='bottom'>
{{#if bio_cooked}}<div class='bio'>{{{bio_cooked}}}</div>{{/if}}
<button class='btn' {{action composePrivateMessage model}}><i class='icon icon-envelope'></i>{{i18n user.private_message}}</button>
{{#if can_send_private_message_to_user}}
<button class='btn' {{action composePrivateMessage model}}><i class='icon icon-envelope'></i>{{i18n user.private_message}}</button>
{{/if}}
{{#link-to 'user' model class="btn"}}<i class='icon icon-user'></i>{{i18n user.profile}}{{/link-to}}

View file

@ -45,7 +45,7 @@
margin: 0 0 5px 0;
}
button {
.btn {
margin: 0 0 7px 0;
}
}