Fix branch rendering
This commit is contained in:
parent
05c9d88216
commit
74a81cbfe3
2 changed files with 6 additions and 3 deletions
|
@ -56,12 +56,14 @@ module MergeRequestsHelper
|
|||
end
|
||||
|
||||
def source_branch_with_namespace(merge_request)
|
||||
branch = link_to(merge_request.source_branch, namespace_project_commits_path(merge_request.source_project.namespace, merge_request.source_project, merge_request.source_branch))
|
||||
|
||||
if merge_request.for_fork?
|
||||
namespace = link_to(merge_request.source_project_namespace,
|
||||
project_path(merge_request.source_project))
|
||||
namespace + ":#{merge_request.source_branch}"
|
||||
namespace + ":" + branch
|
||||
else
|
||||
merge_request.source_branch
|
||||
branch
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
|
||||
.normal
|
||||
%span Request to merge
|
||||
= link_to source_branch_with_namespace(@merge_request), namespace_project_commits_path(@merge_request.source_project.namespace, @merge_request.source_project, @merge_request.source_branch), class: "label-branch"
|
||||
%span.label-branch
|
||||
= source_branch_with_namespace(@merge_request)
|
||||
%span into
|
||||
= link_to namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch" do
|
||||
= @merge_request.target_branch
|
||||
|
|
Loading…
Reference in a new issue