diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index 6df5a32d6d1..757779abec8 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -1,5 +1,6 @@ import { exportUserArchive } from 'discourse/lib/export-csv'; import CanCheckEmails from 'discourse/mixins/can-check-emails'; +import computed from 'ember-addons/ember-computed-decorators'; export default Ember.Controller.extend(CanCheckEmails, { indexStream: false, @@ -11,7 +12,10 @@ export default Ember.Controller.extend(CanCheckEmails, { return this.get('content.username') === Discourse.User.currentProp('username'); }.property('content.username'), - collapsedInfo: Em.computed.not('indexStream'), + @computed('indexStream', 'viewingSelf', 'forceExpand') + collapsedInfo(indexStream, viewingSelf, forceExpand){ + return (!indexStream || viewingSelf) && !forceExpand; + }, linkWebsite: Em.computed.not('model.isBasic'), @@ -59,6 +63,9 @@ export default Ember.Controller.extend(CanCheckEmails, { privateMessagesUnreadActive: Em.computed.equal('pmView', 'unread'), actions: { + expandProfile: function() { + this.set('forceExpand', true); + }, adminDelete: function() { Discourse.AdminUser.find(this.get('model.username').toLowerCase()).then(function(user){ user.destroy({deletePosts: true}); diff --git a/app/assets/javascripts/discourse/templates/user/user.hbs b/app/assets/javascripts/discourse/templates/user/user.hbs index 586ef838b35..475708f4ff7 100644 --- a/app/assets/javascripts/discourse/templates/user/user.hbs +++ b/app/assets/javascripts/discourse/templates/user/user.hbs @@ -1,4 +1,4 @@ -