Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0bfcc574
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,体验更适合开发者的 AI 搜索 >>
提交
0bfcc574
编写于
9月 10, 2012
作者:
R
Riyad Preukschas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Extract displaying votes into partials
上级
f7c70eaa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
32 deletion
+17
-32
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+1
-8
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+1
-8
app/views/merge_requests/_merge_request.html.haml
app/views/merge_requests/_merge_request.html.haml
+2
-8
app/views/merge_requests/show/_mr_title.html.haml
app/views/merge_requests/show/_mr_title.html.haml
+1
-8
app/views/votes/_votes_block.html.haml
app/views/votes/_votes_block.html.haml
+6
-0
app/views/votes/_votes_inline.html.haml
app/views/votes/_votes_inline.html.haml
+6
-0
未找到文件。
app/views/issues/_show.html.haml
浏览文件 @
0bfcc574
...
...
@@ -35,11 +35,4 @@
-
if
issue
.
votes_count
>
0
.votes.votes-inline
.upvotes
=
issue
.
upvotes
.progress
-
up_percent
=
100.0
/
issue
.
votes_count
*
issue
.
upvotes
-
down_percent
=
100.0
-
up_percent
.bar.bar-success
{
style:
"width: #{up_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{down_percent}%;"
}
.downvotes
=
issue
.
downvotes
=
render
'votes/votes_inline'
,
votable:
issue
app/views/issues/show.html.haml
浏览文件 @
0bfcc574
...
...
@@ -17,14 +17,7 @@
Edit
.right
.span3.votes.votes-block
#votes
.progress
-
up_percent
=
100.0
/
@issue
.
votes_count
*
@issue
.
upvotes
-
down_percent
=
100.0
-
up_percent
.bar.bar-success
{
style:
"width: #{up_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{down_percent}%;"
}
.upvotes
=
"
#{
@issue
.
upvotes
}
up"
.downvotes
=
"
#{
@issue
.
downvotes
}
down"
.span3
#votes
=
render
'votes/votes_block'
,
votable:
@issue
.back_link
=
link_to
project_issues_path
(
@project
)
do
...
...
app/views/merge_requests/_merge_request.html.haml
浏览文件 @
0bfcc574
...
...
@@ -23,12 +23,6 @@
authored by
#{
merge_request
.
author_name
}
=
time_ago_in_words
(
merge_request
.
created_at
)
ago
-
if
merge_request
.
votes_count
>
0
.votes.votes-inline
.upvotes
=
merge_request
.
upvotes
.progress
-
up_percent
=
100.0
/
merge_request
.
votes_count
*
merge_request
.
upvotes
-
down_percent
=
100.0
-
up_percent
.bar.bar-success
{
style:
"width: #{up_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{down_percent}%;"
}
.downvotes
=
merge_request
.
downvotes
=
render
'votes/votes_inline'
,
votable:
merge_request
app/views/merge_requests/show/_mr_title.html.haml
浏览文件 @
0bfcc574
...
...
@@ -24,14 +24,7 @@
Edit
.right
.span3.votes.votes-block
#votes
.progress
-
up_percent
=
100.0
/
@merge_request
.
votes_count
*
@merge_request
.
upvotes
-
down_percent
=
100.0
-
up_percent
.bar.bar-success
{
style:
"width: #{up_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{down_percent}%;"
}
.upvotes
=
"
#{
@merge_request
.
upvotes
}
up"
.downvotes
=
"
#{
@merge_request
.
downvotes
}
down"
.span3
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
.back_link
=
link_to
project_merge_requests_path
(
@project
)
do
...
...
app/views/votes/_votes_block.html.haml
0 → 100644
浏览文件 @
0bfcc574
.votes.votes-block
.progress
.bar.bar-success
{
style:
"width: #{votable.upvotes_in_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{votable.downvotes_in_percent}%;"
}
.upvotes
=
"
#{
votable
.
upvotes
}
up"
.downvotes
=
"
#{
votable
.
downvotes
}
down"
app/views/votes/_votes_inline.html.haml
0 → 100644
浏览文件 @
0bfcc574
.votes.votes-inline
.upvotes
=
votable
.
upvotes
.progress
.bar.bar-success
{
style:
"width: #{votable.upvotes_in_percent}%;"
}
.bar.bar-danger
{
style:
"width: #{votable.downvotes_in_percent}%;"
}
.downvotes
=
votable
.
downvotes
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录