For form MR render only namespace name
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
db961b8b46
commit
1e106756fa
2 changed files with 13 additions and 5 deletions
|
@ -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)}
|
||||
|
|
Loading…
Reference in a new issue