Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6c54823d
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c54823d
编写于
12月 02, 2015
作者:
D
Douwe Maan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use select2 placeholder instead of blank option
上级
1df2908b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+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
未找到文件。
app/views/projects/merge_requests/_new_compare.html.haml
浏览文件 @
6c54823d
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
.panel-body
.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_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
.panel-footer
.mr_source_commit
.mr_source_commit
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
-
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_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
.panel-footer
.mr_target_commit
.mr_target_commit
...
...
app/views/shared/issuable/_context.html.haml
浏览文件 @
6c54823d
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
none
none
.issuable-context-selectbox
.issuable-context-selectbox
-
if
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
-
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
=
hidden_field_tag
:issuable_context
=
f
.
submit
class:
'btn hide'
=
f
.
submit
class:
'btn hide'
...
...
app/views/shared/issuable/_form.html.haml
浏览文件 @
6c54823d
...
@@ -39,9 +39,9 @@
...
@@ -39,9 +39,9 @@
Assign to
Assign to
.col-sm-10
.col-sm-10
=
users_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
=
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
,
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'
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
.form-group
.form-group
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
.col-sm-10
.col-sm-10
-
if
milestone_options
(
issuable
).
present?
-
if
milestone_options
(
issuable
).
present?
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
{
include_blank:
'Select milestone'
},
{
class:
'select2'
})
{
include_blank:
true
},
{
class:
'select2'
,
data:
{
placeholder:
'Select milestone'
}
})
-
else
-
else
.prepend-top-10
.prepend-top-10
%span
.light
No open milestones available.
%span
.light
No open milestones available.
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
.col-sm-10
.col-sm-10
-
if
issuable
.
project
.
labels
.
any?
-
if
issuable
.
project
.
labels
.
any?
=
f
.
collection_select
:label_ids
,
issuable
.
project
.
labels
.
all
,
:id
,
:name
,
=
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
-
else
.prepend-top-10
.prepend-top-10
%span
.light
No labels yet.
%span
.light
No labels yet.
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
%i
.fa.fa-code-fork
%i
.fa.fa-code-fork
Target Branch
Target Branch
.col-sm-10
.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?
-
if
@merge_request
.
new_record?
%p
.help-block
%p
.help-block
=
link_to
'Change branches'
,
mr_change_branches_path
(
@merge_request
)
=
link_to
'Change branches'
,
mr_change_branches_path
(
@merge_request
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录