diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-03-08 00:26:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-03-08 00:26:39 +0300 |
commit | 1804b3dc0d491a369ef2b05e3ac1ac867c308cc5 (patch) | |
tree | bef04883d68cdaa4da5fd301e481de4bbf046846 /app/views | |
parent | 77570977e9c6c8d3ebbf638f3f5c6d4746e84279 (diff) | |
parent | ace3bcdda42ce7c9031d938f8dd53f207121654e (diff) |
Merge branch 'ce-3839-ci-cd-only-github-projects-fe' into 'master'
Create CI/CD-only projects from GitHub -- CE backport
See merge request gitlab-org/gitlab-ce!17432
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/import/_githubish_status.html.haml | 22 | ||||
-rw-r--r-- | app/views/import/github/new.html.haml | 38 | ||||
-rw-r--r-- | app/views/import/github/status.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/new.html.haml | 2 |
4 files changed, 31 insertions, 37 deletions
diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml index e9a04e6c122..638c8b5a672 100644 --- a/app/views/import/_githubish_status.html.haml +++ b/app/views/import/_githubish_status.html.haml @@ -2,11 +2,11 @@ - provider_title = Gitlab::ImportSources.title(provider) %p.light - Select projects you want to import. + = import_githubish_choose_repository_message %hr %p = button_tag class: "btn btn-import btn-success js-import-all" do - Import all projects + = import_all_githubish_repositories_button_label = icon("spinner spin", class: "loading-icon") .table-responsive @@ -16,9 +16,9 @@ %colgroup.import-jobs-status-col %thead %tr - %th From #{provider_title} - %th To GitLab - %th Status + %th= _('From %{provider_title}') % { provider_title: provider_title } + %th= _('To GitLab') + %th= _('Status') %tbody - @already_added_projects.each do |project| %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" } @@ -30,10 +30,12 @@ - if project.import_status == 'finished' %span %i.fa.fa-check - done + = _('Done') - elsif project.import_status == 'started' %i.fa.fa-spinner.fa-spin - started + = _('Started') + - elsif project.import_status == 'failed' + = _('Failed') - else = project.human_import_status_name @@ -55,7 +57,9 @@ = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true %td.import-actions.job-status = button_tag class: "btn btn-import js-add-to-import" do - Import + = has_ci_cd_only_params? ? _('Connect') : _('Import') = icon("spinner spin", class: "loading-icon") -.js-importer-status{ data: { jobs_import_path: "#{url_for([:jobs, :import, provider])}", import_path: "#{url_for([:import, provider])}" } } +.js-importer-status{ data: { jobs_import_path: "#{url_for([:jobs, :import, provider])}", + import_path: "#{url_for([:import, provider])}", + ci_cd_only: "#{has_ci_cd_only_params?}" } } diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index 9c2da3a3eec..ca47ab5f274 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -1,43 +1,31 @@ -- page_title "GitHub Import" +- title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') +- page_title title +- breadcrumb_title title - header_title "Projects", root_path %h3.page-title - = icon 'github', text: 'Import Projects from GitHub' + = icon 'github', text: import_github_title - if github_import_configured? %p - To import a GitHub project, you first need to authorize GitLab to access - the list of your GitHub repositories: + = import_github_authorize_message - = link_to 'List your GitHub repositories', status_import_github_path, class: 'btn btn-success' + = link_to _('List your GitHub repositories'), status_import_github_path, class: 'btn btn-success' %hr %p - - if github_import_configured? - Alternatively, - - else - To import a GitHub project, - you can use a - = succeed '.' do - = link_to 'Personal Access Token', 'https://github.com/settings/tokens' - When you create your Personal Access Token, - you will need to select the <code>repo</code> scope, so we can display a - list of your public and private repositories which are available for import. + = import_github_personal_access_token_message = form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do .form-group - = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: "Personal Access Token", size: 40 - = submit_tag 'List your GitHub repositories', class: 'btn btn-success' + = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('Personal Access Token'), size: 40 + = submit_tag _('List your GitHub repositories'), class: 'btn btn-success' + + -# EE-specific start + -# EE-specific end - unless github_import_configured? %hr %p - Note: - - if current_user.admin? - As an administrator you may like to configure - - else - Consider asking your GitLab administrator to configure - = link_to 'GitHub integration', help_page_path("integration/github") - which will allow login via GitHub and allow importing projects without - generating a Personal Access Token. + = import_configure_github_admin_message diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml index 0fe578a0036..b00b972d9c9 100644 --- a/app/views/import/github/status.html.haml +++ b/app/views/import/github/status.html.haml @@ -1,6 +1,8 @@ -- page_title "GitHub Import" +- title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') +- page_title title +- breadcrumb_title title - header_title "Projects", root_path %h3.page-title - = icon 'github', text: 'Import Projects from GitHub' + = icon 'github', text: import_github_title = render 'import/githubish_status', provider: 'github' diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 1d31b58a2cc..8cdb0a6aff4 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -73,7 +73,7 @@ = icon('gitlab', text: 'GitLab export') %div - if github_import_enabled? - = link_to new_import_github_path, class: 'btn import_github' do + = link_to new_import_github_path, class: 'btn js-import-github' do = icon('github', text: 'GitHub') %div - if bitbucket_import_enabled? |