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
Tatuya Kamada
gitlab-ce
Commits
0c3ac827
Commit
0c3ac827
authored
Aug 06, 2016
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove inline JavaScript. Add datepicker to the edit form.
parent
6d892244
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
app/assets/javascripts/project_members.js
app/assets/javascripts/project_members.js
+7
-0
app/views/projects/project_members/_new_project_member.html.haml
...ws/projects/project_members/_new_project_member.html.haml
+2
-7
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+1
-1
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+3
-2
No files found.
app/assets/javascripts/project_members.js
View file @
0c3ac827
...
@@ -4,6 +4,13 @@
...
@@ -4,6 +4,13 @@
$
(
'
li.project_member
'
).
bind
(
'
ajax:success
'
,
function
()
{
$
(
'
li.project_member
'
).
bind
(
'
ajax:success
'
,
function
()
{
return
$
(
this
).
fadeOut
();
return
$
(
this
).
fadeOut
();
});
});
$
(
'
.js-project-members-page
'
).
on
(
'
focus
'
,
'
.js-access-expiration-date
'
,
function
()
{
$
(
this
).
datepicker
({
dateFormat
:
'
yy-mm-dd
'
,
minDate
:
1
});
});
}
}
return
ProjectMembers
;
return
ProjectMembers
;
...
...
app/views/projects/project_members/_new_project_member.html.haml
View file @
0c3ac827
...
@@ -15,16 +15,11 @@
...
@@ -15,16 +15,11 @@
%strong
=
link_to
"here"
,
help_page_path
(
"user/permissions"
),
class:
"vlink"
%strong
=
link_to
"here"
,
help_page_path
(
"user/permissions"
),
class:
"vlink"
.form-group
.form-group
=
label_tag
:expires_at
,
"Access expiration date"
,
class:
'control-label'
=
label_tag
:expires_at
,
'Access expiration date'
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
text_field_tag
:expires_at
,
nil
,
class:
"datepicker form-control"
,
placeholder:
"Select access expiration date"
=
text_field_tag
:expires_at
,
nil
,
class:
'form-control js-access-expiration-date'
,
placeholder:
'Select access expiration date'
.help-block
.help-block
Leave it empty if you do not want this user's access to expire.
Leave it empty if you do not want this user's access to expire.
.form-actions
.form-actions
=
f
.
submit
'Add users to project'
,
class:
"btn btn-create"
=
f
.
submit
'Add users to project'
,
class:
"btn btn-create"
:javascript
$
(
"
.datepicker
"
).
datepicker
({
dateFormat
:
"
yy-mm-dd
"
});
app/views/projects/project_members/index.html.haml
View file @
0c3ac827
-
page_title
"Members"
-
page_title
"Members"
.project-members-page.prepend-top-default
.project-members-page.
js-project-members-page.
prepend-top-default
-
if
can?
(
current_user
,
:admin_project_member
,
@project
)
-
if
can?
(
current_user
,
:admin_project_member
,
@project
)
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
...
...
app/views/shared/members/_member.html.haml
View file @
0c3ac827
...
@@ -80,7 +80,8 @@
...
@@ -80,7 +80,8 @@
=
form_for
member
,
remote:
true
do
|
f
|
=
form_for
member
,
remote:
true
do
|
f
|
.prepend-top-10
.prepend-top-10
=
f
.
select
:access_level
,
options_for_select
(
member
.
class
.
access_level_roles
,
member
.
access_level
),
{},
class:
'form-control'
=
f
.
select
:access_level
,
options_for_select
(
member
.
class
.
access_level_roles
,
member
.
access_level
),
{},
class:
'form-control'
-
if
member
.
type
==
'ProjectMember'
.prepend-top-10
.prepend-top-10
=
f
.
text_field
:expires_at
,
class:
'form-control'
,
placeholder:
'Access expiration date'
=
f
.
text_field
:expires_at
,
class:
'form-control js-access-expiration-date'
,
placeholder:
'Access expiration date'
,
id:
"member_expires_at_
#{
member
.
id
}
"
.prepend-top-10
.prepend-top-10
=
f
.
submit
'Save'
,
class:
'btn btn-save btn-sm'
=
f
.
submit
'Save'
,
class:
'btn btn-save btn-sm'
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