diff options
author | Artem Sidorenko <artem.sidorenko@telekom.de> | 2015-08-14 15:56:33 +0200 |
---|---|---|
committer | Artem Sidorenko <artem.sidorenko@telekom.de> | 2015-08-20 12:13:22 +0200 |
commit | e238a8dad5ec6d1bb80cc8d4dd2b3f85b55a6879 (patch) | |
tree | 5571e55d54c0bc83594083a42acae76594c4321b /app/views | |
parent | 55dca86b983496a26a3913aead77439edf96afe9 (diff) | |
download | gitlab-ce-e238a8dad5ec6d1bb80cc8d4dd2b3f85b55a6879.tar.gz |
Import sources: show only enabled sources
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_bitbucket_import_modal.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/_github_import_modal.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/_gitlab_import_modal.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/new.html.haml | 129 |
4 files changed, 79 insertions, 74 deletions
diff --git a/app/views/projects/_bitbucket_import_modal.html.haml b/app/views/projects/_bitbucket_import_modal.html.haml index 745163e79a7..2987f6b5b22 100644 --- a/app/views/projects/_bitbucket_import_modal.html.haml +++ b/app/views/projects/_bitbucket_import_modal.html.haml @@ -5,9 +5,9 @@ %a.close{href: "#", "data-dismiss" => "modal"} × %h3 Import projects from Bitbucket .modal-body - To enable importing projects from Bitbucket, + To enable importing projects from Bitbucket, - if current_user.admin? - you need to + as administrator you need to configure - else - your GitLab administrator needs to - == #{link_to 'setup OAuth integration', 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/bitbucket.md'}. + ask your GitLab administrator to configure + == #{link_to 'OAuth integration', help_page_path("integration", "bitbucket")}. diff --git a/app/views/projects/_github_import_modal.html.haml b/app/views/projects/_github_import_modal.html.haml index de58b27df23..46ad1559356 100644 --- a/app/views/projects/_github_import_modal.html.haml +++ b/app/views/projects/_github_import_modal.html.haml @@ -5,9 +5,9 @@ %a.close{href: "#", "data-dismiss" => "modal"} × %h3 Import projects from GitHub .modal-body - To enable importing projects from GitHub, + To enable importing projects from GitHub, - if current_user.admin? - you need to + as administrator you need to configure - else - your GitLab administrator needs to - == #{link_to 'setup OAuth integration', 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/github.md'}.
\ No newline at end of file + ask your Gitlab administrator to configure + == #{link_to 'OAuth integration', help_page_path("integration", "github")}. diff --git a/app/views/projects/_gitlab_import_modal.html.haml b/app/views/projects/_gitlab_import_modal.html.haml index ae6c25f9371..377cf0187b8 100644 --- a/app/views/projects/_gitlab_import_modal.html.haml +++ b/app/views/projects/_gitlab_import_modal.html.haml @@ -5,9 +5,9 @@ %a.close{href: "#", "data-dismiss" => "modal"} × %h3 Import projects from GitLab.com .modal-body - To enable importing projects from GitLab.com, + To enable importing projects from GitLab.com, - if current_user.admin? - you need to + as administrator you need to configure - else - your GitLab administrator needs to - == #{link_to 'setup OAuth integration', 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/gitlab.md'}.
\ No newline at end of file + ask your GitLab administrator to configure + == #{link_to 'OAuth integration', help_page_path("integration", "gitlab")}. diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index d25fe68242b..636218368cc 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -22,70 +22,75 @@ .col-sm-10 = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2} - %hr + - if import_sources_enabled? + %hr - .project-import.js-toggle-container - .form-group - %label.control-label Import project from - .col-sm-10 - - if github_import_enabled? - = link_to status_import_github_path, class: 'btn' do - %i.fa.fa-github - GitHub - - else - = link_to '#', class: 'how_to_import_link light btn' do - %i.fa.fa-github - GitHub - = render 'github_import_modal' - - - - if bitbucket_import_enabled? - = link_to status_import_bitbucket_path, class: 'btn', "data-no-turbolink" => "true" do - %i.fa.fa-bitbucket - Bitbucket - - else - = link_to '#', class: 'how_to_import_link light btn' do - %i.fa.fa-bitbucket - Bitbucket - = render 'bitbucket_import_modal' - - - unless request.host == 'gitlab.com' - - if gitlab_import_enabled? - = link_to status_import_gitlab_path, class: 'btn' do - %i.fa.fa-heart - GitLab.com - - else - = link_to '#', class: 'how_to_import_link light btn' do - %i.fa.fa-heart - GitLab.com - = render 'gitlab_import_modal' - - = link_to new_import_gitorious_path, class: 'btn' do - %i.icon-gitorious.icon-gitorious-small - Gitorious.org - - = link_to new_import_google_code_path, class: 'btn' do - %i.fa.fa-google - Google Code - - = link_to "#", class: 'btn js-toggle-button' do - %i.fa.fa-git - %span Any repo by URL - - .js-toggle-content.hide - .form-group.import-url-data - = f.label :import_url, class: 'control-label' do - %span Git repository URL + .project-import.js-toggle-container + .form-group + %label.control-label Import project from .col-sm-10 - = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git' - .well.prepend-top-20 - %ul - %li - The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>. - %li - The import will time out after 4 minutes. For big repositories, use a clone/push combination. - %li - To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/importing/migrating_from_svn.html"}. + - if github_import_enabled? + - if github_import_configured? + = link_to status_import_github_path, class: 'btn import_github' do + %i.fa.fa-github + GitHub + - else + = link_to '#', class: 'how_to_import_link light btn import_github' do + %i.fa.fa-github + GitHub + = render 'github_import_modal' + + - if bitbucket_import_enabled? + - if bitbucket_import_configured? + = link_to status_import_bitbucket_path, class: 'btn import_bitbucket', "data-no-turbolink" => "true" do + %i.fa.fa-bitbucket + Bitbucket + - else + = link_to status_import_bitbucket_path, class: 'how_to_import_link light btn import_bitbucket', "data-no-turbolink" => "true" do + %i.fa.fa-bitbucket + Bitbucket + = render 'bitbucket_import_modal' + + - if gitlab_import_enabled? + - if gitlab_import_configured? + = link_to status_import_gitlab_path, class: 'btn import_gitlab' do + %i.fa.fa-heart + GitLab.com + - else + = link_to status_import_gitlab_path, class: 'how_to_import_link light btn import_gitlab' do + %i.fa.fa-heart + GitLab.com + = render 'gitlab_import_modal' + + - if gitorious_import_enabled? + = link_to new_import_gitorious_path, class: 'btn import_gitorious' do + %i.icon-gitorious.icon-gitorious-small + Gitorious.org + + - if google_code_import_enabled? + = link_to new_import_google_code_path, class: 'btn import_google_code' do + %i.fa.fa-google + Google Code + + - if git_import_enabled? + = link_to "#", class: 'btn js-toggle-button import_git' do + %i.fa.fa-git + %span Any repo by URL + + .js-toggle-content.hide + .form-group.import-url-data + = f.label :import_url, class: 'control-label' do + %span Git repository URL + .col-sm-10 + = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git' + .well.prepend-top-20 + %ul + %li + The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>. + %li + The import will time out after 4 minutes. For big repositories, use a clone/push combination. + %li + To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/importing/migrating_from_svn.html"}. %hr.prepend-botton-10 |