Don't show private message button when not logged in
This commit is contained in:
parent
88476800f8
commit
db1f8370ee
|
@ -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');
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
button {
|
||||
.btn {
|
||||
margin: 0 0 7px 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue