diff --git a/app/assets/javascripts/discourse/templates/group-index.hbs b/app/assets/javascripts/discourse/templates/group-index.hbs
index a098b7e308e..c0cf37140c7 100644
--- a/app/assets/javascripts/discourse/templates/group-index.hbs
+++ b/app/assets/javascripts/discourse/templates/group-index.hbs
@@ -1,12 +1,20 @@
-{{text-field value=filterInput
- placeholderKey=filterPlaceholder
- class="group-username-filter no-blur"}}
+
+ {{text-field value=filterInput
+ placeholderKey=filterPlaceholder
+ class="group-username-filter no-blur"}}
-{{#if canManageGroup}}
- {{group-members-dropdown
- showAddMembersModal="showAddMembersModal"
- showBulkAddModal="showBulkAddModal"}}
-{{/if}}
+ {{#if canManageGroup}}
+ {{#if currentUser.admin}}
+ {{group-members-dropdown
+ showAddMembersModal="showAddMembersModal"
+ showBulkAddModal="showBulkAddModal"}}
+ {{else}}
+ {{d-button icon="plus"
+ label="groups.add_members.title"
+ class="group-members-add"}}
+ {{/if}}
+ {{/if}}
+
{{#if hasMembers}}
{{#load-more selector=".group-members tr" action="loadMore"}}
diff --git a/app/assets/javascripts/discourse/templates/mobile/group-index.hbs b/app/assets/javascripts/discourse/templates/mobile/group-index.hbs
index 0518af1f27a..b1c05322a17 100644
--- a/app/assets/javascripts/discourse/templates/mobile/group-index.hbs
+++ b/app/assets/javascripts/discourse/templates/mobile/group-index.hbs
@@ -2,12 +2,19 @@
placeholderKey=filterPlaceholder
class="group-username-filter no-blur"}}
-{{#if canManageGroup}}
- {{d-button action='showAddMembersModal'
- icon="plus"
- label="groups.add_members.title"
- class="group-add-members-btn btn btn-primary"}}
-{{/if}}
+
+ {{#if canManageGroup}}
+ {{#if currentUser.admin}}
+ {{group-members-dropdown
+ showAddMembersModal="showAddMembersModal"
+ showBulkAddModal="showBulkAddModal"}}
+ {{else}}
+ {{d-button icon="plus"
+ label="groups.add_members.title"
+ class="group-members-add"}}
+ {{/if}}
+ {{/if}}
+
{{#if hasMembers}}
{{#load-more selector=".group-members .user-info" action="loadMore"}}
diff --git a/app/assets/stylesheets/common/base/group.scss b/app/assets/stylesheets/common/base/group.scss
index 1929e948111..9813e7a5932 100644
--- a/app/assets/stylesheets/common/base/group.scss
+++ b/app/assets/stylesheets/common/base/group.scss
@@ -9,10 +9,19 @@
position: relative;
}
-.group-username-filter {
+.group-members-actions {
position: absolute;
- right: 0;
top: -49px;
+ right: 0px;
+
+ .group-username-filter {
+ margin: 0px;
+ vertical-align: middle;
+ }
+
+ .group-members-dropdown, .group-members-add {
+ vertical-align: middle;
+ }
}
.group-post {
diff --git a/app/assets/stylesheets/mobile/group.scss b/app/assets/stylesheets/mobile/group.scss
index f952871fb19..7bbf8107645 100644
--- a/app/assets/stylesheets/mobile/group.scss
+++ b/app/assets/stylesheets/mobile/group.scss
@@ -19,7 +19,6 @@
}
.group-nav.mobile-nav {
- margin-bottom: 10px;
float: left;
}
@@ -81,11 +80,27 @@ table.group-manage-logs {
}
}
-.group-username-filter {
- top: -52px;
- height: 27px;
+.group-outlet {
+ .group-username-filter {
+ position: absolute;
+ right: 0px;
+ top: -42px;
+ height: 27px;
+ margin-bottom: 0px;
+ }
+
+ .group-members-manage {
+ width: 100%;
+ text-align: right;
+ }
+
+ .group-members-dropdown,
+ .group-members-add {
+ margin: 5px 0px;
+ }
}
+
.group-add-members-btn {
margin-bottom: 10px;
}