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
Boxiang Sun
gitlab-ce
Commits
11f817b3
Commit
11f817b3
authored
Feb 17, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to choose id attribute in project select helper
parent
5dea8fb9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/assets/javascripts/project_select.js.coffee
app/assets/javascripts/project_select.js.coffee
+3
-2
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+1
-1
No files found.
app/assets/javascripts/project_select.js.coffee
View file @
11f817b3
...
@@ -4,6 +4,7 @@ class @ProjectSelect
...
@@ -4,6 +4,7 @@ class @ProjectSelect
@
groupId
=
$
(
select
).
data
(
'group-id'
)
@
groupId
=
$
(
select
).
data
(
'group-id'
)
@
includeGroups
=
$
(
select
).
data
(
'include-groups'
)
@
includeGroups
=
$
(
select
).
data
(
'include-groups'
)
@
orderBy
=
$
(
select
).
data
(
'order-by'
)
||
'id'
@
orderBy
=
$
(
select
).
data
(
'order-by'
)
||
'id'
@
selectId
=
$
(
select
).
data
(
'select-id'
)
||
'web_url'
placeholder
=
"Search for project"
placeholder
=
"Search for project"
placeholder
+=
" or group"
if
@
includeGroups
placeholder
+=
" or group"
if
@
includeGroups
...
@@ -31,8 +32,8 @@ class @ProjectSelect
...
@@ -31,8 +32,8 @@ class @ProjectSelect
else
else
Api
.
projects
query
.
term
,
@
orderBy
,
projectsCallback
Api
.
projects
query
.
term
,
@
orderBy
,
projectsCallback
id
:
(
project
)
-
>
id
:
(
project
)
=
>
project
.
web_url
project
[
@
selectId
]
text
:
(
project
)
->
text
:
(
project
)
->
project
.
name_with_namespace
||
project
.
name
project
.
name_with_namespace
||
project
.
name
...
...
app/views/shared/issuable/_form.html.haml
View file @
11f817b3
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
=
f
.
label
:move_to_project_id
,
'Move'
,
class:
'control-label'
=
f
.
label
:move_to_project_id
,
'Move'
,
class:
'control-label'
.col-sm-10
.col-sm-10
=
project_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[move_to_project_id]"
,
=
project_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[move_to_project_id]"
,
placeholder:
'Select project'
,
class:
'custom-form-control'
)
placeholder:
'Select project'
,
class:
'custom-form-control'
,
data:
{
'select-id'
=>
'id'
}
)
-
if
issuable
.
is_a?
(
MergeRequest
)
-
if
issuable
.
is_a?
(
MergeRequest
)
%hr
%hr
...
...
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