summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-18 10:44:15 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-18 10:44:15 +0000
commita4e98f0ec985c91631f41c56317926f29365d95a (patch)
treeb9f47db5ffcb682281a52f281069e2bd8a852bad /app/helpers
parentd803f210aa5e87a441fca562910122f2cfde9fa6 (diff)
parent2388fdd7c6274dad8c10f5bc517f0a8b1aa28aa3 (diff)
downloadgitlab-ce-a4e98f0ec985c91631f41c56317926f29365d95a.tar.gz
Merge branch 'fork-to-group' into 'master'
Fork to group Fixes #1592 * project can be forked into group * fork link always lead to fork page where you select namespace where to fork See merge request !1253
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/namespaces_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb
index bf25dce2301..2bcfde62830 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -25,4 +25,12 @@ module NamespacesHelper
hidden_field_tag(id, value, class: css_class)
end
+
+ def namespace_icon(namespace, size = 40)
+ if namespace.kind_of?(Group)
+ group_icon(namespace.path)
+ else
+ avatar_icon(namespace.owner.email, size)
+ end
+ end
end