diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-18 15:51:51 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-18 15:51:51 +0000 |
commit | 4eba8036ac48f3cd08d3760213f7c3e4482f81e2 (patch) | |
tree | 3c4942bacc406fbae31cbd15b73bf889659b80b8 /app/views | |
parent | 555c25e601fb32f23e652ee301c02f4d5ee8e59f (diff) | |
parent | ee993dfc645bbe98431d3181e0d544d50b13c4de (diff) | |
download | gitlab-ce-4eba8036ac48f3cd08d3760213f7c3e4482f81e2.tar.gz |
Merge branch 'request/branch_compare' into 'master'
Fix for compare button within branches dialog
For the button Compare within the Branches screen ( https://gitlab.com/gitlab-org/gitlab-ce/branches ) beside a branch "foo"
Old behavior:
Will redirect to the compare page that is defaulted to comparison for branch "foo" <--> "foo"
New behavior:
Will redirect and trigger compare page of branch "default" <--> "foo"
Remove of button beside default branch
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 40b6fc5d72e..902dfcea314 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -11,9 +11,10 @@ .pull-right - if can?(current_user, :download_code, @project) = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'grouped btn-group-small' - = link_to project_compare_index_path(@project, from: branch.name, to: branch.name), class: 'btn grouped btn-small', title: "Compare" do - %i.icon-copy - Compare + - if branch.name != @repository.root_ref + = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), class: 'btn grouped btn-small', method: :post, title: "Compare" do + %i.icon-copy + Compare - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref = 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 |