summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-15 14:36:58 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-15 14:36:58 +0200
commit1e106756fa12d91e233adee740e338e3846939ac (patch)
treef251bb0e942a44beefb590792732f29eb6c982eb /app
parentdb961b8b46497c4626a4d9479e3e20c308e83a57 (diff)
downloadgitlab-ce-1e106756fa12d91e233adee740e338e3846939ac.tar.gz
For form MR render only namespace name
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/merge_request.rb8
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml10
2 files changed, 13 insertions, 5 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index ca2644ec735..a3d786c2138 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -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
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index ff763bca307..980ac126742 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -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)}