FEATURE: allow users to collapse profile after expanding it

This commit is contained in:
Joffrey JAFFEUX 2018-03-29 10:53:57 +02:00 committed by GitHub
parent 9260969101
commit a64cc9a990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -91,8 +91,8 @@ export default Ember.Controller.extend(CanCheckEmails, {
},
actions: {
expandProfile() {
this.set('forceExpand', true);
toggleExtendedProfile() {
this.toggleProperty('forceExpand');
},
showSuspensions() {

View File

@ -67,12 +67,17 @@
connectorTagName="li"
args=(hash model=model)}}
{{#if collapsedInfo}}
{{#if viewingSelf}}
<li><a {{action "expandProfile"}} href class="btn">{{d-icon "angle-double-down"}}{{i18n 'user.expand_profile'}}</a></li>
<li>
<a {{action "toggleExtendedProfile"}} href class="btn">
{{#if collapsedInfo}}
{{d-icon "angle-double-down"}} {{i18n 'user.expand_profile'}}
{{else}}
{{d-icon "angle-double-up"}} {{i18n 'user.collapse_profile'}}
{{/if}}
</a>
</li>
{{/if}}
{{/if}}
</ul>
</section>

View File

@ -617,6 +617,7 @@ en:
activity_stream: "Activity"
preferences: "Preferences"
expand_profile: "Expand"
collapse_profile: "Collapse"
bookmarks: "Bookmarks"
bio: "About me"
invited_by: "Invited By"