From cb124d5836b978b93da508ead7eefea3e627785b Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 26 Nov 2014 13:10:12 -0500 Subject: [PATCH] UX: Consolidate "Admins" and "Moderators" into "Staff" on admin users list --- app/assets/javascripts/admin/templates/users_list.hbs | 3 +-- config/locales/client.en.yml | 4 ++-- lib/admin_user_index_query.rb | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/admin/templates/users_list.hbs b/app/assets/javascripts/admin/templates/users_list.hbs index 78500233600..e5d1a413ac9 100644 --- a/app/assets/javascripts/admin/templates/users_list.hbs +++ b/app/assets/javascripts/admin/templates/users_list.hbs @@ -6,8 +6,7 @@ {{#if siteSettings.must_approve_users}}
  • {{#link-to 'adminUsersList.show' 'pending'}}{{i18n admin.users.nav.pending}}{{/link-to}}
  • {{/if}} -
  • {{#link-to 'adminUsersList.show' 'admins'}}{{i18n admin.users.nav.admins}}{{/link-to}}
  • -
  • {{#link-to 'adminUsersList.show' 'moderators'}}{{i18n admin.users.nav.moderators}}{{/link-to}}
  • +
  • {{#link-to 'adminUsersList.show' 'staff'}}{{i18n admin.users.nav.staff}}{{/link-to}}
  • {{#link-to 'adminUsersList.show' 'suspended'}}{{i18n admin.users.nav.suspended}}{{/link-to}}
  • {{#link-to 'adminUsersList.show' 'blocked'}}{{i18n admin.users.nav.blocked}}{{/link-to}}
  • diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index e3f108426bd..15a3320393c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1892,8 +1892,7 @@ en: new: "New" active: "Active" pending: "Pending" - admins: 'Admins' - moderators: 'Mods' + staff: 'Staff' suspended: 'Suspended' blocked: 'Blocked' approved: "Approved?" @@ -1912,6 +1911,7 @@ en: regular: 'Users at Trust Level 2 (Member)' leader: 'Users at Trust Level 3 (Regular)' elder: 'Users at Trust Level 4 (Leader)' + staff: "Staff" admins: 'Admin Users' moderators: 'Moderators' blocked: 'Blocked Users' diff --git a/lib/admin_user_index_query.rb b/lib/admin_user_index_query.rb index cfcdd4ca4f4..281049910a9 100644 --- a/lib/admin_user_index_query.rb +++ b/lib/admin_user_index_query.rb @@ -49,6 +49,7 @@ class AdminUserIndexQuery def filter_by_query_classification case params[:query] + when 'staff' then @query.where("admin or moderator") when 'admins' then @query.where(admin: true) when 'moderators' then @query.where(moderator: true) when 'blocked' then @query.blocked