From 68eb394824f6d7edd895d8175d16f281af68073a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 6 Jan 2013 00:08:02 +0200 Subject: [PATCH] Green button when we create new item, blue when save or some primary action --- app/views/issues/_form.html.haml | 2 +- app/views/merge_requests/_form.html.haml | 9 ++++++--- app/views/projects/_new_form.html.haml | 2 +- features/steps/project/project_merge_requests.rb | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index 02b11b53..bef235f2 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -44,7 +44,7 @@ .actions - if @issue.new_record? - = f.submit 'Submit new issue', class: "btn save-btn" + = f.submit 'Submit new issue', class: "btn success" -else = f.submit 'Save changes', class: "save-btn btn" diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml index 0aaf6566..9a4f0617 100644 --- a/app/views/merge_requests/_form.html.haml +++ b/app/views/merge_requests/_form.html.haml @@ -11,7 +11,7 @@ .row .span5 .mr_branch_box - %h5 From (Head Branch) + %h5.cgray From (Head Branch) .body .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) .mr_source_commit @@ -20,7 +20,7 @@ %center= image_tag "merge.png", class: 'mr_direction_tip' .span5 .mr_branch_box - %h5 To (Base Branch) + %h5.cgray To (Base Branch) .body .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) .mr_target_commit @@ -50,7 +50,10 @@ .control-group .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? = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do Cancel diff --git a/app/views/projects/_new_form.html.haml b/app/views/projects/_new_form.html.haml index 2ef29cb0..2391c750 100644 --- a/app/views/projects/_new_form.html.haml +++ b/app/views/projects/_new_form.html.haml @@ -7,7 +7,7 @@ Project name is .input = 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? .clearfix diff --git a/features/steps/project/project_merge_requests.rb b/features/steps/project/project_merge_requests.rb index d153ad28..0ec8245a 100644 --- a/features/steps/project/project_merge_requests.rb +++ b/features/steps/project/project_merge_requests.rb @@ -54,7 +54,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps fill_in "merge_request_title", :with => "Wiki Feature" select "master", :from => "merge_request_source_branch" select "stable", :from => "merge_request_target_branch" - click_button "Save" + click_button "Submit merge request" end Then 'I should see merge request "Wiki Feature"' do