From 61812b52e71d6edd607f279172ac2b1cea50e934 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 3 Apr 2018 10:35:22 +0200 Subject: [PATCH] FIX: more conservative refactoring to avoid regressions in customisations --- .../javascripts/discourse/controllers/user.js.es6 | 8 ++++++-- app/assets/javascripts/discourse/templates/user.hbs | 12 +++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index 59b42d13f43..443a0f816be 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -91,8 +91,12 @@ export default Ember.Controller.extend(CanCheckEmails, { }, actions: { - toggleExtendedProfile() { - this.toggleProperty('forceExpand'); + collapseProfile() { + this.set('forceExpand', false); + }, + + expandProfile() { + this.set('forceExpand', true); }, showSuspensions() { diff --git a/app/assets/javascripts/discourse/templates/user.hbs b/app/assets/javascripts/discourse/templates/user.hbs index 9360db65367..3c85a0bdb5f 100644 --- a/app/assets/javascripts/discourse/templates/user.hbs +++ b/app/assets/javascripts/discourse/templates/user.hbs @@ -69,13 +69,15 @@ {{#if viewingSelf}}
  • - - {{#if collapsedInfo}} + {{#if collapsedInfo}} + {{d-icon "angle-double-down"}} {{i18n 'user.expand_profile'}} - {{else}} + + {{else}} + {{d-icon "angle-double-up"}} {{i18n 'user.collapse_profile'}} - {{/if}} - + + {{/if}}
  • {{/if}}