Commit 1e106756 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

For form MR render only namespace name

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent db961b8b
...@@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base ...@@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base
end end
end end
def source_project_namespace
if source_project && source_project.namespace
source_project.namespace.path
else
"(removed)"
end
end
def source_branch_exists? def source_branch_exists?
return false unless self.source_project return false unless self.source_project
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
%span.pull-right %span.pull-right
- if merge_request.for_fork? - if merge_request.for_fork?
%span.light %span.light
= "#{merge_request.source_project_path}" #{merge_request.source_project_namespace}:
= "#{merge_request.source_branch}" = merge_request.source_branch
%i.icon-angle-right.light %i.icon-angle-right.light
= "#{merge_request.target_branch}" = merge_request.target_branch
- else - else
= "#{merge_request.source_branch}" = merge_request.source_branch
%i.icon-angle-right.light %i.icon-angle-right.light
= "#{merge_request.target_branch}" = merge_request.target_branch
.merge-request-info .merge-request-info
- if merge_request.author - if merge_request.author
authored by #{link_to_member(merge_request.source_project, 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