diff --git a/app/assets/javascripts/admin/controllers/admin-groups-type-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-groups-type-index.js.es6 new file mode 100644 index 00000000000..ca80f093d1b --- /dev/null +++ b/app/assets/javascripts/admin/controllers/admin-groups-type-index.js.es6 @@ -0,0 +1,11 @@ +import computed from 'ember-addons/ember-computed-decorators'; + +export default Ember.Controller.extend({ + adminGroupsType: Ember.inject.controller(), + sortedGroups: Ember.computed.alias("adminGroupsType.sortedGroups"), + + @computed("sortedGroups") + messageKey(sortedGroups) { + return `admin.groups.${sortedGroups.length > 0 ? 'none_selected' : 'no_custom_groups'}`; + } +}); diff --git a/app/assets/javascripts/admin/templates/groups-type-index.hbs b/app/assets/javascripts/admin/templates/groups-type-index.hbs new file mode 100644 index 00000000000..88d870c1f6e --- /dev/null +++ b/app/assets/javascripts/admin/templates/groups-type-index.hbs @@ -0,0 +1,9 @@ +
+

{{i18n messageKey}}

+ +
+ {{#link-to 'adminGroup' 'new' class="btn"}} + {{fa-icon "plus"}} {{i18n 'admin.groups.new'}} + {{/link-to}} +
+
diff --git a/app/assets/javascripts/admin/templates/groups-type.hbs b/app/assets/javascripts/admin/templates/groups-type.hbs index 6c9986fcb39..b4d2a0acf35 100644 --- a/app/assets/javascripts/admin/templates/groups-type.hbs +++ b/app/assets/javascripts/admin/templates/groups-type.hbs @@ -1,29 +1,31 @@
-
-

{{i18n 'admin.groups.edit'}}

- -
- {{#if isAuto}} - {{d-button action="refreshAutoGroups" icon="refresh" label="admin.groups.refresh" disabled=refreshingAutoGroups}} - {{else}} - {{#link-to 'adminGroup' 'new' class="btn"}} - {{fa-icon "plus"}} {{i18n 'admin.groups.new'}} - {{/link-to}} - {{/if}} + {{/if}} +
-
+ {{/if}} -
+
{{outlet}}
diff --git a/app/assets/stylesheets/common/admin/admin_base.scss b/app/assets/stylesheets/common/admin/admin_base.scss index 13893d7cc23..1d55d6b236b 100644 --- a/app/assets/stylesheets/common/admin/admin_base.scss +++ b/app/assets/stylesheets/common/admin/admin_base.scss @@ -696,6 +696,10 @@ section.details { width: 100%; border-color: dark-light-choose(scale-color($primary, $lightness: 75%), scale-color($secondary, $lightness: 25%)); } + + .content-list { + margin-right: 20px; + } } // Customise area diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ba5ec4747ee..d9ff0b1b0a5 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2568,6 +2568,8 @@ en: add_owners: Add owners incoming_email: "Custom incoming email address" incoming_email_placeholder: "enter email address" + none_selected: "Select a group to get started" + no_custom_groups: "Create a new custom group" api: generate_master: "Generate Master API Key"