Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-01-23 01:48:10 +0300
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-01-23 01:48:10 +0300
commit4a10b7509adb9190bae2e93c8c6508cadf06cf3e (patch)
treea94f859f6bbc92a89f86566b3e56ce230ecd644d /app/views
parentfc55a8964d59a847d458e21f7724cddb6dd516a1 (diff)
parent130663e7ad099f057c19df9a024e029e182501d8 (diff)
Merge branch 'gh-import-disabled' into 'master'
Show modal window with instructions if GitHub integration disabled See merge request !1424
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/_github_import_modal.html.haml22
-rw-r--r--app/views/projects/new.html.haml13
2 files changed, 31 insertions, 4 deletions
diff --git a/app/views/projects/_github_import_modal.html.haml b/app/views/projects/_github_import_modal.html.haml
new file mode 100644
index 00000000000..02c9ef45f2b
--- /dev/null
+++ b/app/views/projects/_github_import_modal.html.haml
@@ -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();
+ })
+ })
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index ccd02acd761..3e0f9cbd80b 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -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