Commit d187ffebee8170877df9a99ec995ffd81aac2201

Authored by Dmitriy Zaporozhets
1 parent b62d4f6d

Style accept widgets for MR

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/sections/merge_requests.scss
@@ -4,10 +4,6 @@ @@ -4,10 +4,6 @@
4 * 4 *
5 */ 5 */
6 .automerge_widget { 6 .automerge_widget {
7 - &.can_be_merged {  
8 - background: #DFF0D8;  
9 - }  
10 -  
11 form { 7 form {
12 margin-bottom: 0; 8 margin-bottom: 0;
13 .clearfix { 9 .clearfix {
@@ -16,10 +12,10 @@ @@ -16,10 +12,10 @@
16 } 12 }
17 13
18 .accept-group { 14 .accept-group {
19 - }  
20 -  
21 - .how_to_merge_link {  
22 - @extend .primary; 15 + label {
  16 + margin: 5px;
  17 + margin-left: 20px;
  18 + }
23 } 19 }
24 } 20 }
25 21
@@ -33,11 +29,6 @@ @@ -33,11 +29,6 @@
33 } 29 }
34 } 30 }
35 31
36 -.merge-in-progress {  
37 - @extend .padded;  
38 - @extend .append-bottom-10;  
39 -}  
40 -  
41 .mr_source_commit, 32 .mr_source_commit,
42 .mr_target_commit { 33 .mr_target_commit {
43 .commit { 34 .commit {
app/views/projects/merge_requests/show/_mr_accept.html.haml
1 - unless @allowed_to_merge 1 - unless @allowed_to_merge
2 - .alert 2 + .bs-callout
3 %strong You don't have permission to merge this MR 3 %strong You don't have permission to merge this MR
4 4
5 5
6 - if @show_merge_controls 6 - if @show_merge_controls
7 - .automerge_widget.can_be_merged{style: "display:none"}  
8 - .alert.alert-success  
9 - %span  
10 - = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f|  
11 - %p  
12 - You can accept this request automatically.  
13 - If you still want to do it manually -  
14 - %strong  
15 - = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"  
16 - for instructions  
17 - .accept-group 7 + .automerge_widget.can_be_merged.hide
  8 + .bs-callout.bs-callout-success.clearfix
  9 + = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f|
  10 + %h4
  11 + You can accept this request automatically.
  12 + %p
  13 + If you still want to do it manually -
  14 + %strong
  15 + = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
  16 + for instructions
  17 + .accept-group
  18 + .pull-left
18 = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" 19 = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
19 - - unless @merge_request.disallow_source_branch_removal?  
20 - .remove_branch_holder  
21 - = label_tag :should_remove_source_branch, class: "checkbox" do  
22 - = check_box_tag :should_remove_source_branch  
23 - Remove source-branch  
24 - .clearfix 20 + - unless @merge_request.disallow_source_branch_removal?
  21 + .remove_branch_holder.pull-left
  22 + = label_tag :should_remove_source_branch, class: "checkbox" do
  23 + = check_box_tag :should_remove_source_branch
  24 + Remove source-branch
25 25
26 26
27 - .automerge_widget.no_satellite{style: "display:none"}  
28 - .alert.alert-danger 27 + .automerge_widget.no_satellite.hide
  28 + .bs-callout.bs-callout-danger
29 %span 29 %span
30 %strong This repository does not have satellite. Ask an administrator to fix this issue 30 %strong This repository does not have satellite. Ask an administrator to fix this issue
31 31
32 - .automerge_widget.cannot_be_merged{style: "display:none"}  
33 - .alert.alert-disabled 32 + .automerge_widget.cannot_be_merged.hide
  33 + .bs-callout.bs-callout-disabled
34 %span 34 %span
35 = link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn padded", title: "How To Merge", "data-toggle" => "modal" 35 = link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn padded", title: "How To Merge", "data-toggle" => "modal"
36 &nbsp; 36 &nbsp;
37 %strong This request can't be merged with GitLab. You should do it manually 37 %strong This request can't be merged with GitLab. You should do it manually
38 38
39 .automerge_widget.unchecked 39 .automerge_widget.unchecked
40 - .alert.alert-warning 40 + .bs-callout.bs-callout-warning
41 %strong 41 %strong
42 - %i.icon-refresh 42 + %i.icon-refresh.icon-spin
43 Checking for ability to automatically merge… 43 Checking for ability to automatically merge…
44 44
45 - .automerge_widget.already_cannot_be_merged{style: "display:none"}  
46 - .alert.alert-info 45 + .automerge_widget.already_cannot_be_merged.hide
  46 + .bs-callout.bs-callout-info
47 %strong This merge request already can not be merged. Try to reload page. 47 %strong This merge request already can not be merged. Try to reload page.
48 48
49 .merge-in-progress.hide 49 .merge-in-progress.hide
50 - %span.cgray 50 + .bs-callout.bs-callout-success
51 %i.icon-refresh.icon-spin 51 %i.icon-refresh.icon-spin
52 &nbsp; 52 &nbsp;
53 Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp; 53 Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp;