From 2d68e7f4cd0ce60e340891fd2dfa2e479bb173ec Mon Sep 17 00:00:00 2001 From: randx Date: Tue, 5 Jun 2012 19:45:18 +0300 Subject: [PATCH] MR -> remove source branch -> UI pollished --- app/assets/stylesheets/common.scss | 48 +++++++++++++++++--- app/assets/stylesheets/gitlab_bootstrap.scss | 12 +++++ app/views/merge_requests/show.html.haml | 21 ++++++--- 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index b4f7e1e493c..57d21360f1b 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -714,6 +714,19 @@ p.time { text-align:center; float:left; margin-right:20px; + + &.success { + background: #5BB75B; + color: white; + text-shadow: 0 1px #111; + border-color: #9A9; + } + &.error { + background: #DA4E49; + border-color: #BD362F; + color: white; + text-shadow: 0 1px #111; + } } .arrow{ @@ -864,15 +877,36 @@ li.note { background: #DFF0D8; } - .accept_merge_request { - color: #fff; - text-shadow: 0 1px 1px #222; - background: #5bb75b;; - &:hover { - background-color: #51a351; - color: #fff; + + form { + margin-bottom:0; + .clearfix { + margin-bottom:0; } } + + .accept_group { + float:left; + border: 1px solid #ADA; + padding: 2px; + @include border-radius(5px); + border-radius: 5px; + background: #CEB; + + .accept_merge_request { + float:left; + } + .remove_branch_holder { + margin-left:20px; + margin-right:10px; + float:left; + } + label { + color:#444; + } + } + + .how_to_merge_link { @extend .primary; } diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss index b1594d8bf78..a8a38290765 100644 --- a/app/assets/stylesheets/gitlab_bootstrap.scss +++ b/app/assets/stylesheets/gitlab_bootstrap.scss @@ -127,6 +127,18 @@ table { @extend .btn-primary; } + &.success { + color: #fff; + text-shadow: 0 0 1px #111; + background: #5bb75b;; + font-weight: bold; + + &:hover { + background-color: #51a351; + color: #fff; + } + } + &.danger, &.btn-danger { color:#fff; diff --git a/app/views/merge_requests/show.html.haml b/app/views/merge_requests/show.html.haml index cfa74fc0a49..7707b79bb64 100644 --- a/app/views/merge_requests/show.html.haml +++ b/app/views/merge_requests/show.html.haml @@ -8,7 +8,7 @@ %span.right - if can?(current_user, :modify_merge_request, @merge_request) - if @merge_request.open? - = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn small padded", :title => "Close merge request" + = link_to 'Close', project_merge_request_path(@project, @merge_request, :merge_request => {:closed => true }, :status_only => true), :method => :put, :class => "btn small padded danger", :title => "Close merge request" = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn small padded" do %i.icon-edit Edit @@ -63,13 +63,20 @@ .alert.alert-success %span = form_for [:automerge, @project, @merge_request], :remote => true, :method => :get do |f| - You can accept this request automatically. If you still want to do it manually - #{link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge"} for instructions - %br - -unless @project.root_ref? @merge_request.source_branch - = check_box_tag :should_remove_source_branch - = label_tag :should_remove_source_branch, "Remove source-branch" + %p + You can accept this request automatically. + If you still want to do it manually - + %strong= link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge" + for instructions + .accept_group + = f.submit "Accept Merge Request", :class => "btn small success accept_merge_request" + - unless @project.root_ref? @merge_request.source_branch + .remove_branch_holder + = label_tag :should_remove_source_branch, :class => "checkbox" do + = check_box_tag :should_remove_source_branch + Remove source-branch + .clearfix - = f.submit "Accept Merge Request", :class => "btn small info accept_merge_request" .automerge_widget.cannot_be_merged{:style => "display:none"} .alert.alert-info