UX: Link to automatic group page on user admin page.

This commit is contained in:
Guo Xiang Tan 2018-04-13 10:41:29 +08:00
parent 00f59f648d
commit e43baafa02
2 changed files with 8 additions and 4 deletions

View File

@ -24,9 +24,13 @@ export default Ember.Controller.extend(CanCheckEmails, {
'model.can_disable_second_factor'
),
automaticGroups: function() {
return this.get("model.automaticGroups").map((g) => g.name).join(", ");
}.property("model.automaticGroups"),
@computed("model.automaticGroups")
automaticGroups(automaticGroups) {
return automaticGroups.map(group => {
const name = Ember.String.htmlSafe(group.name);
return `<a href="/groups/${name}">${name}</a>`;
}).join(", ");
},
userFields: function() {
const siteUserFields = this.site.get('user_fields'),

View File

@ -415,7 +415,7 @@
<h1>{{i18n 'admin.groups.title'}}</h1>
<div class='display-row'>
<div class='field'>{{i18n 'admin.groups.automatic'}}</div>
<div class='value'>{{automaticGroups}}</div>
<div class='value'>{{{automaticGroups}}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n 'admin.groups.custom'}}</div>