diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-01-07 13:54:41 +0200 |
---|---|---|
committer | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-02-05 17:56:51 +0200 |
commit | d279cc94088fddd6f6bb2847e456bbf68ae616ea (patch) | |
tree | f3c16dbcc9f7b927a2f4ed63cbd286a70ae49a13 /app/helpers/users_helper.rb | |
parent | 55cb4bc9cafca0c838192b54f9daa4b2bc0b86b0 (diff) | |
download | gitlab-ce-d279cc94088fddd6f6bb2847e456bbf68ae616ea.tar.gz |
Add last activity to user administration
The columns 'Created on' and 'Last activity' have been
added to the admin -> users view.
Sorting options have also been added for last activity
and the search bar has been moved to match the issues
page.
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r-- | app/helpers/users_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 73c1402eae5..73ca17c6605 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -74,6 +74,15 @@ module UsersHelper Gitlab.config.gitlab.impersonation_enabled end + def user_badges_in_admin_section(user) + [].tap do |badges| + badges << { text: s_('AdminUsers|Blocked'), variant: 'danger' } if user.blocked? + badges << { text: s_('AdminUsers|Admin'), variant: 'success' } if user.admin? + badges << { text: s_('AdminUsers|External'), variant: 'secondary' } if user.external? + badges << { text: s_("AdminUsers|It's you!"), variant: nil } if current_user == user + end + end + private def get_profile_tabs |