Commit 56e07490 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'skr-refactor-users' into 'master'

Refactor app/views/admin/users/_users.html.haml

See merge request gitlab-org/gitlab!52891
parents 9649d3b4 a0529a02
......@@ -299,6 +299,27 @@ module UsersHelper
html_escape(s_('Profile|%{job_title} at %{organization}')) % { job_title: job_title, organization: organization }
end
def user_table_headers
[
{
section_class_name: 'section-40',
header_text: _('Name')
},
{
section_class_name: 'section-10',
header_text: _('Projects')
},
{
section_class_name: 'section-15',
header_text: _('Created on')
},
{
section_class_name: 'section-15',
header_text: _('Last activity')
}
]
end
end
UsersHelper.prepend_if_ee('EE::UsersHelper')
......@@ -78,10 +78,8 @@
- else
.table-holder
.thead-white.text-nowrap.gl-responsive-table-row.table-row-header{ role: 'row' }
.table-section.section-40{ role: 'rowheader' }= _('Name')
.table-section.section-10{ role: 'rowheader' }= _('Projects')
.table-section.section-15{ role: 'rowheader' }= _('Created on')
.table-section.section-15{ role: 'rowheader' }= _('Last activity')
- user_table_headers.each do |header|
.table-section{ class: header[:section_class_name], role: 'rowheader' }= header[:header_text]
= render partial: 'admin/users/user', collection: @users
......
---
title: Refactored admin user table headers
merge_request: 52891
author: Shubham Kumar (@imskr)
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment