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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
fc43c4e7
Commit
fc43c4e7
authored
Jun 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle admin/user page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
87e0fe6f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
175 additions
and
121 deletions
+175
-121
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+2
-1
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+166
-115
app/views/users/_projects.html.haml
app/views/users/_projects.html.haml
+1
-1
app/views/users/show.html.haml
app/views/users/show.html.haml
+6
-4
No files found.
app/controllers/admin/users_controller.rb
View file @
fc43c4e7
...
...
@@ -8,7 +8,8 @@ class Admin::UsersController < Admin::ApplicationController
end
def
show
@projects
=
user
.
authorized_projects
@personal_projects
=
user
.
personal_projects
@joined_projects
=
user
.
projects
.
joined
(
@user
)
end
def
new
...
...
app/views/admin/users/show.html.haml
View file @
fc43c4e7
%h3
.page-title
%span
.cgray
User:
User:
=
@user
.
name
-
if
@user
.
blocked?
%span
.cred
(Blocked)
...
...
@@ -11,14 +11,23 @@
%i
.icon-edit
Edit
%hr
%ul
.nav.nav-tabs
%li
.active
%a
{
"data-toggle"
=>
"tab"
,
href:
"#account"
}
Account
%li
%a
{
"data-toggle"
=>
"tab"
,
href:
"#profile"
}
Profile
%li
%a
{
"data-toggle"
=>
"tab"
,
href:
"#groups"
}
Groups
%li
%a
{
"data-toggle"
=>
"tab"
,
href:
"#projects"
}
Projects
.row
.tab-content
#account
.tab-pane.active
.row
.col-md-6
.panel.panel-default
.panel-heading
Account:
.pull-right
=
image_tag
avatar_icon
(
@user
.
email
,
32
),
class:
"avatar s32"
%ul
.well-list
%li
%span
.light
Name:
...
...
@@ -31,6 +40,11 @@
%span
.light
Email:
%strong
=
mail_to
@user
.
email
-
@user
.
emails
.
each
do
|
email
|
%li
%span
.light
Secondary email:
%strong
=
email
.
email
%li
%span
.light
Can create groups:
%strong
...
...
@@ -74,6 +88,7 @@
%strong
=
link_to
@user
.
created_by
.
name
,
[
:admin
,
@user
.
created_by
]
.col-md-6
-
unless
@user
==
current_user
-
if
@user
.
blocked?
.alert.alert-info
...
...
@@ -116,7 +131,24 @@
%br
=
link_to
'Remove user'
,
[
:admin
,
@user
],
data:
{
confirm:
"USER
#{
@user
.
name
}
WILL BE REMOVED! Are you sure?"
},
method: :delete
,
class:
"btn btn-remove"
#profile
.tab-pane
.row
.col-md-6
.panel.panel-default
.panel-heading
=
@user
.
name
%ul
.well-list
%li
=
image_tag
avatar_icon
(
@user
.
email
,
60
),
class:
"avatar s60"
%li
%span
.light
Profile page:
%strong
=
link_to
user_path
(
@user
)
do
=
@user
.
username
.col-md-6
=
render
'users/profile'
,
user:
@user
#groups
.tab-pane
-
if
@user
.
users_groups
.
present?
.panel.panel-default
.panel-heading
Groups:
...
...
@@ -131,13 +163,32 @@
-
unless
user_group
.
owner?
=
link_to
group_users_group_path
(
group
,
user_group
),
data:
{
confirm:
remove_user_from_group_message
(
group
,
@user
)
},
method: :delete
,
remote:
true
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from group'
do
%i
.icon-remove.icon-white
-
else
.nothing-here-block
This user has no groups.
#projects
.tab-pane
-
if
@user
.
groups
.
any?
.panel.panel-default
.panel-heading
Group projects
%ul
.well-list
-
@user
.
groups
.
each
do
|
group
|
%li
%strong
=
group
.
name
–
access to
#{
pluralize
(
group
.
projects
.
count
,
'project'
)
}
.row
.col-md-6
=
render
'users/projects'
,
projects:
@personal_projects
.col-md-6
.panel.panel-default
.panel-heading
Projects (
#{
@
projects
.
count
}
)
.panel-heading
Joined projects (
#{
@joined_
projects
.
count
}
)
%ul
.well-list
-
@
projects
.
sort_by
(
&
:name_with_namespace
).
each
do
|
project
|
-
@joined_
projects
.
sort_by
(
&
:name_with_namespace
).
each
do
|
project
|
-
tm
=
project
.
team
.
find_tm
(
@user
.
id
)
%li
.users_project
.list-item-name
=
link_to
admin_project_path
(
project
),
class:
dom_class
(
project
)
do
=
project
.
name_with_namespace
...
...
app/views/users/_projects.html.haml
View file @
fc43c4e7
.panel.panel-default
.panel-heading
Personal projects
%ul
.well-list
-
@
projects
.
each
do
|
project
|
-
projects
.
each
do
|
project
|
%li
=
link_to_project
project
app/views/users/show.html.haml
View file @
fc43c4e7
...
...
@@ -13,6 +13,8 @@
%br
%small
member since
#{
@user
.
created_at
.
stamp
(
"Nov 12, 2031"
)
}
.clearfix
-
if
@groups
.
any?
%h4
Groups:
=
render
'groups'
,
groups:
@groups
%hr
...
...
@@ -21,4 +23,4 @@
.col-md-4
=
render
'profile'
,
user:
@user
-
if
@projects
.
present?
=
render
'projects'
=
render
'projects'
,
projects:
@projects
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