Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
337ceb17
Commit
337ceb17
authored
May 04, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move import project pane to a separate partial
parent
b570bd46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
48 deletions
+52
-48
app/views/projects/_import_project_pane.html.haml
app/views/projects/_import_project_pane.html.haml
+51
-0
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-48
No files found.
app/views/projects/_import_project_pane.html.haml
0 → 100644
View file @
337ceb17
-
active_tab
=
local_assigns
.
fetch
(
:active_tab
,
'blank'
)
-
f
=
local_assigns
.
fetch
(
:f
)
.project-import.row
.col-lg-12
.form-group.import-btn-container.clearfix
=
f
.
label
:visibility_level
,
class:
'label-light'
do
#the label here seems wrong
Import project from
.import-buttons
-
if
gitlab_project_import_enabled?
.import_gitlab_project.has-tooltip
{
data:
{
container:
'body'
}
}
=
link_to
new_import_gitlab_project_path
,
class:
'btn btn_import_gitlab_project project-submit'
do
=
icon
(
'gitlab'
,
text:
'GitLab export'
)
%div
-
if
github_import_enabled?
=
link_to
new_import_github_path
,
class:
'btn js-import-github'
do
=
icon
(
'github'
,
text:
'GitHub'
)
%div
-
if
bitbucket_import_enabled?
=
link_to
status_import_bitbucket_path
,
class:
"btn import_bitbucket
#{
'how_to_import_link'
unless
bitbucket_import_configured?
}
"
do
=
icon
(
'bitbucket'
,
text:
'Bitbucket'
)
-
unless
bitbucket_import_configured?
=
render
'bitbucket_import_modal'
%div
-
if
gitlab_import_enabled?
=
link_to
status_import_gitlab_path
,
class:
"btn import_gitlab
#{
'how_to_import_link'
unless
gitlab_import_configured?
}
"
do
=
icon
(
'gitlab'
,
text:
'GitLab.com'
)
-
unless
gitlab_import_configured?
=
render
'gitlab_import_modal'
%div
-
if
google_code_import_enabled?
=
link_to
new_import_google_code_path
,
class:
'btn import_google_code'
do
=
icon
(
'google'
,
text:
'Google Code'
)
%div
-
if
fogbugz_import_enabled?
=
link_to
new_import_fogbugz_path
,
class:
'btn import_fogbugz'
do
=
icon
(
'bug'
,
text:
'Fogbugz'
)
%div
-
if
gitea_import_enabled?
=
link_to
new_import_gitea_path
,
class:
'btn import_gitea'
do
=
custom_icon
(
'go_logo'
)
Gitea
%div
-
if
git_import_enabled?
%button
.btn.js-toggle-button.js-import-git-toggle-button
{
type:
"button"
,
data:
{
toggle_open_class:
'active'
}
}
=
icon
(
'git'
,
text:
'Repo by URL'
)
.col-lg-12
.js-toggle-content.toggle-import-form
{
class:
(
'hide'
if
active_tab
!=
'import'
)
}
%hr
=
render
"shared/import_form"
,
f:
f
=
render
'new_project_fields'
,
f:
f
,
project_name_id:
"import-url-name"
app/views/projects/new.html.haml
View file @
337ceb17
...
...
@@ -57,54 +57,7 @@
.tab-pane.import-project-pane.js-toggle-container
{
id:
'import-project-pane'
,
class:
active_when
(
active_tab
==
'import'
),
role:
'tabpanel'
}
=
form_for
@project
,
html:
{
class:
'new_project'
}
do
|
f
|
-
if
import_sources_enabled?
.project-import.row
.col-lg-12
.form-group.import-btn-container.clearfix
=
f
.
label
:visibility_level
,
class:
'label-light'
do
#the label here seems wrong
Import project from
.import-buttons
-
if
gitlab_project_import_enabled?
.import_gitlab_project.has-tooltip
{
data:
{
container:
'body'
}
}
=
link_to
new_import_gitlab_project_path
,
class:
'btn btn_import_gitlab_project project-submit'
do
=
icon
(
'gitlab'
,
text:
'GitLab export'
)
%div
-
if
github_import_enabled?
=
link_to
new_import_github_path
,
class:
'btn js-import-github'
do
=
icon
(
'github'
,
text:
'GitHub'
)
%div
-
if
bitbucket_import_enabled?
=
link_to
status_import_bitbucket_path
,
class:
"btn import_bitbucket
#{
'how_to_import_link'
unless
bitbucket_import_configured?
}
"
do
=
icon
(
'bitbucket'
,
text:
'Bitbucket'
)
-
unless
bitbucket_import_configured?
=
render
'bitbucket_import_modal'
%div
-
if
gitlab_import_enabled?
=
link_to
status_import_gitlab_path
,
class:
"btn import_gitlab
#{
'how_to_import_link'
unless
gitlab_import_configured?
}
"
do
=
icon
(
'gitlab'
,
text:
'GitLab.com'
)
-
unless
gitlab_import_configured?
=
render
'gitlab_import_modal'
%div
-
if
google_code_import_enabled?
=
link_to
new_import_google_code_path
,
class:
'btn import_google_code'
do
=
icon
(
'google'
,
text:
'Google Code'
)
%div
-
if
fogbugz_import_enabled?
=
link_to
new_import_fogbugz_path
,
class:
'btn import_fogbugz'
do
=
icon
(
'bug'
,
text:
'Fogbugz'
)
%div
-
if
gitea_import_enabled?
=
link_to
new_import_gitea_path
,
class:
'btn import_gitea'
do
=
custom_icon
(
'go_logo'
)
Gitea
%div
-
if
git_import_enabled?
%button
.btn.js-toggle-button.js-import-git-toggle-button
{
type:
"button"
,
data:
{
toggle_open_class:
'active'
}
}
=
icon
(
'git'
,
text:
'Repo by URL'
)
.col-lg-12
.js-toggle-content.toggle-import-form
{
class:
(
'hide'
if
active_tab
!=
'import'
)
}
%hr
=
render
"shared/import_form"
,
f:
f
=
render
'new_project_fields'
,
f:
f
,
project_name_id:
"import-url-name"
=
render
'import_project_pane'
,
f:
f
,
active_tab:
active_tab
-
else
.nothing-here-block
%h4
No import options available
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment