Commit 085e5084 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make issue and merge request sidebar more compact

* move votes block to participants
* make smaller font in sidebar
parent 1f711fd9
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
} }
.issuable-context-title { .issuable-context-title {
font-size: 15px; font-size: 14px;
line-height: 1.4; line-height: 1.4;
margin-bottom: 5px; margin-bottom: 5px;
...@@ -39,3 +39,9 @@ ...@@ -39,3 +39,9 @@
margin-right: 4px; margin-right: 4px;
} }
} }
.issuable-affix .context {
font-size: 13px;
.btn { font-size: 13px; }
}
.votes {
font-size: 13px;
line-height: 15px;
.progress {
height: 4px;
margin: 0;
.bar {
float: left;
height: 100%;
}
.bar-success {
@include linear-gradient(#62C462, #51A351);
background-color: #468847;
}
.bar-danger {
@include linear-gradient(#EE5F5B, #BD362F);
background-color: #B94A48;
}
}
.upvotes {
display: inline-block;
color: #468847;
}
.downvotes {
display: inline-block;
color: #B94A48;
}
}
.votes-block {
margin: 6px;
.downvotes {
float: right;
}
}
.votes-inline { .votes-inline {
display: inline-block; display: inline-block;
margin: 0 8px; margin: 0 8px;
} }
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue" = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
.row .row
%section.col-md-9 %section.col-md-9
.votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @issue
.participants .participants
%span= pluralize(@issue.participants.count, 'participant') %span= pluralize(@issue.participants.count, 'participant')
- @issue.participants.each do |participant| - @issue.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24) = link_to_member(@project, participant, name: false, size: 24)
.voting_notes#notes= render "projects/notes/notes_with_form" .voting_notes#notes= render "projects/notes/notes_with_form"
%aside.col-md-3 %aside.col-md-3
.issuable-affix .issuable-affix
...@@ -20,15 +21,10 @@ ...@@ -20,15 +21,10 @@
%hr %hr
.context .context
= render partial: 'issue_context', locals: { issue: @issue } = render partial: 'issue_context', locals: { issue: @issue }
%hr
.clearfix
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @issue
- if @issue.labels.any? - if @issue.labels.any?
%hr .issuable-context-title
%h6 Labels %label Labels
.issue-show-labels .issue-show-labels
- @issue.labels.each do |label| - @issue.labels.each do |label|
= link_to namespace_project_issues_path(@project.namespace, @project, label_name: label.name) do = link_to namespace_project_issues_path(@project.namespace, @project, label_name: label.name) do
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
.row .row
%section.col-md-9 %section.col-md-9
.votes-holder.pull-right
#votes= render 'votes/votes_block', votable: @merge_request
= render "projects/merge_requests/show/participants" = render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
%aside.col-md-3 %aside.col-md-3
...@@ -17,14 +19,10 @@ ...@@ -17,14 +19,10 @@
%hr %hr
.context .context
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request } = render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
%hr
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @merge_request
- if @merge_request.labels.any? - if @merge_request.labels.any?
%hr .issuable-context-title
%h6 Labels %label Labels
.merge-request-show-labels .merge-request-show-labels
- @merge_request.labels.each do |label| - @merge_request.labels.each do |label|
= link_to namespace_project_merge_requests_path(@project.namespace, @project, label_name: label.name) do = link_to namespace_project_merge_requests_path(@project.namespace, @project, label_name: label.name) do
......
.votes.votes-block .votes.votes-block
.progress .btn-group
.progress-bar.progress-bar-success{style: "width: #{votable.upvotes_in_percent}%;"} - unless votable.upvotes.zero?
.progress-bar.progress-bar-danger{style: "width: #{votable.downvotes_in_percent}%;"} .btn.btn-sm.disabled.cgreen
.upvotes= "#{votable.upvotes} up" %i.fa.fa-thumbs-up
.downvotes= "#{votable.downvotes} down" = votable.upvotes
- unless votable.downvotes.zero?
.btn.btn-sm.disabled.cred
%i.fa.fa-thumbs-down
= votable.downvotes
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