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: { actions: {
expandProfile() { toggleExtendedProfile() {
this.set('forceExpand', true); this.toggleProperty('forceExpand');
}, },
showSuspensions() { showSuspensions() {

View File

@ -67,12 +67,17 @@
connectorTagName="li" connectorTagName="li"
args=(hash model=model)}} args=(hash model=model)}}
{{#if collapsedInfo}}
{{#if viewingSelf}} {{#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}}
{{/if}}
</ul> </ul>
</section> </section>

View File

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