FEATURE: add user profile public fields plugin putlet
This commit is contained in:
parent
699b0d3e57
commit
577f0e9e4e
|
@ -71,6 +71,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||
if (!Ember.isEmpty(siteUserFields)) {
|
||||
const userFields = this.get('model.user_fields');
|
||||
return siteUserFields.filterProperty('show_on_profile', true).sortBy('position').map(field => {
|
||||
field.dasherized_name = field.get('name').dasherize();
|
||||
const value = userFields ? userFields[field.get('id').toString()] : null;
|
||||
return Ember.isEmpty(value) ? null : Ember.Object.create({ value, field });
|
||||
}).compact();
|
||||
|
|
|
@ -90,12 +90,14 @@
|
|||
<div class="public-user-fields">
|
||||
{{#each uf in publicUserFields}}
|
||||
{{#if uf.value}}
|
||||
<div class="public-user-field">
|
||||
<div class="public-user-field {{uf.field.dasherized_name}}">
|
||||
<span class="user-field-name">{{uf.field.name}}</span>:
|
||||
<span class="user-field-value">{{uf.value}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
{{plugin-outlet "user-profile-public-fields"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue