Commit f92b1f3d018bf51e9372b88dd50a2be8149b2fa6

Authored by Dmitriy Zaporozhets
1 parent 499a1185

Use more specific class names: grouped -> btn-grouped

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/generic/buttons.scss
@@ -158,6 +158,14 @@ @@ -158,6 +158,14 @@
158 color: #468847; 158 color: #468847;
159 } 159 }
160 } 160 }
  161 +
  162 + &.btn-grouped {
  163 + margin-right: 7px;
  164 + float: left;
  165 + &:last-child {
  166 + margin-right: 0px;
  167 + }
  168 + }
161 } 169 }
162 170
163 .btn-block { 171 .btn-block {
@@ -169,16 +177,5 @@ @@ -169,16 +177,5 @@
169 } 177 }
170 } 178 }
171 179
172 -.btn,  
173 -.btn-group {  
174 - &.grouped {  
175 - margin-right: 7px;  
176 - float: left;  
177 - &:last-child {  
178 - margin-right: 0px;  
179 - }  
180 - }  
181 -}  
182 -  
183 .btn-group-small > .btn { @extend .btn.btn-small; } 180 .btn-group-small > .btn { @extend .btn.btn-small; }
184 .btn-group-tiny > .btn { @extend .btn.btn-tiny; } 181 .btn-group-tiny > .btn { @extend .btn.btn-tiny; }
app/views/admin/users/show.html.haml
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 %span.cred (Admin) 7 %span.cred (Admin)
8 8
9 .pull-right 9 .pull-right
10 - = link_to edit_admin_user_path(@user), class: "btn grouped" do 10 + = link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
11 %i.icon-edit 11 %i.icon-edit
12 Edit 12 Edit
13 %hr 13 %hr
app/views/profiles/groups/index.html.haml
@@ -18,12 +18,12 @@ @@ -18,12 +18,12 @@
18 %li 18 %li
19 .pull-right 19 .pull-right
20 - if can?(current_user, :manage_group, group) 20 - if can?(current_user, :manage_group, group)
21 - = link_to edit_group_path(group), class: "btn-small btn grouped" do 21 + = link_to edit_group_path(group), class: "btn-small btn btn-grouped" do
22 %i.icon-cogs 22 %i.icon-cogs
23 Settings 23 Settings
24 24
25 - if can?(current_user, :destroy, user_group) 25 - if can?(current_user, :destroy, user_group)
26 - = link_to leave_profile_group_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do 26 + = link_to leave_profile_group_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-small btn btn-grouped", title: 'Remove user from group' do
27 %i.icon-signout 27 %i.icon-signout
28 Leave 28 Leave
29 29
app/views/projects/branches/_branch.html.haml
@@ -12,12 +12,12 @@ @@ -12,12 +12,12 @@
12 - if can?(current_user, :download_code, @project) 12 - if can?(current_user, :download_code, @project)
13 = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'grouped btn-group-small' 13 = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'grouped btn-group-small'
14 - if branch.name != @repository.root_ref 14 - if branch.name != @repository.root_ref
15 - = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), class: 'btn grouped btn-small', method: :post, title: "Compare" do 15 + = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-small', method: :post, title: "Compare" do
16 %i.icon-copy 16 %i.icon-copy
17 Compare 17 Compare
18 18
19 - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref 19 - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref
20 - = link_to project_branch_path(@project, branch.name), class: 'btn grouped btn-small remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do 20 + = link_to project_branch_path(@project, branch.name), class: 'btn btn-grouped btn-small remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do
21 %i.icon-trash 21 %i.icon-trash
22 22
23 - if commit 23 - if commit
app/views/projects/commit/_commit_box.html.haml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 %ul.dropdown-menu 12 %ul.dropdown-menu
13 %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch) 13 %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
14 %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff) 14 %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff)
15 - = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do 15 + = link_to project_tree_path(@project, @commit), class: "btn btn-primary btn-grouped" do
16 %span Browse Code » 16 %span Browse Code »
17 %div 17 %div
18 18
app/views/projects/hooks/index.html.haml
@@ -51,8 +51,8 @@ @@ -51,8 +51,8 @@
51 - @hooks.each do |hook| 51 - @hooks.each do |hook|
52 %li 52 %li
53 .pull-right 53 .pull-right
54 - = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"  
55 - = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped" 54 + = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small btn-grouped"
  55 + = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small btn-grouped"
