diff --git a/app/assets/javascripts/discourse/routes/groups.js.es6 b/app/assets/javascripts/discourse/routes/groups.js.es6 index b567f7f72cf..582ebe0f5c6 100644 --- a/app/assets/javascripts/discourse/routes/groups.js.es6 +++ b/app/assets/javascripts/discourse/routes/groups.js.es6 @@ -1,6 +1,6 @@ export default Discourse.Route.extend({ titleToken() { - return I18n.t('groups.index'); + return I18n.t('groups.index.title'); }, model(params) { diff --git a/app/assets/javascripts/discourse/templates/group.hbs b/app/assets/javascripts/discourse/templates/group.hbs index d7b4f76ea0f..7db5eb0331e 100644 --- a/app/assets/javascripts/discourse/templates/group.hbs +++ b/app/assets/javascripts/discourse/templates/group.hbs @@ -1,5 +1,5 @@
- | {{i18n "groups.user_count"}} | -{{i18n "groups.membership"}} | - + {{#if groups}} + {{#load-more selector=".groups-table .groups-table-row" action="loadMore"}} +
---|
+ | {{i18n "groups.user_count"}} | +{{i18n "groups.membership"}} | + - - {{#each groups as |group|}} -|
---|---|---|---|
- {{#link-to "group.members" group.name}}
- {{#if group.flair_url}}
-
- {{avatar-flair
- flairURL=group.flair_url
- flairBgColor=group.flair_bg_color
- flairColor=group.flair_color
- groupName=group.name}}
+
+ {{#each groups as |group|}}
+
+ {{#link-to "group.members" group.name}}
+ {{#if group.flair_url}}
+
+ {{avatar-flair
+ flairURL=group.flair_url
+ flairBgColor=group.flair_bg_color
+ flairColor=group.flair_color
+ groupName=group.name}}
+
+ {{/if}}
+
+
+ {{group.name}}
+
+ {{#if group.full_name}}
+ {{group.full_name}}
+ {{/if}}
+
+ {{#if group.title}}
+ |
-
- {{group.name}}
+
+ {{group.title}}
+
+ {{/if}}
- {{/if}}
+ {{/link-to}}
+ {{group.user_count}} |
- {{#if group.full_name}}
- {{group.full_name}}
- {{/if}}
+
+ {{#group-membership-button model=group createNewMessageViaParams='createNewMessageViaParams'}}
+ {{d-button icon="ban"
+ label=(if group.automatic 'groups.automatic_group' 'groups.closed_group')
+ disabled=true}}
+ {{/group-membership-button}}
+ |
+ |
{{i18n "groups.index.empty"}}
+ {{/if}} {{/d-section}} diff --git a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 index 452cc069891..c1ad1961c79 100644 --- a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 @@ -103,7 +103,7 @@ export default createWidget('hamburger-menu', { links.push({ route: 'users', className: 'user-directory-link', label: 'directory.title' }); } - links.push({ route: 'groups', className: 'groups-link', label: 'groups.index' }); + links.push({ route: 'groups', className: 'groups-link', label: 'groups.index.title' }); if (this.siteSettings.tagging_enabled) { links.push({ route: 'tags', label: 'tagging.tags' }); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 8ebeaa12c52..230f5c62398 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -425,7 +425,9 @@ en: selector_placeholder: "Add members" owner: "owner" visible: "Group is visible to all users" - index: "Groups" + index: + title: "Groups" + empty: "There are no visible groups." title: one: "group" other: "groups"