mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Merge branch 'upvotes-refactoring' into 'master'
Make issue and merge request sidebar more compact * move votes block to participants * make smaller font in sidebar * remove js for upvoting since it differs from logic on backend and does not work correctly Fixes #1253 Tested on different screens: HD, 1366x768, 1024x600 See merge request !410
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
.issuable-context-title {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 5px;
|
||||
|
||||
@@ -39,3 +39,9 @@
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.issuable-affix .context {
|
||||
font-size: 13px;
|
||||
|
||||
.btn { font-size: 13px; }
|
||||
}
|
||||
|
||||
@@ -1,39 +1,4 @@
|
||||
.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 {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
.row
|
||||
%section.col-md-9
|
||||
.votes-holder.pull-right
|
||||
#votes= render 'votes/votes_block', votable: @issue
|
||||
.participants
|
||||
%span= pluralize(@issue.participants.count, 'participant')
|
||||
- @issue.participants.each do |participant|
|
||||
= link_to_member(@project, participant, name: false, size: 24)
|
||||
|
||||
.voting_notes#notes= render "projects/notes/notes_with_form"
|
||||
%aside.col-md-3
|
||||
.issuable-affix
|
||||
@@ -20,15 +21,10 @@
|
||||
%hr
|
||||
.context
|
||||
= render partial: 'issue_context', locals: { issue: @issue }
|
||||
%hr
|
||||
.clearfix
|
||||
.votes-holder
|
||||
%h6 Votes
|
||||
#votes= render 'votes/votes_block', votable: @issue
|
||||
|
||||
- if @issue.labels.any?
|
||||
%hr
|
||||
%h6 Labels
|
||||
.issuable-context-title
|
||||
%label Labels
|
||||
.issue-show-labels
|
||||
- @issue.labels.each do |label|
|
||||
= link_to namespace_project_issues_path(@project.namespace, @project, label_name: label.name) do
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
:coffeescript
|
||||
$ ->
|
||||
new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
.row
|
||||
%section.col-md-9
|
||||
.votes-holder.pull-right
|
||||
#votes= render 'votes/votes_block', votable: @merge_request
|
||||
= render "projects/merge_requests/show/participants"
|
||||
= render "projects/notes/notes_with_form"
|
||||
%aside.col-md-3
|
||||
@@ -17,14 +19,10 @@
|
||||
%hr
|
||||
.context
|
||||
= 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?
|
||||
%hr
|
||||
%h6 Labels
|
||||
.issuable-context-title
|
||||
%label Labels
|
||||
.merge-request-show-labels
|
||||
- @merge_request.labels.each do |label|
|
||||
= link_to namespace_project_merge_requests_path(@project.namespace, @project, label_name: label.name) do
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
.votes.votes-block
|
||||
.progress
|
||||
.progress-bar.progress-bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
|
||||
.progress-bar.progress-bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
|
||||
.upvotes= "#{votable.upvotes} up"
|
||||
.downvotes= "#{votable.downvotes} down"
|
||||
.btn-group
|
||||
- unless votable.upvotes.zero?
|
||||
.btn.btn-sm.disabled.cgreen
|
||||
%i.fa.fa-thumbs-up
|
||||
= votable.upvotes
|
||||
- unless votable.downvotes.zero?
|
||||
.btn.btn-sm.disabled.cred
|
||||
%i.fa.fa-thumbs-down
|
||||
= votable.downvotes
|
||||
|
||||
Reference in New Issue
Block a user