A platform for community discussion. Free, open, simple.
A more extensible way to disable expanding/contracting of user profiles
Robin Ward76d734ea6eb6
diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6index 443a0f816be..ecde47f23b0 100644--- a/app/assets/javascripts/discourse/controllers/user.js.es6+++ b/app/assets/javascripts/discourse/controllers/user.js.es6@@ -10,9 +10,15 @@ export default Ember.Controller.extend(CanCheckEmails, {currentPath: Ember.computed.alias('application.currentPath'),adminTools: optionalService(),- @computed("content.username")+ @computed('model.username')viewingSelf(username) {- return username === User.currentProp('username');+ let currentUser = this.currentUser;+ return currentUser && username === currentUser.get('username');+ },++ @computed('viewingSelf')+ canExpandProfile(viewingSelf) {+ return viewingSelf;},@computed('model.profileBackground')diff --git a/app/assets/javascripts/discourse/templates/user.hbs b/app/assets/javascripts/discourse/templates/user.hbsindex 3c85a0bdb5f..92e2883a081 100644--- a/app/assets/javascripts/discourse/templates/user.hbs+++ b/app/assets/javascripts/discourse/templates/user.hbs@@ -67,7 +67,7 @@connectorTagName="li"args=(hash model=model)}}- {{#if viewingSelf}}+ {{#if canExpandProfile}}<li>{{#if collapsedInfo}}<a {{action "expandProfile"}} href class="btn">