summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-08 18:30:11 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-13 16:43:12 +0200
commit8128ce3054749401acfee2c91d38e0e731253624 (patch)
tree4a49566109f3eeb86e44940c07ac6867c90e8288
parent6328f26c41114c4bc6606097a718022fac2bb168 (diff)
downloadgitlab-ce-8128ce3054749401acfee2c91d38e0e731253624.tar.gz
Show full path for nested groups at dashboard groups list
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/models/namespace.rb8
-rw-r--r--app/views/shared/groups/_group.html.haml2
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 37374044551..464be910f5a 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -162,6 +162,14 @@ class Namespace < ActiveRecord::Base
end
end
+ def full_name
+ if parent
+ parent.full_name + ' / ' + name
+ else
+ name
+ end
+ end
+
private
def repository_storage_paths
diff --git a/app/views/shared/groups/_group.html.haml b/app/views/shared/groups/_group.html.haml
index 19221e3391f..8164f61797c 100644
--- a/app/views/shared/groups/_group.html.haml
+++ b/app/views/shared/groups/_group.html.haml
@@ -28,7 +28,7 @@
= image_tag group_icon(group), class: "avatar s40 hidden-xs"
.title
= link_to group, class: 'group-name' do
- = group.name
+ = group.full_name
- if group_member
as