Commit 1af2aeffc8e7a0319026fe7b6a218ffc0c69d872
1 parent
a769662f
Exists in
master
and in
4 other branches
Minor usability improvements
Showing
7 changed files
with
14 additions
and
13 deletions
Show diff stats
app/views/admin/groups/edit.html.haml
@@ -27,5 +27,5 @@ | @@ -27,5 +27,5 @@ | ||
27 | %li It will change the git path to repositories under this group. | 27 | %li It will change the git path to repositories under this group. |
28 | 28 | ||
29 | .form-actions | 29 | .form-actions |
30 | - = f.submit 'Edit group', class: "btn btn-remove" | 30 | + = f.submit 'Save changes', class: "btn btn-primary" |
31 | = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" | 31 | = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" |
app/views/admin/groups/new.html.haml
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | 15 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 |
16 | 16 | ||
17 | .form-actions | 17 | .form-actions |
18 | - = f.submit 'Create group', class: "btn btn-primary" | 18 | + = f.submit 'Create group', class: "btn btn-create" |
19 | 19 | ||
20 | %hr | 20 | %hr |
21 | .padded | 21 | .padded |
app/views/admin/groups/show.html.haml
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} | 94 | %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} |
95 | 95 | ||
96 | %tr | 96 | %tr |
97 | - %td= submit_tag 'Add user to projects in group', class: "btn btn-primary" | 97 | + %td= submit_tag 'Add user to projects in group', class: "btn btn-create" |
98 | %td | 98 | %td |
99 | Read more about project permissions | 99 | Read more about project permissions |
100 | %strong= link_to "here", help_permissions_path, class: "vlink" | 100 | %strong= link_to "here", help_permissions_path, class: "vlink" |
@@ -116,7 +116,7 @@ | @@ -116,7 +116,7 @@ | ||
116 | .input | 116 | .input |
117 | = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' | 117 | = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' |
118 | .form-actions | 118 | .form-actions |
119 | - = submit_tag 'Add', class: "btn btn-primary" | 119 | + = submit_tag 'Move projects', class: "btn btn-create" |
120 | 120 | ||
121 | :javascript | 121 | :javascript |
122 | $(function(){ | 122 | $(function(){ |
app/views/admin/hooks/index.html.haml
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | .input | 15 | .input |
16 | = f.text_field :url, class: "text_field xxlarge" | 16 | = f.text_field :url, class: "text_field xxlarge" |
17 | | 17 | |
18 | - = f.submit "Add System Hook", class: "btn btn-primary" | 18 | + = f.submit "Add System Hook", class: "btn btn-create" |
19 | %hr | 19 | %hr |
20 | 20 | ||
21 | -if @hooks.any? | 21 | -if @hooks.any? |
app/views/admin/teams/new.html.haml
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | 16 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 |
17 | 17 | ||
18 | .form-actions | 18 | .form-actions |
19 | - = f.submit 'Create team', class: "btn btn-primary" | 19 | + = f.submit 'Create team', class: "btn btn-create" |
20 | 20 | ||
21 | %hr | 21 | %hr |
22 | .padded | 22 | .padded |
app/views/admin/users/_form.html.haml
@@ -80,8 +80,9 @@ | @@ -80,8 +80,9 @@ | ||
80 | .input= f.text_field :twitter | 80 | .input= f.text_field :twitter |
81 | 81 | ||
82 | .actions | 82 | .actions |
83 | - = f.submit 'Save', class: "btn btn-save" | ||
84 | - if @admin_user.new_record? | 83 | - if @admin_user.new_record? |
84 | + = f.submit 'Create user', class: "btn btn-create" | ||
85 | = link_to 'Cancel', admin_users_path, class: "btn btn-cancel" | 85 | = link_to 'Cancel', admin_users_path, class: "btn btn-cancel" |
86 | - else | 86 | - else |
87 | + = f.submit 'Save changes', class: "btn btn-save" | ||
87 | = link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel" | 88 | = link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel" |
spec/features/admin/admin_users_spec.rb
@@ -30,11 +30,11 @@ describe "Admin::Users" do | @@ -30,11 +30,11 @@ describe "Admin::Users" do | ||
30 | end | 30 | end |
31 | 31 | ||
32 | it "should create new user" do | 32 | it "should create new user" do |
33 | - expect { click_button "Save" }.to change {User.count}.by(1) | 33 | + expect { click_button "Create user" }.to change {User.count}.by(1) |
34 | end | 34 | end |
35 | 35 | ||
36 | it "should create user with valid data" do | 36 | it "should create user with valid data" do |
37 | - click_button "Save" | 37 | + click_button "Create user" |
38 | user = User.last | 38 | user = User.last |
39 | user.name.should == "Big Bang" | 39 | user.name.should == "Big Bang" |
40 | user.email.should == "bigbang@mail.com" | 40 | user.email.should == "bigbang@mail.com" |
@@ -44,14 +44,14 @@ describe "Admin::Users" do | @@ -44,14 +44,14 @@ describe "Admin::Users" do | ||
44 | Notify.should_receive(:new_user_email) | 44 | Notify.should_receive(:new_user_email) |
45 | 45 | ||
46 | User.observers.enable :user_observer do | 46 | User.observers.enable :user_observer do |
47 | - click_button "Save" | 47 | + click_button "Create user" |
48 | end | 48 | end |
49 | end | 49 | end |
50 | 50 | ||
51 | it "should send valid email to user with email & password" do | 51 | it "should send valid email to user with email & password" do |
52 | Gitlab.config.gitlab.stub(:signup_enabled).and_return(false) | 52 | Gitlab.config.gitlab.stub(:signup_enabled).and_return(false) |
53 | User.observers.enable :user_observer do | 53 | User.observers.enable :user_observer do |
54 | - click_button "Save" | 54 | + click_button "Create user" |
55 | user = User.last | 55 | user = User.last |
56 | email = ActionMailer::Base.deliveries.last | 56 | email = ActionMailer::Base.deliveries.last |
57 | email.subject.should have_content("Account was created") | 57 | email.subject.should have_content("Account was created") |
@@ -63,7 +63,7 @@ describe "Admin::Users" do | @@ -63,7 +63,7 @@ describe "Admin::Users" do | ||
63 | it "should send valid email to user with email without password when signup is enabled" do | 63 | it "should send valid email to user with email without password when signup is enabled" do |
64 | Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) | 64 | Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) |
65 | User.observers.enable :user_observer do | 65 | User.observers.enable :user_observer do |
66 | - click_button "Save" | 66 | + click_button "Create user" |
67 | user = User.last | 67 | user = User.last |
68 | email = ActionMailer::Base.deliveries.last | 68 | email = ActionMailer::Base.deliveries.last |
69 | email.subject.should have_content("Account was created") | 69 | email.subject.should have_content("Account was created") |
@@ -102,7 +102,7 @@ describe "Admin::Users" do | @@ -102,7 +102,7 @@ describe "Admin::Users" do | ||
102 | fill_in "user_name", with: "Big Bang" | 102 | fill_in "user_name", with: "Big Bang" |
103 | fill_in "user_email", with: "bigbang@mail.com" | 103 | fill_in "user_email", with: "bigbang@mail.com" |
104 | check "user_admin" | 104 | check "user_admin" |
105 | - click_button "Save" | 105 | + click_button "Save changes" |
106 | end | 106 | end |
107 | 107 | ||
108 | it "should show page with new data" do | 108 | it "should show page with new data" do |