Commit 68eb3948 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Green button when we create new item, blue when save or some primary action

parent baf591cc
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
.actions .actions
- if @issue.new_record? - if @issue.new_record?
= f.submit 'Submit new issue', class: "btn save-btn" = f.submit 'Submit new issue', class: "btn success"
-else -else
= f.submit 'Save changes', class: "save-btn btn" = f.submit 'Save changes', class: "save-btn btn"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.row .row
.span5 .span5
.mr_branch_box .mr_branch_box
%h5 From (Head Branch) %h5.cgray From (Head Branch)
.body .body
.padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_source_commit .mr_source_commit
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
%center= image_tag "merge.png", class: 'mr_direction_tip' %center= image_tag "merge.png", class: 'mr_direction_tip'
.span5 .span5
.mr_branch_box .mr_branch_box
%h5 To (Base Branch) %h5.cgray To (Base Branch)
.body .body
.padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_target_commit .mr_target_commit
...@@ -50,7 +50,10 @@ ...@@ -50,7 +50,10 @@
.control-group .control-group
.form-actions .form-actions
= f.submit 'Save', class: "btn save-btn" - if @merge_request.new_record?
= f.submit 'Submit merge request', class: "btn success"
-else
= f.submit 'Save changes', class: "save-btn btn"
- if @merge_request.new_record? - if @merge_request.new_record?
= link_to project_merge_requests_path(@project), class: "btn cancel-btn" do = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do
Cancel Cancel
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Project name is Project name is
.input .input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge" = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
= f.submit 'Create project', class: "btn primary project-submit" = f.submit 'Create project', class: "btn success project-submit"
- if current_user.several_namespaces? - if current_user.several_namespaces?
.clearfix .clearfix
......
...@@ -54,7 +54,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps ...@@ -54,7 +54,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
fill_in "merge_request_title", :with => "Wiki Feature" fill_in "merge_request_title", :with => "Wiki Feature"
select "master", :from => "merge_request_source_branch" select "master", :from => "merge_request_source_branch"
select "stable", :from => "merge_request_target_branch" select "stable", :from => "merge_request_target_branch"
click_button "Save" click_button "Submit merge request"
end end
Then 'I should see merge request "Wiki Feature"' do Then 'I should see merge request "Wiki Feature"' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment