提交 4eba8036 编写于 作者: D Dmitriy Zaporozhets

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
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册