Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4adc0337
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,发现更多精彩内容 >>
未验证
提交
4adc0337
编写于
12月 27, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve UI for group milestone and project milestone pages
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
80597d59
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
71 addition
and
75 deletion
+71
-75
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+35
-35
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+36
-40
未找到文件。
app/views/groups/milestones/show.html.haml
浏览文件 @
4adc0337
%h3
.page-title
%h4
.page-title
.issue-box
{
class:
"issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}"
}
-
if
@group_milestone
.
closed?
Closed
-
else
Open
Milestone
#{
@group_milestone
.
title
}
.pull-right
-
if
can?
(
current_user
,
:manage_group
,
@group
)
...
...
@@ -7,46 +12,41 @@
-
else
=
link_to
'Reopen Milestone'
,
group_milestone_path
(
@group
,
@group_milestone
.
safe_title
,
title:
@group_milestone
.
title
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-small btn-grouped btn-reopen"
%hr
-
if
(
@group_milestone
.
total_items_count
==
@group_milestone
.
closed_items_count
)
&&
@group_milestone
.
active?
.alert.alert-success
%span
All issues for this milestone are closed. You may close the milestone now.
.back-link
=
link_to
group_milestones_path
(
@group
)
do
←
To milestones list
.issue-box
{
class:
"issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}"
}
.state.clearfix
.state-label
-
if
@group_milestone
.
closed?
Closed
-
else
Open
%h4
.title
=
gfm
escape_once
(
@group_milestone
.
title
)
.description
-
@group_milestone
.
milestones
.
each
do
|
milestone
|
%hr
%h4
=
link_to
"
#{
milestone
.
project
.
name
}
-
#{
milestone
.
title
}
"
,
project_milestone_path
(
milestone
.
project
,
milestone
)
%span
.pull-right
=
milestone
.
expires_at
.description
%table
.table
%thead
%tr
%th
Project
%th
Open issues
%th
State
%th
Due date
-
@group_milestone
.
milestones
.
each
do
|
milestone
|
%tr
%td
=
link_to
"
#{
milestone
.
project
.
name
}
"
,
project_milestone_path
(
milestone
.
project
,
milestone
)
%td
=
milestone
.
issues
.
opened
.
count
%td
-
if
milestone
.
closed?
%span
.label.label-danger
#{
milestone
.
state
}
=
preserve
do
-
if
milestone
.
description
.
present?
=
milestone
.
description
.context
%p
Progress:
#{
@group_milestone
.
closed_items_count
}
closed
–
#{
@group_milestone
.
open_items_count
}
open
Closed
-
else
Open
%td
=
milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@group_milestone.percent_complete}%;"
}
.context
%p
.lead
Progress:
#{
@group_milestone
.
closed_items_count
}
closed
–
#{
@group_milestone
.
open_items_count
}
open
.progress.progress-info
.progress-bar
{
style:
"width: #{@group_milestone.percent_complete}%;"
}
%ul
.nav.nav-tabs
%li
.active
...
...
app/views/projects/milestones/show.html.haml
浏览文件 @
4adc0337
=
render
"projects/issues_nav"
%h
3
.page-title
%h
4
.page-title
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
-
if
@milestone
.
closed?
Closed
...
...
@@ -8,52 +8,44 @@
-
else
Open
Milestone ##{@milestone.iid}
.pull-right.creator
%small
=
@milestone
.
expires_at
%small
.creator
=
@milestone
.
expires_at
.pull-right
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-grouped"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-grouped"
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-grouped"
%hr
-
if
@milestone
.
issues
.
any?
&&
@milestone
.
can_be_closed?
.alert.alert-success
%span
All issues for this milestone are closed. You may close milestone now.
.row
.col-sm-9
%h3
.issue-title
=
gfm
escape_once
(
@milestone
.
title
)
%div
-
if
@milestone
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
@milestone
.
description
%hr
.context
%p
.lead
Progress:
#{
@milestone
.
closed_items_count
}
closed
–
#{
@milestone
.
open_items_count
}
open
%span
.light
#{
@milestone
.
percent_complete
}
% complete
%span
.pull-right
=
@milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
.col-sm-3
%div
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-block"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-block"
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-block"
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-block"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-block"
%h3
.issue-title
=
gfm
escape_once
(
@milestone
.
title
)
%div
-
if
@milestone
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
@milestone
.
description
%hr
.context
%p
.lead
Progress:
#{
@milestone
.
closed_items_count
}
closed
–
#{
@milestone
.
open_items_count
}
open
%span
.light
#{
@milestone
.
percent_complete
}
% complete
%span
.pull-right
=
@milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
%ul
.nav.nav-tabs
...
...
@@ -71,6 +63,10 @@
%span
.badge
=
@users
.
count
.pull-right
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-grouped"
.tab-content
.tab-pane.active
#tab-issues
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录