Show modal window with instructions if GH OAuth is not enables
This commit is contained in:
parent
a5f1b67ed4
commit
130663e7ad
2 changed files with 31 additions and 4 deletions
22
app/views/projects/_github_import_modal.html.haml
Normal file
22
app/views/projects/_github_import_modal.html.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
%div#github_import_modal.modal.hide
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
%a.close{href: "#", "data-dismiss" => "modal"} ×
|
||||
%h3 GitHub OAuth import
|
||||
.modal-body
|
||||
You need to setup integration with GitHub first.
|
||||
= link_to 'How to setup integration with GitHub', 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/github.md'
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
var import_modal = $('#github_import_modal').modal({modal: true, show:false});
|
||||
$('.how_to_import_link').bind("click", function(e){
|
||||
e.preventDefault();
|
||||
import_modal.show();
|
||||
});
|
||||
$('.modal-header .close').bind("click", function(){
|
||||
import_modal.hide();
|
||||
})
|
||||
})
|
|
@ -40,13 +40,18 @@
|
|||
The import will time out after 4 minutes. For big repositories, use a clone/push combination.
|
||||
For SVN repositories, check #{link_to "this migrating from SVN doc.", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}
|
||||
|
||||
- if github_import_enabled?
|
||||
.project-import.form-group
|
||||
.col-sm-2
|
||||
.col-sm-10
|
||||
.project-import.form-group
|
||||
.col-sm-2
|
||||
.col-sm-10
|
||||
- if github_import_enabled?
|
||||
= link_to status_github_import_path do
|
||||
%i.fa.fa-github
|
||||
Import projects from GitHub
|
||||
- else
|
||||
= link_to '#', class: 'how_to_import_link light' do
|
||||
%i.fa.fa-github
|
||||
Import projects from GitHub
|
||||
= render 'github_import_modal'
|
||||
|
||||
%hr.prepend-botton-10
|
||||
|
||||
|
|
Loading…
Reference in a new issue