Show CSV groups on user profile

This commit is contained in:
Robin Ward 2014-11-05 14:05:16 -05:00
parent 068d22e9b3
commit e79c1c23d9
4 changed files with 17 additions and 18 deletions

View File

@ -1,12 +0,0 @@
/**
Displays a list of groups that a user belongs to.
@class Discourse.GroupsListComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
export default Em.Component.extend({
classNames: ['groups']
});

View File

@ -1,6 +0,0 @@
{{#if groups}}
{{i18n groups.title count=groups.length}}:
{{#each groups}}
{{#link-to 'group' this class="group-link"}}{{name}}{{/link-to}}
{{/each}}
{{/if}}

View File

@ -150,6 +150,14 @@
{{/if}} {{/if}}
</dd> </dd>
{{/if}} {{/if}}
{{#if custom_groups}}
<dt>{{i18n groups.title count=custom_groups.length}}</dt>
<dd class='groups'>
{{#each custom_groups}}
<span>{{#link-to 'group' this class="group-link"}}{{name}}{{/link-to}}</span>
{{/each}}
</dd>
{{/if}}
</dl> </dl>
{{plugin-outlet "user-profile-secondary"}} {{plugin-outlet "user-profile-secondary"}}
</div> </div>

View File

@ -217,6 +217,15 @@
color: $primary; color: $primary;
} }
dd.groups {
span:after {
content: ','
}
span:last-of-type:after {
content:''
}
}
dt { dt {
color: dark-light-diff($secondary, $primary, 50%, -40%); color: dark-light-diff($secondary, $primary, 50%, -40%);
margin: 0; margin: 0;