Commit 1e106756fa12d91e233adee740e338e3846939ac

Authored by Dmitriy Zaporozhets
1 parent db961b8b

For form MR render only namespace name

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/models/merge_request.rb
... ... @@ -219,6 +219,14 @@ class MergeRequest &lt; ActiveRecord::Base
219 219 end
220 220 end
221 221  
  222 + def source_project_namespace
  223 + if source_project && source_project.namespace
  224 + source_project.namespace.path
  225 + else
  226 + "(removed)"
  227 + end
  228 + end
  229 +
222 230 def source_branch_exists?
223 231 return false unless self.source_project
224 232  
... ...
app/views/projects/merge_requests/_merge_request.html.haml
... ... @@ -10,14 +10,14 @@
10 10 %span.pull-right
11 11 - if merge_request.for_fork?
12 12 %span.light
13   - = "#{merge_request.source_project_path}"
14   - = "#{merge_request.source_branch}"
  13 + #{merge_request.source_project_namespace}:
  14 + = merge_request.source_branch
15 15 %i.icon-angle-right.light
16   - = "#{merge_request.target_branch}"
  16 + = merge_request.target_branch
17 17 - else
18   - = "#{merge_request.source_branch}"
  18 + = merge_request.source_branch
19 19 %i.icon-angle-right.light
20   - = "#{merge_request.target_branch}"
  20 + = merge_request.target_branch
21 21 .merge-request-info
22 22 - if merge_request.author
23 23 authored by #{link_to_member(merge_request.source_project, merge_request.author)}
... ...