For form MR render only namespace name

Signed-off-by: 's avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent db961b8b
......@@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base
end
end
def source_project_namespace
if source_project && source_project.namespace
source_project.namespace.path
else
"(removed)"
end
end
def source_branch_exists?
return false unless self.source_project
......
......@@ -10,14 +10,14 @@
%span.pull-right
- if merge_request.for_fork?
%span.light
= "#{merge_request.source_project_path}"
= "#{merge_request.source_branch}"
#{merge_request.source_project_namespace}:
= merge_request.source_branch
%i.icon-angle-right.light
= "#{merge_request.target_branch}"
= merge_request.target_branch
- else
= "#{merge_request.source_branch}"
= merge_request.source_branch
%i.icon-angle-right.light
= "#{merge_request.target_branch}"
= merge_request.target_branch
.merge-request-info
- if merge_request.author
authored by #{link_to_member(merge_request.source_project, merge_request.author)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment