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 @@
- {{#link-to "groups" class='group-breadcrumb'}}{{fa-icon 'arrow-left'}} {{i18n 'groups.index'}}{{/link-to}} + {{#link-to "groups" class='group-breadcrumb'}}{{fa-icon 'arrow-left'}} {{i18n 'groups.index.title'}}{{/link-to}}
diff --git a/app/assets/javascripts/discourse/templates/groups.hbs b/app/assets/javascripts/discourse/templates/groups.hbs index 7a6d75d6f88..8503ac9bac5 100644 --- a/app/assets/javascripts/discourse/templates/groups.hbs +++ b/app/assets/javascripts/discourse/templates/groups.hbs @@ -1,61 +1,65 @@ {{#d-section pageClass="groups"}} - {{#load-more selector=".groups-table .groups-table-row" action="loadMore"}} -

{{i18n "groups.index"}}

+

{{i18n "groups.index.title"}}

-
- - - - - - + {{#if groups}} + {{#load-more selector=".groups-table .groups-table-row" action="loadMore"}} +
+
{{i18n "groups.user_count"}}{{i18n "groups.membership"}}
+ + + + + - - {{#each groups as |group|}} - - + {{#each groups as |group|}} + + - - {{group.name}} + - {{#if group.full_name}} - {{group.full_name}} - {{/if}} + + + {{/each}} + +
{{i18n "groups.user_count"}}{{i18n "groups.membership"}}
- {{#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}} +
+ {{#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.title}} +
+ {{/if}}
- {{/if}} + {{/link-to}} +
{{group.user_count}} + {{#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}} +
+
+ {{/load-more}} - {{#if group.title}} -
- {{group.title}} -
- {{/if}} - - {{/link-to}} - - - {{group.user_count}} - - - {{#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}} - - - {{/each}} - - -
- {{/load-more}} - - {{conditional-loading-spinner condition=groups.loadingMore}} + {{conditional-loading-spinner condition=groups.loadingMore}} + {{else}} +

{{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"