mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Enabled sorting for more columns in admin user list (#7208)
This commit is contained in:
@@ -87,8 +87,8 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
||||
);
|
||||
},
|
||||
|
||||
showEmails: function() {
|
||||
this.set("showEmails", true);
|
||||
toggleEmailVisibility: function() {
|
||||
this.toggleProperty("showEmails");
|
||||
this._refreshUsers();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ export default Discourse.Route.extend({
|
||||
order: transition.to.queryParams.order,
|
||||
ascending: transition.to.queryParams.ascending,
|
||||
query: params.filter,
|
||||
showEmails: false,
|
||||
refreshing: false
|
||||
});
|
||||
|
||||
|
||||
@@ -8,12 +8,16 @@
|
||||
<div class="admin-title">
|
||||
<h2>{{title}}</h2>
|
||||
{{#if canCheckEmails}}
|
||||
<button {{action "showEmails"}} class="show-emails btn btn-default">{{i18n 'admin.users.show_emails'}}</button>
|
||||
{{#if showEmails}}
|
||||
<button {{action "toggleEmailVisibility"}} class="hide-emails btn btn-default">{{i18n 'admin.users.hide_emails'}}</button>
|
||||
{{else}}
|
||||
<button {{action "toggleEmailVisibility"}} class="show-emails btn btn-default">{{i18n 'admin.users.show_emails'}}</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='username controls'>
|
||||
{{text-field value=listFilter placeholder=searchHint}}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{{#conditional-loading-spinner condition=refreshing}}
|
||||
@@ -23,9 +27,9 @@
|
||||
{{#if showApproval}}
|
||||
<th>{{input type="checkbox" checked=selectAll}}</th>
|
||||
{{/if}}
|
||||
<th>{{i18n 'username'}}</th>
|
||||
<th class='email-heading'>{{i18n 'email'}}</th>
|
||||
<th>{{i18n 'admin.users.last_emailed'}}</th>
|
||||
{{admin-directory-toggle field="username" i18nKey='username' order=order ascending=ascending}}
|
||||
{{admin-directory-toggle field="email" i18nKey='email' order=order ascending=ascending}}
|
||||
{{admin-directory-toggle field="last_emailed" i18nKey='admin.users.last_emailed' order=order ascending=ascending}}
|
||||
{{admin-directory-toggle field="seen" i18nKey='last_seen' order=order ascending=ascending}}
|
||||
{{admin-directory-toggle field="topics_viewed" i18nKey="admin.user.topics_entered" order=order ascending=ascending}}
|
||||
{{admin-directory-toggle field="posts_read" i18nKey="admin.user.posts_read_count" order=order ascending=ascending}}
|
||||
|
||||
@@ -435,7 +435,7 @@ $mobile-breakpoint: 700px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
.show-emails {
|
||||
.show-emails, .hide-emails {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user