Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a0529a02
Commit
a0529a02
authored
Jan 29, 2021
by
Shubham Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor in _users.html.haml
parent
9991065d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
app/helpers/users_helper.rb
app/helpers/users_helper.rb
+21
-0
app/views/admin/users/_users.html.haml
app/views/admin/users/_users.html.haml
+2
-4
changelogs/unreleased/skr-refactor-users.yml
changelogs/unreleased/skr-refactor-users.yml
+5
-0
No files found.
app/helpers/users_helper.rb
View file @
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'
)
app/views/admin/users/_users.html.haml
View file @
a0529a02
...
...
@@ -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
...
...
changelogs/unreleased/skr-refactor-users.yml
0 → 100644
View file @
a0529a02
---
title
:
Refactored admin user table headers
merge_request
:
52891
author
:
Shubham Kumar (@imskr)
type
:
changed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment