UX: Align group members button/dropdown to the right.

This commit is contained in:
Guo Xiang Tan 2018-04-13 09:16:51 +08:00
parent 90dd12611c
commit 501d4ca564
4 changed files with 59 additions and 20 deletions

View File

@ -1,12 +1,20 @@
{{text-field value=filterInput
placeholderKey=filterPlaceholder
class="group-username-filter no-blur"}}
<div class="group-members-actions">
{{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}}
</div>
{{#if hasMembers}}
{{#load-more selector=".group-members tr" action="loadMore"}}

View File

@ -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}}
<div class="group-members-manage">
{{#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}}
</div>
{{#if hasMembers}}
{{#load-more selector=".group-members .user-info" action="loadMore"}}

View File

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

View File

@ -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;
}