summaryrefslogtreecommitdiff
path: root/app/helpers/import_helper.rb
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2018-02-20 20:23:49 -0600
committerEric Eastwood <contact@ericeastwood.com>2018-03-05 13:26:34 -0600
commit32d121343d91eea44d1de344b398d30014180da0 (patch)
treee2a873db36cf497e23ce29fb7136ad96dd868293 /app/helpers/import_helper.rb
parent8ae57909a1ac5f398098f9d1c4581b3cf3d61674 (diff)
downloadgitlab-ce-32d121343d91eea44d1de344b398d30014180da0.tar.gz
CI/CD-only projects FE
See https://gitlab.com/gitlab-org/gitlab-ee/issues/3839 Conflicts: app/assets/javascripts/projects/project_new.js app/views/shared/_import_form.html.haml ee/app/controllers/ee/projects_controller.rb ee/spec/features/projects/new_project_spec.rb locale/gitlab.pot
Diffstat (limited to 'app/helpers/import_helper.rb')
-rw-r--r--app/helpers/import_helper.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/helpers/import_helper.rb b/app/helpers/import_helper.rb
index a18ebfb6030..9af481f0b4f 100644
--- a/app/helpers/import_helper.rb
+++ b/app/helpers/import_helper.rb
@@ -1,4 +1,8 @@
module ImportHelper
+ def has_ci_cd_only_params?
+ false
+ end
+
def import_project_target(owner, name)
namespace = current_user.can_create_group? ? owner : current_user.namespace_path
"#{namespace}/#{name}"
@@ -10,6 +14,28 @@ module ImportHelper
link_to path_with_namespace, url, target: '_blank', rel: 'noopener noreferrer'
end
+ def import_will_timeout_message(_ci_cd_only)
+ timeout = time_interval_in_words(Gitlab.config.gitlab_shell.git_timeout)
+ _('The import will time out after %{timeout}. For repositories that take longer, use a clone/push combination.') % { timeout: timeout }
+ end
+
+ def import_svn_message(_ci_cd_only)
+ svn_link = link_to _('this document'), help_page_path('user/project/import/svn')
+ _('To import an SVN repository, check out %{svn_link}.').html_safe % { svn_link: svn_link }
+ end
+
+ def import_in_progress_title
+ if @project.forked?
+ _('Forking in progress')
+ else
+ _('Import in progress')
+ end
+ end
+
+ def import_wait_and_refresh_message
+ _('Please wait while we import the repository for you. Refresh at will.')
+ end
+
private
def github_project_url(path_with_namespace)