Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a5164ea2
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 搜索 >>
提交
a5164ea2
编写于
9月 08, 2012
作者:
R
Riyad Preukschas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show votes as a bar
上级
5ca31aa2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
70 addition
and
27 deletion
+70
-27
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+33
-8
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+9
-4
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+10
-5
app/views/merge_requests/_merge_request.html.haml
app/views/merge_requests/_merge_request.html.haml
+9
-4
app/views/merge_requests/show/_mr_title.html.haml
app/views/merge_requests/show/_mr_title.html.haml
+9
-6
未找到文件。
app/assets/stylesheets/common.scss
浏览文件 @
a5164ea2
...
...
@@ -407,21 +407,46 @@ p.time {
}
.votes
{
font-size
:
14px
;
font-weight
:
bold
;
padding
:
4px
0
;
margin
:
2px
0
;
font-size
:
13px
;
line-height
:
15px
;
.progress
{
height
:
4px
;
margin
:
0
;
.bar
{
float
:
left
;
height
:
100%
;
}
.bar-success
{
background-color
:
#468847
;
@include
bg-gradient
(
#62C462
,
#51A351
);
}
.bar-danger
{
background-color
:
#B94A48
;
@include
bg-gradient
(
#EE5F5B
,
#BD362F
);
}
}
.upvotes
{
display
:
inline-block
;
color
:
#468847
;
padding
:
0
4px
;
margin
:
0
2px
;
}
.downvotes
{
display
:
inline-block
;
color
:
#B94A48
;
padding
:
0
4px
;
margin
:
0
2px
;
}
}
.votes-block
{
margin
:
14px
6px
6px
0
;
.downvotes
{
float
:
right
;
}
}
.votes-inline
{
display
:
inline-block
;
margin
:
0
8px
;
.progress
{
display
:
inline-block
;
padding
:
0
0
2px
;
width
:
45px
;
}
}
...
...
app/views/issues/_show.html.haml
浏览文件 @
a5164ea2
...
...
@@ -34,7 +34,12 @@
-
else
-
if
issue
.
upvotes
>
0
%span
.badge.badge-success
=
"+
#{
issue
.
upvotes
}
"
-
if
issue
.
downvotes
>
0
%span
.badge.badge-important
=
"-
#{
issue
.
downvotes
}
"
-
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
app/views/issues/show.html.haml
浏览文件 @
a5164ea2
...
...
@@ -16,16 +16,21 @@
%i
.icon-edit
Edit
%br
.votes
#votes
Votes:
.upvotes
#upvotes
=
"
#{
@issue
.
upvotes
}
up"
.downvotes
#downvotes
=
"
#{
@issue
.
downvotes
}
down"
.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"
.back_link
=
link_to
project_issues_path
(
@project
)
do
←
To issues list
.main_box
.top_box_content
%h4
...
...
app/views/merge_requests/_merge_request.html.haml
浏览文件 @
a5164ea2
...
...
@@ -23,7 +23,12 @@
authored by
#{
merge_request
.
author_name
}
=
time_ago_in_words
(
merge_request
.
created_at
)
ago
-
if
merge_request
.
upvotes
>
0
%span
.badge.badge-success
=
"+
#{
merge_request
.
upvotes
}
"
-
if
merge_request
.
downvotes
>
0
%span
.badge.badge-important
=
"-
#{
merge_request
.
downvotes
}
"
-
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
app/views/merge_requests/show/_mr_title.html.haml
浏览文件 @
a5164ea2
...
...
@@ -23,12 +23,15 @@
%i
.icon-edit
Edit
%br
.votes
#votes
Votes:
.upvotes
#upvotes
=
"
#{
@merge_request
.
upvotes
}
up"
.downvotes
#downvotes
=
"
#{
@merge_request
.
downvotes
}
down"
.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"
.back_link
=
link_to
project_merge_requests_path
(
@project
)
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录