summaryrefslogtreecommitdiff
path: root/app/helpers/import_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/import_helper.rb')
-rw-r--r--app/helpers/import_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/import_helper.rb b/app/helpers/import_helper.rb
index 109bc1a02d1..021d2b14718 100644
--- a/app/helpers/import_helper.rb
+++ b/app/helpers/import_helper.rb
@@ -1,4 +1,9 @@
module ImportHelper
+ def import_project_target(owner, name)
+ namespace = current_user.can_create_group? ? owner : current_user.namespace_path
+ "#{namespace}/#{name}"
+ end
+
def github_project_link(path_with_namespace)
link_to path_with_namespace, github_project_url(path_with_namespace), target: '_blank'
end