Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
36dbac2f
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,发现更多精彩内容 >>
提交
36dbac2f
编写于
10月 30, 2012
作者:
R
randx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More seeds
上级
e4cf99db
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
49 addition
and
65 deletion
+49
-65
app/views/milestones/_milestone.html.haml
app/views/milestones/_milestone.html.haml
+9
-8
db/fixtures/development/005_issues.rb
db/fixtures/development/005_issues.rb
+0
-40
db/fixtures/development/005_milestones.rb
db/fixtures/development/005_milestones.rb
+0
-0
db/fixtures/development/007_issues.rb
db/fixtures/development/007_issues.rb
+20
-0
db/fixtures/development/008_merge_requests.rb
db/fixtures/development/008_merge_requests.rb
+20
-17
未找到文件。
app/views/milestones/_milestone.html.haml
浏览文件 @
36dbac2f
...
...
@@ -9,13 +9,14 @@
%small
=
milestone
.
expires_at
.row
.progress.progress-info.span4
.span4
.progress.progress-info
.bar
{
style:
"width: #{milestone.percent_complete}%;"
}
.span6
-
if
milestone
.
issues
.
any?
=
link_to
project_issues_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
issues
.
count
,
'Issue'
-
if
milestone
.
merge_requests
.
any?
=
link_to
project_merge_requests_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
merge_requests
.
count
,
'Merge Request'
%span
.light
#{
milestone
.
percent_complete
}
% complete
db/fixtures/development/005_issues.rb
已删除
100644 → 0
浏览文件 @
e4cf99db
Issue
.
seed
(
:id
,
[
{
:id
=>
1
,
:project_id
=>
1
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
2
,
:project_id
=>
1
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
3
,
:project_id
=>
1
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
4
,
:project_id
=>
1
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
5
,
:project_id
=>
1
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
6
,
:project_id
=>
2
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
7
,
:project_id
=>
2
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
8
,
:project_id
=>
2
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
9
,
:project_id
=>
2
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
11
,
:project_id
=>
2
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
12
,
:project_id
=>
3
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
13
,
:project_id
=>
3
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
14
,
:project_id
=>
3
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
15
,
:project_id
=>
3
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
16
,
:project_id
=>
3
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
21
,
:project_id
=>
1
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
22
,
:project_id
=>
1
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
23
,
:project_id
=>
1
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
24
,
:project_id
=>
1
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
25
,
:project_id
=>
1
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
26
,
:project_id
=>
2
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
27
,
:project_id
=>
2
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
28
,
:project_id
=>
2
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
29
,
:project_id
=>
2
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
30
,
:project_id
=>
2
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
32
,
:project_id
=>
3
,
:author_id
=>
1
,
:assignee_id
=>
1
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
33
,
:project_id
=>
3
,
:author_id
=>
2
,
:assignee_id
=>
2
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
34
,
:project_id
=>
3
,
:author_id
=>
3
,
:assignee_id
=>
3
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
35
,
:project_id
=>
3
,
:author_id
=>
4
,
:assignee_id
=>
4
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
36
,
:project_id
=>
3
,
:author_id
=>
5
,
:assignee_id
=>
5
,
:title
=>
Faker
::
Lorem
.
sentence
(
6
)}
])
db/fixtures/development/00
7
_milestones.rb
→
db/fixtures/development/00
5
_milestones.rb
浏览文件 @
36dbac2f
文件已移动
db/fixtures/development/007_issues.rb
0 → 100644
浏览文件 @
36dbac2f
(
1
..
300
).
each
do
|
i
|
# Random Project
project_id
=
rand
(
2
)
+
1
project
=
Project
.
find
(
project_id
)
# Random user
user
=
project
.
users
.
sample
user_id
=
user
.
id
IssueObserver
.
current_user
=
user
Issue
.
seed
(
:id
,
[{
id:
i
,
project_id:
project_id
,
author_id:
user_id
,
assignee_id:
user_id
,
closed:
[
true
,
false
].
sample
,
milestone:
project
.
milestones
.
sample
,
title:
Faker
::
Lorem
.
sentence
(
6
)
}])
end
db/fixtures/development/008_merge_requests.rb
浏览文件 @
36dbac2f
MergeRequest
.
seed
(
:id
,
[
{
:id
=>
1
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
2
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
3
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
4
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
5
,
milestone_id:
1
,
project_id:
1
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
(
1
..
300
).
each
do
|
i
|
# Random Project
project_id
=
rand
(
2
)
+
1
project
=
Project
.
find
(
project_id
)
{
:id
=>
6
,
milestone_id:
5
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
7
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
8
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
9
,
milestone_id:
6
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
{
:id
=>
11
,
milestone_id:
5
,
project_id:
2
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)
},
# Random user
user
=
project
.
users
.
sample
user_id
=
user
.
id
MergeRequestObserver
.
current_user
=
user
{
:id
=>
12
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
1
,
assignee_id:
1
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
13
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
2
,
assignee_id:
2
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
14
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
3
,
assignee_id:
3
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
15
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
4
,
assignee_id:
4
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
{
:id
=>
16
,
milestone_id:
9
,
project_id:
3
,
source_branch:
'master'
,
target_branch:
'feature'
,
author_id:
5
,
assignee_id:
5
,
title:
Faker
::
Lorem
.
sentence
(
6
)},
])
MergeRequest
.
seed
(
:id
,
[{
id:
i
,
source_branch:
'master'
,
target_branch:
'feature'
,
project_id:
project_id
,
author_id:
user_id
,
assignee_id:
user_id
,
closed:
[
true
,
false
].
sample
,
milestone:
project
.
milestones
.
sample
,
title:
Faker
::
Lorem
.
sentence
(
6
)
}])
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录