diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-20 12:45:45 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-20 12:50:45 -0700 |
commit | 085e5084a8bd5034b94bc7f4e0dc8302cd71c323 (patch) | |
tree | 4e0fe923b6afff3f466bc8a3cbd436e13bc7bc01 | |
parent | 1f711fd93d9e8f9955d59946469df2b6c7aa9c42 (diff) | |
download | gitlab-ce-085e5084a8bd5034b94bc7f4e0dc8302cd71c323.tar.gz |
Make issue and merge request sidebar more compactupvotes-refactoring
* move votes block to participants
* make smaller font in sidebar
-rw-r--r-- | app/assets/stylesheets/pages/issuable.scss | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/votes.scss | 35 | ||||
-rw-r--r-- | app/views/projects/issues/_discussion.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/issues/_issue_context.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_discussion.html.haml | 10 | ||||
-rw-r--r-- | app/views/votes/_votes_block.html.haml | 14 |
6 files changed, 26 insertions, 57 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index d8d12338859..a640a4e2051 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -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; } +} diff --git a/app/assets/stylesheets/pages/votes.scss b/app/assets/stylesheets/pages/votes.scss index ba0a519dca6..dc9a7d71e8b 100644 --- a/app/assets/stylesheets/pages/votes.scss +++ b/app/assets/stylesheets/pages/votes.scss @@ -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; } - diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index fc3e35640dc..0d3028d50b4 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -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 diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml index d43ce0aa293..91fe0b68371 100644 --- a/app/views/projects/issues/_issue_context.html.haml +++ b/app/views/projects/issues/_issue_context.html.haml @@ -45,5 +45,5 @@ :coffeescript $ -> new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}") - -
\ No newline at end of file + + diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml index 79a093dc775..eb72eaabd8b 100644 --- a/app/views/projects/merge_requests/_discussion.html.haml +++ b/app/views/projects/merge_requests/_discussion.html.haml @@ -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 diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml index 788d9065a7b..36ea6742064 100644 --- a/app/views/votes/_votes_block.html.haml +++ b/app/views/votes/_votes_block.html.haml @@ -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 |