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
8e55acb0
Commit
8e55acb0
authored
Jul 05, 2017
by
Clement Ho
Committed by
Clement Ho
Jul 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve members view on mobile
parent
2cfc58f5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
53 deletions
+160
-53
app/assets/stylesheets/pages/members.scss
app/assets/stylesheets/pages/members.scss
+100
-12
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+2
-3
app/views/groups/group_members/index.html.haml
app/views/groups/group_members/index.html.haml
+1
-1
app/views/projects/project_members/_team.html.haml
app/views/projects/project_members/_team.html.haml
+1
-1
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+47
-33
app/views/shared/members/_requests.html.haml
app/views/shared/members/_requests.html.haml
+5
-3
changelogs/unreleased/25103-mobile-members-page-user-avatar-is-misaligned.yml
...d/25103-mobile-members-page-user-avatar-is-misaligned.yml
+4
-0
No files found.
app/assets/stylesheets/pages/members.scss
View file @
8e55acb0
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
display
:
-
webkit-flex
;
display
:
-
webkit-flex
;
display
:
flex
;
display
:
flex
;
width
:
400px
;
max-width
:
50%
;
}
}
}
}
...
@@ -65,7 +63,6 @@
...
@@ -65,7 +63,6 @@
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
display
:
-
webkit-flex
;
display
:
-
webkit-flex
;
display
:
flex
;
display
:
flex
;
width
:
100%
;
margin-top
:
3px
;
margin-top
:
3px
;
}
}
}
}
...
@@ -81,18 +78,10 @@
...
@@ -81,18 +78,10 @@
.member-form-control
{
.member-form-control
{
@media
(
max-width
:
$screen-xs-max
)
{
@media
(
max-width
:
$screen-xs-max
)
{
padding
:
5px
0
;
padding
-bottom
:
5px
;
margin-left
:
0
;
margin-left
:
0
;
margin-right
:
0
;
margin-right
:
0
;
}
}
@media
(
min-width
:
$screen-sm-min
)
{
width
:
50%
;
}
.dropdown-menu-toggle
{
width
:
100%
;
}
}
}
.member-access-text
{
.member-access-text
{
...
@@ -216,3 +205,102 @@
...
@@ -216,3 +205,102 @@
}
}
}
}
}
}
.content-list.members-list
li
{
display
:
flex
;
justify-content
:
space-between
;
.list-item-name
{
float
:
none
;
display
:
flex
;
flex
:
1
;
}
.user-info
{
padding-right
:
10px
;
}
.member
{
font-weight
:
bold
;
overflow-wrap
:
break-word
;
word-break
:
break-all
;
}
.member-group-link
{
display
:
inline-block
;
}
.form-control
{
width
:
inherit
;
}
.btn
{
align-self
:
flex-start
;
}
.form-horizontal
~
.btn
{
margin-right
:
0
;
}
@media
(
max-width
:
$screen-xs-max
)
{
display
:
block
;
.controls
>
.btn
{
margin-left
:
0
;
margin-right
:
0
;
display
:
block
;
}
.form-control
{
width
:
100%
;
}
.member-access-text
{
line-height
:
0
;
margin-left
:
50px
;
}
.member-controls
{
margin-top
:
5px
;
}
.form-horizontal
{
margin-top
:
10px
;
}
}
}
.panel-mobile
{
.content-list.members-list
li
{
display
:
block
;
.member-controls
{
float
:
none
;
display
:
block
;
}
.dropdown-menu-toggle
,
.dropdown-menu
,
.form-control
,
.list-item-name
{
width
:
100%
;
}
.dropdown-menu
{
margin-top
:
0
;
}
.form-horizontal
{
display
:
block
;
}
.member-form-control
{
margin
:
5px
0
;
}
.btn
{
width
:
100%
;
margin-left
:
0
;
}
}
}
app/views/admin/groups/show.html.haml
View file @
8e55acb0
...
@@ -107,8 +107,7 @@
...
@@ -107,8 +107,7 @@
=
select_tag
:access_level
,
options_for_select
(
GroupMember
.
access_level_roles
),
class:
"project-access-select select2"
=
select_tag
:access_level
,
options_for_select
(
GroupMember
.
access_level_roles
),
class:
"project-access-select select2"
%hr
%hr
=
button_tag
'Add users to group'
,
class:
"btn btn-create"
=
button_tag
'Add users to group'
,
class:
"btn btn-create"
=
render
'shared/members/requests'
,
membership_source:
@group
,
requesters:
@requesters
,
force_mobile_view:
true
=
render
'shared/members/requests'
,
membership_source:
@group
,
requesters:
@requesters
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
...
@@ -117,7 +116,7 @@
...
@@ -117,7 +116,7 @@
%span
.badge
=
@group
.
members
.
size
%span
.badge
=
@group
.
members
.
size
.pull-right
.pull-right
=
link_to
icon
(
'pencil-square-o'
,
text:
'Manage access'
),
polymorphic_url
([
@group
,
:members
]),
class:
"btn btn-xs"
=
link_to
icon
(
'pencil-square-o'
,
text:
'Manage access'
),
polymorphic_url
([
@group
,
:members
]),
class:
"btn btn-xs"
%ul
.well-list.group-users-list.content-list
%ul
.well-list.group-users-list.content-list
.members-list
=
render
partial:
'shared/members/member'
,
collection:
@members
,
as: :member
,
locals:
{
show_controls:
false
}
=
render
partial:
'shared/members/member'
,
collection:
@members
,
as: :member
,
locals:
{
show_controls:
false
}
.panel-footer
.panel-footer
=
paginate
@members
,
param_name:
'members_page'
,
theme:
'gitlab'
=
paginate
@members
,
param_name:
'members_page'
,
theme:
'gitlab'
app/views/groups/group_members/index.html.haml
View file @
8e55acb0
...
@@ -27,6 +27,6 @@
...
@@ -27,6 +27,6 @@
Members with access to
Members with access to
%strong
=
@group
.
name
%strong
=
@group
.
name
%span
.badge
=
@members
.
total_count
%span
.badge
=
@members
.
total_count
%ul
.content-list
%ul
.content-list
.members-list
=
render
partial:
'shared/members/member'
,
collection:
@members
,
as: :member
=
render
partial:
'shared/members/member'
,
collection:
@members
,
as: :member
=
paginate
@members
,
theme:
'gitlab'
=
paginate
@members
,
theme:
'gitlab'
app/views/projects/project_members/_team.html.haml
View file @
8e55acb0
...
@@ -11,5 +11,5 @@
...
@@ -11,5 +11,5 @@
%button
.member-search-btn
{
type:
"submit"
,
"aria-label"
=>
"Submit search"
}
%button
.member-search-btn
{
type:
"submit"
,
"aria-label"
=>
"Submit search"
}
=
icon
(
"search"
)
=
icon
(
"search"
)
=
render
'shared/members/sort_dropdown'
=
render
'shared/members/sort_dropdown'
%ul
.content-list
%ul
.content-list
.members-list
=
render
partial:
'shared/members/member'
,
collection:
members
,
as: :member
=
render
partial:
'shared/members/member'
,
collection:
members
,
as: :member
app/views/shared/members/_member.html.haml
View file @
8e55acb0
-
show_roles
=
local_assigns
.
fetch
(
:show_roles
,
true
)
-
show_roles
=
local_assigns
.
fetch
(
:show_roles
,
true
)
-
show_controls
=
local_assigns
.
fetch
(
:show_controls
,
true
)
-
show_controls
=
local_assigns
.
fetch
(
:show_controls
,
true
)
-
force_mobile_view
=
local_assigns
.
fetch
(
:force_mobile_view
,
false
)
-
user
=
local_assigns
.
fetch
(
:user
,
member
.
user
)
-
user
=
local_assigns
.
fetch
(
:user
,
member
.
user
)
-
source
=
member
.
source
-
source
=
member
.
source
-
can_admin_member
=
can?
(
current_user
,
action_member_permission
(
:update
,
member
),
member
)
-
can_admin_member
=
can?
(
current_user
,
action_member_permission
(
:update
,
member
),
member
)
...
@@ -8,8 +9,8 @@
...
@@ -8,8 +9,8 @@
%span
.list-item-name
%span
.list-item-name
-
if
user
-
if
user
=
image_tag
avatar_icon
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
=
image_tag
avatar_icon
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
%strong
.user-info
=
link_to
user
.
name
,
user_path
(
user
)
=
link_to
user
.
name
,
user_path
(
user
)
,
class:
'member'
%span
.cgray
=
user
.
to_reference
%span
.cgray
=
user
.
to_reference
-
if
user
==
current_user
-
if
user
==
current_user
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
·
·
=
link_to
source
.
full_name
,
source
,
class:
"member-group-link"
=
link_to
source
.
full_name
,
source
,
class:
"member-group-link"
.hidden-xs
.cgray
.cgray
-
if
member
.
request?
-
if
member
.
request?
Requested
Requested
=
time_ago_with_tooltip
(
member
.
requested_at
)
=
time_ago_with_tooltip
(
member
.
requested_at
)
...
@@ -36,7 +37,8 @@
...
@@ -36,7 +37,8 @@
-
else
-
else
=
image_tag
avatar_icon
(
member
.
invite_email
,
40
),
class:
"avatar s40"
,
alt:
''
=
image_tag
avatar_icon
(
member
.
invite_email
,
40
),
class:
"avatar s40"
,
alt:
''
%strong
=
member
.
invite_email
.user-info
.member
=
member
.
invite_email
.cgray
.cgray
Invited
Invited
-
if
member
.
created_by
-
if
member
.
created_by
...
@@ -47,6 +49,13 @@
...
@@ -47,6 +49,13 @@
-
current_resource
=
@project
||
@group
-
current_resource
=
@project
||
@group
.controls.member-controls
.controls.member-controls
-
if
show_controls
&&
member
.
source
==
current_resource
-
if
show_controls
&&
member
.
source
==
current_resource
-
if
member
.
invite?
&&
can?
(
current_user
,
action_member_permission
(
:admin
,
member
),
member
.
source
)
=
link_to
icon
(
'paper-plane'
),
polymorphic_path
([
:resend_invite
,
member
]),
method: :post
,
class:
'btn btn-default prepend-left-10 hidden-xs'
,
title:
'Resend invite'
-
if
user
!=
current_user
&&
can_admin_member
-
if
user
!=
current_user
&&
can_admin_member
=
form_for
member
,
remote:
true
,
html:
{
class:
'form-horizontal js-edit-member-form'
}
do
|
f
|
=
form_for
member
,
remote:
true
,
html:
{
class:
'form-horizontal js-edit-member-form'
}
do
|
f
|
=
f
.
hidden_field
:access_level
=
f
.
hidden_field
:access_level
...
@@ -75,13 +84,17 @@
...
@@ -75,13 +84,17 @@
-
if
member
.
invite?
&&
can?
(
current_user
,
action_member_permission
(
:admin
,
member
),
member
.
source
)
-
if
member
.
invite?
&&
can?
(
current_user
,
action_member_permission
(
:admin
,
member
),
member
.
source
)
=
link_to
'Resend invite'
,
polymorphic_path
([
:resend_invite
,
member
]),
=
link_to
'Resend invite'
,
polymorphic_path
([
:resend_invite
,
member
]),
method: :post
,
method: :post
,
class:
'btn btn-default prepend-left-10'
class:
'btn btn-default prepend-left-10
visible-xs-block
'
-
elsif
member
.
request?
&&
can_admin_member
-
elsif
member
.
request?
&&
can_admin_member
=
link_to
icon
(
'check inverse'
),
polymorphic_path
([
:approve_access_request
,
member
]),
=
link_to
polymorphic_path
([
:approve_access_request
,
member
]),
method: :post
,
method: :post
,
class:
'btn btn-success prepend-left-10'
,
class:
'btn btn-success prepend-left-10'
,
title:
'Grant access'
title:
'Grant access'
do
%span
{
class:
(
'visible-xs-block'
if
force_mobile_view
==
false
)
}
Grant access
-
if
force_mobile_view
==
false
=
icon
(
'check inverse'
,
class:
'hidden-xs'
)
-
if
can?
(
current_user
,
action_member_permission
(
:destroy
,
member
),
member
)
-
if
can?
(
current_user
,
action_member_permission
(
:destroy
,
member
),
member
)
-
if
current_user
==
user
-
if
current_user
==
user
...
@@ -96,8 +109,9 @@
...
@@ -96,8 +109,9 @@
data:
{
confirm:
remove_member_message
(
member
)
},
data:
{
confirm:
remove_member_message
(
member
)
},
class:
'btn btn-remove prepend-left-10'
,
class:
'btn btn-remove prepend-left-10'
,
title:
remove_member_title
(
member
)
do
title:
remove_member_title
(
member
)
do
%span
.visible-xs-block
%span
{
class:
(
'visible-xs-block'
if
force_mobile_view
==
false
)
}
Delete
Delete
-
if
force_mobile_view
==
false
=
icon
(
'trash'
,
class:
'hidden-xs'
)
=
icon
(
'trash'
,
class:
'hidden-xs'
)
-
else
-
else
%span
.member-access-text
=
member
.
human_access
%span
.member-access-text
=
member
.
human_access
app/views/shared/members/_requests.html.haml
View file @
8e55acb0
-
force_mobile_view
=
local_assigns
.
fetch
(
:force_mobile_view
,
false
)
-
if
requesters
.
any?
-
if
requesters
.
any?
.panel.panel-default.prepend-top-default
.panel.panel-default.prepend-top-default
{
class:
(
'panel-mobile'
if
force_mobile_view
)
}
.panel-heading
.panel-heading
Users requesting access to
Users requesting access to
%strong
=
membership_source
.
name
%strong
=
membership_source
.
name
%span
.badge
=
requesters
.
size
%span
.badge
=
requesters
.
size
%ul
.content-list
%ul
.content-list
.members-list
=
render
partial:
'shared/members/member'
,
collection:
requesters
,
as: :member
=
render
partial:
'shared/members/member'
,
collection:
requesters
,
as: :member
,
locals:
{
force_mobile_view:
force_mobile_view
}
changelogs/unreleased/25103-mobile-members-page-user-avatar-is-misaligned.yml
0 → 100644
View file @
8e55acb0
---
title
:
Improve members view on mobile
merge_request
:
12619
author
:
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