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 @@ -
+
@@ -52,6 +52,11 @@ {{#if canInviteToForum}}
  • {{#link-to 'userInvited' class="btn right"}}{{fa-icon "user-plus"}}{{i18n 'user.invited.title'}}{{/link-to}}
  • {{/if}} + {{#if collapsedInfo}} + {{#if viewingSelf}} +
  • {{fa-icon "angle-double-down"}}{{i18n 'user.expand_profile'}}
  • + {{/if}} + {{/if}}
    diff --git a/app/assets/stylesheets/desktop/user.scss b/app/assets/stylesheets/desktop/user.scss index bce1bfb3a1d..9ce019329d6 100644 --- a/app/assets/stylesheets/desktop/user.scss +++ b/app/assets/stylesheets/desktop/user.scss @@ -104,6 +104,12 @@ } +.viewing-self .user-main .about.collapsed-info { + .secondary, .staff-counters { + display: inherit; + } +} + .user-main { margin-bottom: 50px; diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 7fe190f1573..0b6db04ac03 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -412,6 +412,7 @@ en: private_messages: "Messages" activity_stream: "Activity" preferences: "Preferences" + expand_profile: "Expand" bookmarks: "Bookmarks" bio: "About me" invited_by: "Invited By"