For form MR render only namespace name

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-02-15 14:36:58 +02:00
parent db961b8b46
commit 1e106756fa
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
2 changed files with 13 additions and 5 deletions

View file

@ -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

View file

@ -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)}