Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
60a98584
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,发现更多精彩内容 >>
提交
60a98584
编写于
9月 05, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7658 from Razer6/refresh_labels_page_on_delete
Show labels help message if last label is deleted
上级
3a971ca9
bd235519
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
9 deletion
+32
-9
app/controllers/projects/labels_controller.rb
app/controllers/projects/labels_controller.rb
+1
-1
app/views/projects/labels/destroy.js.haml
app/views/projects/labels/destroy.js.haml
+2
-0
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+8
-8
features/project/issues/labels.feature
features/project/issues/labels.feature
+5
-0
features/steps/project/labels.rb
features/steps/project/labels.rb
+16
-0
未找到文件。
app/controllers/projects/labels_controller.rb
浏览文件 @
60a98584
...
...
@@ -52,7 +52,7 @@ class Projects::LabelsController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_labels_path
(
@project
),
notice:
'Label was removed'
}
format
.
js
{
render
nothing:
true
}
format
.
js
end
end
...
...
app/views/projects/labels/destroy.js.haml
0 → 100644
浏览文件 @
60a98584
-
if
@project
.
labels
.
size
==
0
$('.labels').load(document.URL + ' .light-well').hide().fadeIn(1000)
app/views/projects/labels/index.html.haml
浏览文件 @
60a98584
...
...
@@ -7,11 +7,11 @@
Labels
%hr
-
if
@labels
.
present?
%ul
.bordered-list.manage-labels-list
=
render
@labels
=
paginate
@labels
,
theme:
'gitlab'
-
else
.light-well
.nothing-here-block
Create first label or
#{
link_to
'generate'
,
generate_project_labels_path
(
@project
),
method: :post
}
default set of labels
.labels
-
if
@labels
.
present?
%ul
.bordered-list.manage-labels-list
=
render
@labels
=
paginate
@labels
,
theme:
'gitlab'
-
else
.light-well
.nothing-here-block
Create first label or
#{
link_to
'generate'
,
generate_project_labels_path
(
@project
),
method: :post
}
default set of labels
features/project/issues/labels.feature
浏览文件 @
60a98584
...
...
@@ -24,6 +24,11 @@ Feature: Project Labels
When
I remove label 'bug'
Then
I should not see label 'bug'
@javascript
Scenario
:
I
remove all labels
When
I delete all labels
Then
I should see labels help message
Scenario
:
I
create a label with invalid color
Given
I visit project
"Shop"
new label page
When
I submit new label with invalid color
...
...
features/steps/project/labels.rb
浏览文件 @
60a98584
...
...
@@ -25,6 +25,22 @@ class ProjectLabels < Spinach::FeatureSteps
end
end
step
'I delete all labels'
do
within
'.labels'
do
all
(
'.btn-remove'
).
each
do
|
remove
|
remove
.
click
sleep
0.05
end
end
end
step
'I should see labels help message'
do
within
'.labels'
do
page
.
should
have_content
'Create first label or generate default set of '
\
'labels'
end
end
step
'I submit new label \'support\''
do
fill_in
'Title'
,
with:
'support'
fill_in
'Background Color'
,
with:
'#F95610'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录