BigW Consortium Gitlab

Commit 1271b4ce by Riyad Preukschas

Update display of merge requests and issues to also show downvotes

parent 7b0c7ae5
...@@ -406,13 +406,23 @@ p.time { ...@@ -406,13 +406,23 @@ p.time {
} }
} }
.upvotes { .votes {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: #468847; padding: 4px 0;
text-align: right; margin: 2px 0;
padding: 4px; .upvotes {
margin: 2px; display: inline-block;
color: #468847;
padding: 0 4px;
margin: 0 2px;
}
.downvotes {
display: inline-block;
color: #B94A48;
padding: 0 4px;
margin: 0 2px;
}
} }
/* Fix for readme code (stopped it from being yellow) */ /* Fix for readme code (stopped it from being yellow) */
......
...@@ -36,3 +36,5 @@ ...@@ -36,3 +36,5 @@
- if issue.upvotes > 0 - if issue.upvotes > 0
%span.badge.badge-success= "+#{issue.upvotes}" %span.badge.badge-success= "+#{issue.upvotes}"
- if issue.downvotes > 0
%span.badge.badge-important= "-#{issue.downvotes}"
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
Edit Edit
%br %br
- if @issue.upvotes > 0 .votes#votes
.upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}" Votes:
.upvotes#upvotes= "#{@issue.upvotes} up"
.downvotes#downvotes= "#{@issue.downvotes} down"
.back_link .back_link
= link_to project_issues_path(@project) do = link_to project_issues_path(@project) do
......
...@@ -25,3 +25,5 @@ ...@@ -25,3 +25,5 @@
ago ago
- if merge_request.upvotes > 0 - if merge_request.upvotes > 0
%span.badge.badge-success= "+#{merge_request.upvotes}" %span.badge.badge-success= "+#{merge_request.upvotes}"
- if merge_request.downvotes > 0
%span.badge.badge-important= "-#{merge_request.downvotes}"
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
Edit Edit
%br %br
- if @merge_request.upvotes > 0 .votes#votes
.upvotes#upvotes= "+#{pluralize @merge_request.upvotes, 'upvote'}" Votes:
.upvotes#upvotes= "#{@merge_request.upvotes} up"
.downvotes#downvotes= "#{@merge_request.downvotes} down"
.back_link .back_link
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment