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
Jérome Perrin
gitlab-ce
Commits
6c54823d
Commit
6c54823d
authored
Dec 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use select2 placeholder instead of blank option
parent
1df2908b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/views/projects/merge_requests/_new_compare.html.haml
app/views/projects/merge_requests/_new_compare.html.haml
+2
-2
app/views/shared/issuable/_context.html.haml
app/views/shared/issuable/_context.html.haml
+1
-1
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+5
-5
No files found.
app/views/projects/merge_requests/_new_compare.html.haml
View file @
6c54823d
...
...
@@ -10,7 +10,7 @@
.panel-body
=
f
.
select
(
:source_project_id
,
[[
@merge_request
.
source_project_path
,
@merge_request
.
source_project
.
id
]]
,
{},
{
class:
'source_project select2 span3'
,
disabled:
@merge_request
.
persisted?
,
required:
true
})
=
f
.
select
(
:source_branch
,
@merge_request
.
source_branches
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch select2 span2'
,
required:
true
})
=
f
.
select
(
:source_branch
,
@merge_request
.
source_branches
,
{
include_blank:
true
},
{
class:
'source_branch select2 span2'
,
required:
true
,
data:
{
placeholder:
"Select source branch"
}
})
.panel-footer
.mr_source_commit
...
...
@@ -22,7 +22,7 @@
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
=
f
.
select
(
:target_project_id
,
options_from_collection_for_select
(
projects
,
'id'
,
'path_with_namespace'
,
f
.
object
.
target_project_id
),
{},
{
class:
'target_project select2 span3'
,
disabled:
@merge_request
.
persisted?
,
required:
true
})
=
f
.
select
(
:target_branch
,
@merge_request
.
target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch select2 span2'
,
required:
true
})
=
f
.
select
(
:target_branch
,
@merge_request
.
target_branches
,
{
include_blank:
true
},
{
class:
'target_branch select2 span2'
,
required:
true
,
data:
{
placeholder:
"Select target branch"
}
})
.panel-footer
.mr_target_commit
...
...
app/views/shared/issuable/_context.html.haml
View file @
6c54823d
...
...
@@ -25,7 +25,7 @@
none
.issuable-context-selectbox
-
if
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
{
include_blank:
'Select milestone'
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
{
include_blank:
true
},
{
class:
'select2 select2-compact js-select2 js-milestone'
,
data:
{
placeholder:
'Select milestone'
}
})
=
hidden_field_tag
:issuable_context
=
f
.
submit
class:
'btn hide'
...
...
app/views/shared/issuable/_form.html.haml
View file @
6c54823d
...
...
@@ -39,9 +39,9 @@
Assign to
.col-sm-10
=
users_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
placeholder:
'Select a
user
'
,
class:
'custom-form-control'
,
null_user:
true
,
placeholder:
'Select a
ssignee
'
,
class:
'custom-form-control'
,
null_user:
true
,
selected:
issuable
.
assignee_id
,
project:
@target_project
||
@project
,
first_user:
true
,
current_user:
true
)
first_user:
true
,
current_user:
true
,
include_blank:
true
)
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
.form-group
...
...
@@ -52,7 +52,7 @@
.col-sm-10
-
if
milestone_options
(
issuable
).
present?
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
{
include_blank:
'Select milestone'
},
{
class:
'select2'
})
{
include_blank:
true
},
{
class:
'select2'
,
data:
{
placeholder:
'Select milestone'
}
})
-
else
.prepend-top-10
%span
.light
No open milestones available.
...
...
@@ -66,7 +66,7 @@
.col-sm-10
-
if
issuable
.
project
.
labels
.
any?
=
f
.
collection_select
:label_ids
,
issuable
.
project
.
labels
.
all
,
:id
,
:name
,
{
selected:
issuable
.
label_ids
},
multiple:
true
,
class:
'select2'
{
selected:
issuable
.
label_ids
},
multiple:
true
,
class:
'select2'
,
data:
{
placeholder:
"Select labels"
}
-
else
.prepend-top-10
%span
.light
No labels yet.
...
...
@@ -88,7 +88,7 @@
%i
.fa.fa-code-fork
Target Branch
.col-sm-10
=
f
.
select
(
:target_branch
,
@merge_request
.
target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch select2 span2'
,
disabled:
@merge_request
.
new_record?
})
=
f
.
select
(
:target_branch
,
@merge_request
.
target_branches
,
{
include_blank:
true
},
{
class:
'target_branch select2 span2'
,
disabled:
@merge_request
.
new_record?
,
data:
{
placeholder:
"Select branch"
}
})
-
if
@merge_request
.
new_record?
%p
.help-block
=
link_to
'Change branches'
,
mr_change_branches_path
(
@merge_request
)
...
...
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