mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 00:31:23 +08:00
FIX: Groups were not being displayed in the map of private messages
This commit is contained in:
@ -18,17 +18,17 @@ createWidget('pm-remove-group-link', {
|
|||||||
createWidget('pm-map-user-group', {
|
createWidget('pm-map-user-group', {
|
||||||
tagName: 'div.user.group',
|
tagName: 'div.user.group',
|
||||||
|
|
||||||
html(attrs) {
|
transform(attrs) {
|
||||||
const link = h('a', { attributes: { href: Discourse.getURL(`/groups/${attrs.group.name}`) } }, attrs.group.name);
|
return { href: Discourse.getURL(`/groups/${attrs.group.name}`) };
|
||||||
const result = [iconNode('users'), ' ', link];
|
},
|
||||||
|
|
||||||
if (attrs.canRemoveAllowedUsers) {
|
template: hbs`
|
||||||
result.push(' ');
|
{{fa-icon 'users'}}
|
||||||
result.push(this.attach('pm-remove-group-link', attrs.group));
|
<a href={{transformed.href}}>{{attrs.group.name}}</a>
|
||||||
}
|
{{#if attrs.canRemoveAllowedUsers}}
|
||||||
|
{{attach widget="pm-remove-group-link" attrs=attrs.group}}
|
||||||
return result;
|
{{/if}}
|
||||||
}
|
`
|
||||||
});
|
});
|
||||||
|
|
||||||
createWidget('pm-remove-link', {
|
createWidget('pm-remove-link', {
|
||||||
@ -72,9 +72,9 @@ export default createWidget('private-message-map', {
|
|||||||
const participants = [];
|
const participants = [];
|
||||||
|
|
||||||
if (attrs.allowedGroups.length) {
|
if (attrs.allowedGroups.length) {
|
||||||
participants.push(attrs.allowedGroups.map(ag => {
|
participants.push(attrs.allowedGroups.map(group => {
|
||||||
this.attach('pm-map-user-group', {
|
return this.attach('pm-map-user-group', {
|
||||||
group: ag,
|
group,
|
||||||
canRemoveAllowedUsers: attrs.canRemoveAllowedUsers
|
canRemoveAllowedUsers: attrs.canRemoveAllowedUsers
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
Reference in New Issue
Block a user