summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-30 18:47:29 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-30 18:47:29 +0000
commitac1584249c262e447a6360734597fa17fe077718 (patch)
tree934216199742907fdeb975041fd24e63fe27ef3b
parentc9572857279a1bfff585932ce506f19960b8c7fd (diff)
parent884352294deab0c11845547ce2ab96b60f468458 (diff)
downloadgitlab-ce-ac1584249c262e447a6360734597fa17fe077718.tar.gz
Merge branch 'improve-merge-widget' into 'master'
Improve merge widget * remove title `You can merge it` since button below says same * fixed layout for custom commit message * make button a bit bigger See merge request !1365
-rw-r--r--app/assets/stylesheets/sections/merge_requests.scss23
-rw-r--r--app/views/projects/merge_requests/show/_mr_accept.html.haml35
-rw-r--r--features/steps/project/merge_requests.rb2
3 files changed, 37 insertions, 23 deletions
diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss
index 1f8ea85eb65..8445b77c1a8 100644
--- a/app/assets/stylesheets/sections/merge_requests.scss
+++ b/app/assets/stylesheets/sections/merge_requests.scss
@@ -11,10 +11,27 @@
}
}
- .accept-group {
- label {
- margin: 5px;
+ .accept-merge-holder {
+ margin-top: 5px;
+
+ .accept-action {
+ display: inline-block;
+
+ .accept_merge_request {
+ padding: 10px 20px;
+ }
+ }
+
+ .accept-control {
+ display: inline-block;
margin-left: 20px;
+ padding: 10px 0;
+ line-height: 20px;
+ font-weight: bold;
+
+ .checkbox {
+ margin: 0;
+ }
}
}
}
diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml
index 4939ae03994..dd5f29e5389 100644
--- a/app/views/projects/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -13,25 +13,22 @@
.automerge_widget.can_be_merged.hide
.clearfix
= form_for [:automerge, @project, @merge_request], remote: true, method: :post do |f|
- %h4
- You can accept this request automatically.
- .accept-merge-holder.clearfix
- .accept-group
- .pull-left
- = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
- - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
- .remove_branch_holder.pull-left
- = label_tag :should_remove_source_branch, class: "checkbox" do
- = check_box_tag :should_remove_source_branch
- Remove source-branch
- .js-toggle-container
- %label
- %i.fa.fa-edit
- = link_to "modify merge commit message", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message"
- .js-toggle-content.hide
- = render 'shared/commit_message_container', params: params,
- text: @merge_request.merge_commit_message,
- rows: 14, hint: true
+ .accept-merge-holder.clearfix.js-toggle-container
+ .accept-action
+ = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
+ - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
+ .accept-control
+ = label_tag :should_remove_source_branch, class: "checkbox" do
+ = check_box_tag :should_remove_source_branch
+ Remove source-branch
+ .accept-control
+ = link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
+ %i.fa.fa-edit
+ Modify commit message
+ .js-toggle-content.hide.prepend-top-20
+ = render 'shared/commit_message_container', params: params,
+ text: @merge_request.merge_commit_message,
+ rows: 14, hint: true
%hr
.light
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 9d23f5da5de..84f1ebc003b 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -156,7 +156,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'merge request is mergeable' do
- page.should have_content 'You can accept this request automatically'
+ page.should have_button 'Accept Merge Request'
end
step 'I modify merge commit message' do