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
a046d9c1
Commit
a046d9c1
authored
Oct 27, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to GL dropdown - not working 100%
parent
67522fc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
app/assets/javascripts/members.js.es6
app/assets/javascripts/members.js.es6
+8
-3
app/assets/stylesheets/pages/members.scss
app/assets/stylesheets/pages/members.scss
+4
-0
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+22
-1
No files found.
app/assets/javascripts/members.js.es6
View file @
a046d9c1
...
@@ -41,7 +41,8 @@
...
@@ -41,7 +41,8 @@
showLDAPPermissionsWarning (e) {
showLDAPPermissionsWarning (e) {
const btn = e.currentTarget,
const btn = e.currentTarget,
ldapPermissionsElement = this.getLDAPPermissionsElement(btn);
memberListItem = this.getMemberListItem(btn),
ldapPermissionsElement = memberListItem.nextElementSibling;
if (ldapPermissionsElement.style.display === 'none') {
if (ldapPermissionsElement.style.display === 'none') {
ldapPermissionsElement.style.display = 'block';
ldapPermissionsElement.style.display = 'block';
...
@@ -50,8 +51,12 @@
...
@@ -50,8 +51,12 @@
}
}
}
}
getLDAPPermissionsElement (btn) {
getMemberListItem (btn) {
return document.getElementById(btn.dataset.id).nextElementSibling;
return document.getElementById(btn.dataset.id);
}
toggleMemberAccessToggle (el) {
const toggle = el.querySelectorAll('.dropdown-menu-toggle')[0];
}
}
}
}
...
...
app/assets/stylesheets/pages/members.scss
View file @
a046d9c1
...
@@ -54,6 +54,10 @@
...
@@ -54,6 +54,10 @@
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
width
:
50%
;
width
:
50%
;
}
}
.dropdown-menu-toggle
{
width
:
100%
;
}
}
}
.member-access-text
{
.member-access-text
{
...
...
app/views/shared/members/_member.html.haml
View file @
a046d9c1
...
@@ -51,7 +51,28 @@
...
@@ -51,7 +51,28 @@
-
if
show_controls
&&
(
member
.
respond_to?
(
:group
)
&&
@group
)
||
(
member
.
respond_to?
(
:project
)
&&
@project
)
-
if
show_controls
&&
(
member
.
respond_to?
(
:group
)
&&
@group
)
||
(
member
.
respond_to?
(
:project
)
&&
@project
)
-
if
user
!=
current_user
-
if
user
!=
current_user
=
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
.
select
:access_level
,
options_for_select
(
member
.
class
.
access_level_roles
,
member
.
access_level
),
{},
class:
'form-control member-form-control append-right-5 js-member-update-control'
,
id:
"member_access_level_
#{
member
.
id
}
"
,
disabled:
!
can_admin_member
-# = f.select :access_level, options_for_select(member.class.access_level_roles, member.access_level), {}, class: 'form-control member-form-control append-right-5 js-member-update-control', id: "member_access_level_#{member.id}", disabled: !can_admin_member
.member-form-control.dropdown.append-right-5
%button
.dropdown-menu-toggle
{
type:
"button"
,
disabled:
member
.
ldap
&&
!
member
.
override
,
data:
{
toggle:
"dropdown"
}
}
=
member
.
human_access
=
icon
(
"caret-down"
)
.dropdown-menu.dropdown-select.dropdown-menu-align-right.dropdown-menu-selectable
=
dropdown_title
(
"Change permissions"
)
.dropdown-content
%ul
-
Gitlab
::
Access
.
options
.
each
do
|
role
,
role_id
|
%li
%a
{
href:
"#"
,
class:
(
"is-active"
if
member
.
access_level
==
role_id
),
data:
{
id:
role_id
}
}
=
role
-
if
member
.
ldap
%li
.divider
%li
%a
{
href:
"#"
}
Revert to LDAP group sync settings
.prepend-left-5.clearable-input.member-form-control
.prepend-left-5.clearable-input.member-form-control
=
f
.
text_field
:expires_at
,
class:
'form-control js-access-expiration-date js-member-update-control'
,
placeholder:
'Expiration date'
,
id:
"member_expires_at_
#{
member
.
id
}
"
,
disabled:
!
can_admin_member
=
f
.
text_field
:expires_at
,
class:
'form-control js-access-expiration-date js-member-update-control'
,
placeholder:
'Expiration date'
,
id:
"member_expires_at_
#{
member
.
id
}
"
,
disabled:
!
can_admin_member
%i
.clear-icon.js-clear-input
%i
.clear-icon.js-clear-input
...
...
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