56 .clearfix 56 .clearfix
57 %span.monospace= hook.url 57 %span.monospace= hook.url
58 %p 58 %p
app/views/projects/issues/_issue.html.haml
@@ -38,10 +38,10 @@ @@ -38,10 +38,10 @@
38 .issue-actions 38 .issue-actions
39 - if can? current_user, :modify_issue, issue 39 - if can? current_user, :modify_issue, issue
40 - if issue.closed? 40 - if issue.closed?
41 - = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true 41 + = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small btn-grouped reopen_issue", remote: true
42 - else 42 - else
43 - = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true  
44 - = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do 43 + = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small btn-grouped close_issue", remote: true
  44 + = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link btn-grouped" do
45 %i.icon-edit 45 %i.icon-edit
46 Edit 46 Edit
47 47
app/views/projects/issues/show.html.haml
@@ -3,16 +3,16 @@ @@ -3,16 +3,16 @@
3 3
4 %span.pull-right 4 %span.pull-right
5 - if can?(current_user, :write_issue, @project) 5 - if can?(current_user, :write_issue, @project)
6 - = link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do 6 + = link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do
7 %i.icon-plus 7 %i.icon-plus
8 New Issue 8 New Issue
9 - if can?(current_user, :modify_issue, @issue) 9 - if can?(current_user, :modify_issue, @issue)
10 - if @issue.closed? 10 - if @issue.closed?
11 - = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped btn-reopen" 11 + = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen"
12 - else 12 - else
13 - = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped btn-close", title: "Close Issue" 13 + = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue"
14 14
15 - = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do 15 + = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped" do
16 %i.icon-edit 16 %i.icon-edit
17 Edit 17 Edit
18 18
@@ -55,9 +55,9 @@ @@ -55,9 +55,9 @@
55 - content_for :note_actions do 55 - content_for :note_actions do
56 - if can?(current_user, :modify_issue, @issue) 56 - if can?(current_user, :modify_issue, @issue)
57 - if @issue.closed? 57 - if @issue.closed?
58 - = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped btn-reopen" 58 + = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen"
59 - else 59 - else
60 - = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped btn-close", title: "Close Issue" 60 + = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue"
61 61
62 .participants 62 .participants
63 %cite.cgray #{@issue.participants.count} participants 63 %cite.cgray #{@issue.participants.count} participants
app/views/projects/merge_requests/_show.html.haml
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 - content_for :note_actions do 25 - content_for :note_actions do
26 - if can?(current_user, :modify_merge_request, @merge_request) 26 - if can?(current_user, :modify_merge_request, @merge_request)
27 - unless @merge_request.closed? 27 - unless @merge_request.closed?
28 - = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn grouped btn-close", title: "Close merge request" 28 + = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request"
29 29
30 30
31 .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } 31 .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
app/views/projects/merge_requests/show/_mr_title.html.haml
@@ -13,9 +13,9 @@ @@ -13,9 +13,9 @@
13 %li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch) 13 %li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
14 %li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff) 14 %li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
15 15
16 - = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn grouped btn-close", title: "Close merge request" 16 + = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request"
17 17
18 - = link_to edit_project_merge_request_path(@project, @merge_request), class: "btn grouped", id:"edit_merge_request" do 18 + = link_to edit_project_merge_request_path(@project, @merge_request), class: "btn btn-grouped", id:"edit_merge_request" do
19 %i.icon-edit 19 %i.icon-edit
20 Edit 20 Edit
21 21
app/views/projects/milestones/_milestone.html.haml
1 %li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone) } 1 %li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone) }
2 .pull-right 2 .pull-right
3 - if can?(current_user, :admin_milestone, milestone.project) and milestone.active? 3 - if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
4 - = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do 4 + = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link btn-grouped" do
5 %i.icon-edit 5 %i.icon-edit
6 Edit 6 Edit
7 = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove" 7 = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove"
app/views/projects/milestones/show.html.haml
@@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
11 %span.state-label.state-label-green Open 11 %span.state-label.state-label-green Open
12 .pull-right 12 .pull-right
13 - if can?(current_user, :admin_milestone, @project) 13 - if can?(current_user, :admin_milestone, @project)
14 - = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do 14 + = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped" do
15 %i.icon-edit 15 %i.icon-edit
16 Edit 16 Edit
17 - if @milestone.active? 17 - if @milestone.active?
18 = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove grouped" 18 = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove grouped"
19 - else 19 - else
20 - = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn grouped" 20 + = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-grouped"
21 21
22 - if @milestone.issues.any? && @milestone.can_be_closed? 22 - if @milestone.issues.any? && @milestone.can_be_closed?
23 .alert.alert-success 23 .alert.alert-success
@@ -63,10 +63,10 @@ @@ -63,10 +63,10 @@
63 %span.badge= @users.count 63 %span.badge= @users.count
64 64
65 .pull-right 65 .pull-right
66 - = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do 66 + = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small btn-grouped", title: "New Issue" do
67 %i.icon-plus 67 %i.icon-plus
68 New Issue 68 New Issue
69 - = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link grouped" 69 + = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link btn-grouped"
70 70
71 .tab-content 71 .tab-content
72 .tab-pane.active#tab-issues 72 .tab-pane.active#tab-issues
app/views/projects/notes/_form.html.haml
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 22
23 .note-form-actions 23 .note-form-actions
24 .buttons 24 .buttons
25 - = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button" 25 + = f.submit 'Add Comment', class: "btn comment-btn btn-grouped js-comment-button"
26 = yield(:note_actions) 26 = yield(:note_actions)
27 27
28 %a.btn.grouped.js-close-discussion-note-form Cancel 28 %a.btn.grouped.js-close-discussion-note-form Cancel
app/views/projects/team_members/index.html.haml
@@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
3 3
4 - if can? current_user, :admin_team_member, @project 4 - if can? current_user, :admin_team_member, @project
5 %span.pull-right 5 %span.pull-right
6 - = link_to new_project_team_member_path(@project), class: "btn btn-new grouped", title: "New project member" do 6 + = link_to new_project_team_member_path(@project), class: "btn btn-new btn-grouped", title: "New project member" do
7 New project member 7 New project member
8 - = link_to import_project_team_members_path(@project), class: "btn grouped", title: "Import members from another project" do 8 + = link_to import_project_team_members_path(@project), class: "btn btn-grouped", title: "Import members from another project" do
9 Import members 9 Import members
10 10
11 %p.light 11 %p.light
app/views/projects/walls/show.html.haml
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on' 9 = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on'
10 .note-form-actions 10 .note-form-actions
11 .buttons 11 .buttons
12 - = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button" 12 + = f.submit 'Add Comment', class: "btn comment-btn btn-grouped js-comment-button"
13 13
14 .note-form-option 14 .note-form-option
15 %a.choose-btn.btn.btn-small.js-choose-note-attachment-button 15 %a.choose-btn.btn.btn-small.js-choose-note-attachment-button
app/views/projects/wikis/_main_links.html.haml
1 %span.pull-right 1 %span.pull-right
2 - if (@wiki && @wiki.persisted?) 2 - if (@wiki && @wiki.persisted?)
3 - = link_to history_project_wiki_path(@project, @wiki), class: "btn grouped" do 3 + = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-grouped" do
4 Page History 4 Page History
5 - if can?(current_user, :write_wiki, @project) 5 - if can?(current_user, :write_wiki, @project)
6 - = link_to edit_project_wiki_path(@project, @wiki), class: "btn grouped" do 6 + = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-grouped" do
7 %i.icon-edit 7 %i.icon-edit
8 Edit 8 Edit
app/views/snippets/current_user_index.html.haml
1 %h3.page-title 1 %h3.page-title
2 My Snippets 2 My Snippets
3 .pull-right 3 .pull-right
4 - = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do 4 + = link_to new_snippet_path, class: "btn btn-new btn-grouped", title: "New Snippet" do
5 Add new snippet 5 Add new snippet
6 - = link_to snippets_path, class: "btn grouped" do 6 + = link_to snippets_path, class: "btn btn-grouped" do
7 Discover snippets 7 Discover snippets
8 8
9 %p.light 9 %p.light
app/views/snippets/index.html.haml
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 Public snippets 2 Public snippets
3 3
4 .pull-right 4 .pull-right
5 - = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do 5 + = link_to new_snippet_path, class: "btn btn-new btn-grouped", title: "New Snippet" do
6 Add new snippet 6 Add new snippet
7 - = link_to user_snippets_path(current_user), class: "btn grouped" do 7 + = link_to user_snippets_path(current_user), class: "btn btn-grouped" do
8 My snippets 8 My snippets
9 9
10 %p.light 10 %p.light