Remove unncessary CP

This commit is contained in:
Robin Ward 2016-02-18 12:33:23 -05:00
parent abc41c7d5b
commit 7b8e313dac
2 changed files with 8 additions and 13 deletions

View File

@ -2,7 +2,6 @@ import computed from 'ember-addons/ember-computed-decorators';
import Topic from 'discourse/models/topic';
export default Ember.Controller.extend({
needs: ["application", "user-topics-list", "user"],
pmView: false,
viewingSelf: Em.computed.alias('controllers.user.viewingSelf'),
@ -11,10 +10,6 @@ export default Ember.Controller.extend({
selected: Em.computed.alias('controllers.user-topics-list.selected'),
bulkSelectEnabled: Em.computed.alias('controllers.user-topics-list.bulkSelectEnabled'),
mobileView: function() {
return this.site.mobileView;
}.property(),
showNewPM: function(){
return this.get('controllers.user.viewingSelf') &&
Discourse.User.currentProp('can_send_private_messages');

View File

@ -1,8 +1,8 @@
<section class='user-navigation'>
{{#unless mobileView}}
{{#if showNewPM}}
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
{{/if}}
{{#unless site.mobileView}}
{{#if showNewPM}}
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
{{/if}}
{{/unless}}
{{#mobile-nav class='messages-nav' desktopClass='nav-stacked action-list' currentPath=currentPath}}
@ -47,10 +47,10 @@
<i class="fa fa-list"></i>
</button>
{{#if mobileView}}
{{#if showNewPM}}
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
{{/if}}
{{#if site.mobileView}}
{{#if showNewPM}}
{{d-button class="btn-primary new-private-message" action="composePrivateMessage" icon="envelope" label="user.new_private_message"}}
{{/if}}
{{/if}}
{{#if canArchive}}