Commit 68eb394824f6d7edd895d8175d16f281af68073a
1 parent
baf591cc
Exists in
master
and in
4 other branches
Green button when we create new item, blue when save or some primary action
Showing
4 changed files
with
9 additions
and
6 deletions
Show diff stats
app/views/issues/_form.html.haml
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | 44 | ||
| 45 | .actions | 45 | .actions |
| 46 | - if @issue.new_record? | 46 | - if @issue.new_record? |
| 47 | - = f.submit 'Submit new issue', class: "btn save-btn" | 47 | + = f.submit 'Submit new issue', class: "btn success" |
| 48 | -else | 48 | -else |
| 49 | = f.submit 'Save changes', class: "save-btn btn" | 49 | = f.submit 'Save changes', class: "save-btn btn" |
| 50 | 50 |
app/views/merge_requests/_form.html.haml
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | .row | 11 | .row |
| 12 | .span5 | 12 | .span5 |
| 13 | .mr_branch_box | 13 | .mr_branch_box |
| 14 | - %h5 From (Head Branch) | 14 | + %h5.cgray From (Head Branch) |
| 15 | .body | 15 | .body |
| 16 | .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) | 16 | .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) |
| 17 | .mr_source_commit | 17 | .mr_source_commit |
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | %center= image_tag "merge.png", class: 'mr_direction_tip' | 20 | %center= image_tag "merge.png", class: 'mr_direction_tip' |
| 21 | .span5 | 21 | .span5 |
| 22 | .mr_branch_box | 22 | .mr_branch_box |
| 23 | - %h5 To (Base Branch) | 23 | + %h5.cgray To (Base Branch) |
| 24 | .body | 24 | .body |
| 25 | .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) | 25 | .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) |
| 26 | .mr_target_commit | 26 | .mr_target_commit |
| @@ -50,7 +50,10 @@ | @@ -50,7 +50,10 @@ | ||
| 50 | .control-group | 50 | .control-group |
| 51 | 51 | ||
| 52 | .form-actions | 52 | .form-actions |
| 53 | - = f.submit 'Save', class: "btn save-btn" | 53 | + - if @merge_request.new_record? |
| 54 | + = f.submit 'Submit merge request', class: "btn success" | ||
| 55 | + -else | ||
| 56 | + = f.submit 'Save changes', class: "save-btn btn" | ||
| 54 | - if @merge_request.new_record? | 57 | - if @merge_request.new_record? |
| 55 | = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do | 58 | = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do |
| 56 | Cancel | 59 | Cancel |
app/views/projects/_new_form.html.haml
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | Project name is | 7 | Project name is |
| 8 | .input | 8 | .input |
| 9 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" | 9 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" |
| 10 | - = f.submit 'Create project', class: "btn primary project-submit" | 10 | + = f.submit 'Create project', class: "btn success project-submit" |
| 11 | 11 | ||
| 12 | - if current_user.several_namespaces? | 12 | - if current_user.several_namespaces? |
| 13 | .clearfix | 13 | .clearfix |
features/steps/project/project_merge_requests.rb
| @@ -54,7 +54,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps | @@ -54,7 +54,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps | ||
| 54 | fill_in "merge_request_title", :with => "Wiki Feature" | 54 | fill_in "merge_request_title", :with => "Wiki Feature" |
| 55 | select "master", :from => "merge_request_source_branch" | 55 | select "master", :from => "merge_request_source_branch" |
| 56 | select "stable", :from => "merge_request_target_branch" | 56 | select "stable", :from => "merge_request_target_branch" |
| 57 | - click_button "Save" | 57 | + click_button "Submit merge request" |
| 58 | end | 58 | end |
| 59 | 59 | ||
| 60 | Then 'I should see merge request "Wiki Feature"' do | 60 | Then 'I should see merge request "Wiki Feature"' do |