Commit 79a4ed15cefc4f70919a8a0b5059816f823d69d2
1 parent
267b18de
Exists in
master
and in
4 other branches
Change "Get Patch" buttons to dropdowns orffering patches and diffs
Showing
2 changed files
with
16 additions
and
6 deletions
Show diff stats
app/views/commits/_commit_box.html.haml
... | ... | @@ -5,9 +5,14 @@ |
5 | 5 | %span.btn.disabled.grouped |
6 | 6 | %i.icon-comment |
7 | 7 | = @notes_count |
8 | - = link_to project_commit_path(@project, @commit, format: :patch), class: "btn small grouped" do | |
9 | - %i.icon-download-alt | |
10 | - Get Patch | |
8 | + .left.btn-group | |
9 | + %a.btn.small.grouped.dropdown-toggle{ data: {toggle: :dropdown} } | |
10 | + %i.icon-download-alt | |
11 | + Download as | |
12 | + %span.caret | |
13 | + %ul.dropdown-menu | |
14 | + %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch) | |
15 | + %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff) | |
11 | 16 | = link_to project_tree_path(@project, @commit), class: "browse-button primary grouped" do |
12 | 17 | %strong Browse Code » |
13 | 18 | %h3.commit-title.page_title | ... | ... |
app/views/merge_requests/show/_mr_title.html.haml
... | ... | @@ -13,9 +13,14 @@ |
13 | 13 | = "MERGED" |
14 | 14 | - if can?(current_user, :modify_merge_request, @merge_request) |
15 | 15 | - if @merge_request.open? |
16 | - = link_to project_merge_request_path(@project, @merge_request, format: :patch), class: "btn grouped" do | |
17 | - %i.icon-download-alt | |
18 | - Get Patch | |
16 | + .left.btn-group | |
17 | + %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} } | |
18 | + %i.icon-download-alt | |
19 | + Download as | |
20 | + %span.caret | |
21 | + %ul.dropdown-menu | |
22 | + %li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch) | |
23 | + %li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff) | |
19 | 24 | |
20 | 25 | = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {closed: true }, status_only: true), method: :put, class: "btn grouped danger", title: "Close merge request" |
21 | 26 | ... | ... |