summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/_githubish_status.html.haml2
-rw-r--r--app/views/import/github/new.html.haml3
-rw-r--r--app/views/import/github/status.html.haml2
-rw-r--r--app/views/import/history/index.html.haml4
-rw-r--r--app/views/import/shared/_errors.html.haml5
5 files changed, 11 insertions, 5 deletions
diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml
index 8f18d68fd55..08f7cd57732 100644
--- a/app/views/import/_githubish_status.html.haml
+++ b/app/views/import/_githubish_status.html.haml
@@ -3,6 +3,7 @@
- extra_data = local_assigns.fetch(:extra_data, {})
- filterable = local_assigns.fetch(:filterable, true)
- paginatable = local_assigns.fetch(:paginatable, false)
+- default_namespace_path = (local_assigns[:default_namespace] || current_user.namespace).full_path
- provider_title = Gitlab::ImportSources.title(provider)
- header_title _("New project"), new_project_path
@@ -14,6 +15,7 @@
namespaces_path: import_available_namespaces_path,
repos_path: url_for([:status, :import, provider, format: :json]),
jobs_path: url_for([:realtime_changes, :import, provider, format: :json]),
+ default_target_namespace: default_namespace_path,
import_path: url_for([:import, provider, format: :json]),
filterable: filterable.to_s,
paginatable: paginatable.to_s }.merge(extra_data) }
diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml
index ef6479f8be2..fbb27ba620a 100644
--- a/app/views/import/github/new.html.haml
+++ b/app/views/import/github/new.html.haml
@@ -10,7 +10,7 @@
= import_github_authorize_message
- if github_import_configured? && !has_ci_cd_only_params?
- = link_to status_import_github_path, class: 'gl-button btn btn-confirm' do
+ = link_to status_import_github_path(namespace_id: params[:namespace_id]), class: 'gl-button btn btn-confirm' do
= sprite_icon('github', css_class: 'gl-mr-2')
= title
@@ -23,6 +23,7 @@
= form_tag personal_access_token_import_github_path, method: :post do
.form-group
%label.label-bold= _('Personal Access Token')
+ = hidden_field_tag(:namespace_id, params[:namespace_id])
= text_field_tag :personal_access_token, '', class: 'form-control gl-form-input', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' }
%span.form-text.text-muted
= import_github_personal_access_token_message
diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml
index 820c2f06c8f..26b048c8195 100644
--- a/app/views/import/github/status.html.haml
+++ b/app/views/import/github/status.html.haml
@@ -7,4 +7,4 @@
- paginatable = Feature.enabled?(:remove_legacy_github_client)
-= render 'import/githubish_status', provider: 'github', paginatable: paginatable
+= render 'import/githubish_status', provider: 'github', paginatable: paginatable, default_namespace: @namespace
diff --git a/app/views/import/history/index.html.haml b/app/views/import/history/index.html.haml
new file mode 100644
index 00000000000..bca2d884848
--- /dev/null
+++ b/app/views/import/history/index.html.haml
@@ -0,0 +1,4 @@
+- add_to_breadcrumbs _('Create a new project'), new_project_path
+- page_title _('Import history')
+
+#import-history-mount-element{ data: { logo: asset_url('gitlab_logo.png') } }
diff --git a/app/views/import/shared/_errors.html.haml b/app/views/import/shared/_errors.html.haml
index 3e8a99c541a..aa6fcc445fd 100644
--- a/app/views/import/shared/_errors.html.haml
+++ b/app/views/import/shared/_errors.html.haml
@@ -1,8 +1,7 @@
- if @errors.present?
- = render 'shared/global_alert',
- variant: :danger,
+ = render Pajamas::AlertComponent.new(variant: :danger,
dismissible: false,
- alert_class: 'gl-mb-5' do
+ alert_class: 'gl-mb-5') do
.gl-alert-body
- @errors.each do |error|
= error